November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Categories

November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

LVM(LOGICAL VOLUME MANAGER)

LVM(LOGICAL VOLUME MANAGER)
LVM(LOGICAL VOLUME MANAGER)
—————————————–

1>first create partion

#partprobe -s

#pvcreate /dev/sda?

#pvcreate /dev/sda?

#vgcreate vg0 /dev/sda? /dev/sda?

#vgdisplay

#pvdisplay

#lvdisplay

#lvcreate -n lvm0 -L 150M vg0 (where -n—->name, -L—>length)

#lvdisplay

#mkfs.ext3 /dev/vg0/lvm0

#mkdir /mnt/lvm1

#mount /dev/vg0/lvm0 /mnt/lvm0

#vim /etc/fstab
/dev/vg0/lvm0 /mnt/lvm0 ext3 defaults 0 0

#mount -a

——————————————————————————–

Steps To Extend The LVM
—————————–

#lvextend -L 300M /dev/vg0/lvm0
(OR)
#lvextend -L +150M /dev/vg0/lvm0

#lvdisplay

#df -h

#resize2fs /dev/vg0/lvm0 (To give the information abt changing the size to the system)

#df -h
——————————————————————————–

Steps To Reduce The Size Of LVM
———————————–

#umount /mnt/lvm0

#e2fsck -f /dev/vg0/lvm0 (forcefully check the file system type)

#resize2fs /dev/vg0/lvm0 200M

#lvreduce -L 200M /dev/vg0/lvm0

#lvdisplay /dev/vg0/lvm0

#mount /dev/vg0/lvm0 /mnt/lvm0

#df -h
——————————————————————————–

To Extend Existing VG
—————————
1> create a partion

#partprobe -s

#pvcreate /dev/sda?

#vgextend vg0 /dev/sda?

#vgdispaly

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>