Spring 2015 CSCI 372 Skills — Installing logical volumes

The task — Step 1

On either your virtual machine or your Raspberry Pi, create a partition of 1 Gbyte and use pvcreate to initialize that partitition for use by LVM. Be very careful when performing this step. This is the only step which can host up your system.

Next create a volume group called yournameVG of size 256 MBytes in your physical volume.

Next create a logical volume yournameLV within your physical volume.

Format your logical volume for an EXT4 file system. Create a mount point /mnt/yourname and modify /etc/fstab so that your new file system will be mounted when your computer is rebooted.

Put some files and directories, at least two of each, in your file system and reboot. Then execute the following command to show that the logical volume is working.

( df ; ls /mnt/yourname ) > /tmp/T1

The task — Step 2

Now extend the size of your file system from 256 MBytes to 512 MBytes. Your going to be a bit on your own for this one. Search the internet to figure out how to do this.

When you have sucessfully extended the system, type the following command to show your success.

( df ; ls /mnt/yourname ) > /tmp/T2

The task — Step 3

Now let’s create a snapshot logical volume. This is something I have never done before. Allocate 10% of the space on the logical volume for your snapshot. Call the snapshot logical volume yournameShdLV and mount it read only on /mnt/yournameShd. Once you have this working, type the following command to show your efforts.

( df ; ls /mnt/yourname ; ls /mnt/yournameShd ) > /tmp/T3

The task — Step 4

Remove at least one file or directory from <