Skip to main content
LPIC-1 Exam 101

102.1 Design hard disk layout Part 4

By January 19, 2014September 12th, 2022No Comments
Weight 2
Description Candidates should be able to design a disk partitioning scheme for a Linux system.

Key Knowledge Areas:

  • Allocate filesystems and swap space to separate partitions or disks.
  • Tailor the design to the intended use of the system.
  • Ensure the /boot partition conforms to the hardware architecture requirements for booting.
  • Knowledge of basic features of LVM.

The following is a partial list of the used files, terms and utilities:

  • / (root) filesystem.
  • /var filesystem.
  • /home filesystem.
  • swap space.
  • mount points.
  • partitions.

LVM can simplify your disk management by allowing you to easily expand disk space across multiple disks. So if the root file-system was running out of space we can simple add more space into LVM.

Expanding a file-system across many disks does not add fault-tolerance and you may need to consider the underlining RAID structure of the disks you add in.

Using the command line is quick, effective and essential in Linux administration. Using LVM, Logical Volume Management, allows for volumes to dynamically grow as extra partitions or disks can be supplied to support the existing volume groups. These are common on SANs and in our data-centers. The video then takes you through the creation of a logical volume structure on SUSE Linux Enterprise Server 11 from start to finish. Don’t forget to make sure the LVM service is enabled.

There are three levels of management

  • Physical Volumes : The disks or partitions we use
  • Volume Groups : The Consumes than mange the disk space
  • Logical Volumes : The areas we format as file systems

The partitions we add in have already been created and are of partition ID 8e when creating in fdisk. If you are using parted LVM partition can be created from the command line

 parted -a cylinder /dev/sdb mkpart primary 201 300
 parted /dev/sdb toggle 3 lvm
 (in this case it is partition 3 that we want to set to lvm)
 parted /dev/sdb print

 chkconfig -a boot.lvm
 pvcreate /dev/sda14
 pvcreate /dev/sda15
 vgcreate vg1 /dev/sda14 /dev/sda15
 lvcreate -L 1000M -n data4 vg1
 chkconfig -a boot.lvm
 mkfs.ext3 /dev/vg1/data4
 echo "/dev/vg1/data4 /export/data3 ext3 defaults 0 2" >> /etc/fstab
 mount -a

As well as the create command we can then use the extend  style commands to add more space to existing volume groups and volumes