homework logical volume

1) add a second hard drive with 20 GB space
2) restart system
3)use fdisk command to partion /dev/sdb to sdb1 and sdb2 partition
3)create physical volume using sdb1 and sdb2
4) create a volumegroup called appvg using sdb1
5)create a logical volume called datalv of 5GB using appvg
6)format it with ext4
7)create a /data directory
8)mount datalv on /data directory

PV VG Fmt Attr PSize PFree
/dev/sda5 sysvg lvm2 a– 62.75g 36.75g
/dev/sdb1 lvm2 a– 10.00g 10.00g
/dev/sdb2 lvm2 a– 9.99g 9.99g

sysvg 1 6 0 wz–n- 62.75g 36.75g
appvg 1 1 0 wz–n- 20g 10g
datalv appvg -wi-ao—- 5.00g
homelv sysvg -wi-ao—- 5.00g
optlv sysvg -wi-ao—- 4.00g
tmplv sysvg -wi-ao—- 5.00g
usrlocallv sysvg -wi-ao—- 4.00g
usrlv sysvg -wi-ao—- 4.00g
varlv sysvg -wi-ao—- 4.00g

df -h:-
Filesystem Type Size Used Avail Use% Mounted on
/dev/sda2 ext4 15G 388M 14G 3% /
tmpfs tmpfs 499M 0 499M 0% /dev/shm
/dev/sda1 ext4 248M 34M 202M 15% /boot
/dev/mapper/sysvg-homelv ext4 5.0G 138M 4.6G 3% /home
/dev/mapper/sysvg-optlv ext4 4.0G 136M 3.7G 4% /opt
/dev/mapper/sysvg-tmplv ext4 5.0G 138M 4.6G 3% /tmp
/dev/mapper/sysvg-usrlv ext4 4.0G 1.6G 2.2G 43% /usr
/dev/mapper/sysvg-usrlocallv ext4 4.0G 137M 3.7G 4% /usr/local
/dev/mapper/sysvg-varlv ext4 4.0G 186M 3.6G 5% /var
/dev/mapper/appvg-datalv ext4 5.0G 186M 4.6G 5% /data
1) add sdb2 to appvg so that appvg’s size should be 20G
2) extend datalv size from 5G to 10G
3)create another lv called backuplv of size 5G on appvg, formate it to ext4 and mount it to /backup directory.
4) check the free size of sysvg
5)and check the size of varlv
5) now increase the size of varlv by +2GB

3) add third hard drive of size 10GB
4) format it to sdc1 and sdc2 with 5G each
5) change the system id to linux
6) format both partition to ext4
7) mount sdc1 to /rajeshhamal directory
8) mount sdc2 to /rajanikanth directory

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.