Logical Volume Manager (LVM)


Logical Volume Manager

Logical Volume Manager (LVM)

  Logical Volume Manager :- 


  • LVM is a method of allocating hard drive space into logical volumes that can be easily resized.


  • With LVM, the HD or set of hard drives is allocated to one or more Physical Volumes.


  • The Physical Volumes are then combined into Volume Groups.


  • Each Volume Group is divided into Logical Volumes, which are formatted with a file system like ext3 and are then mounted.



Steps :

1. Create Partition and change File System ID :
 
# fdisk -l
# fdisk /dev/sda
     
2. Check and Create physical Volume :

# pvdisplay
# pvcreate /dev/sda9 /dev/sda10
# pvcreate /dev/sda11
# pvdisplay | less

3. Check and Create Volume Group :

# vgdisplay
# vgcreate hydvolgrp /dev/sda9 /dev/sda10
#vgdisplay -v | less

4. Check and Create logical Volme :

# lvdisplay
# lvcreate -L 2G hydvolgrp -n rohitlv
# lvcreate -L 500M hydvolgrp -n patellv
# lvdisplay | less

5. Format and Mount logical Volume :
 
# mkfs.ext3 /dev/hydvolgrp/rohitlv
# mkfs.ext3 /dev/hydvolgrp/patellv
# mkdir /mnt/rohit
# mkdir /mnt/patel  
# mount /dev/hydvolgrp/rohitlv /mnt/rohit
# mount /dev/hydvolgrp/patellv /mnt/patel

then use, # df -h
to view the partitions.

6. Resize the logical Volume :

# df -h
# lvresize -L +1G
# df -h
# resize2fs /dev/hydvolgrp/rohitlv
# df -h

7. Resize volume Group :

# vgextend hydvolgrp /dev/sda11
# vgdisplay







FEED






Share










SUPPORT

















VISIT COUNTER !!








ROHIT PATEL
 



Leave a Reply