Logical volume manager
Physical volume
Group volume
Logical volume
Step = 1
Create a two partition
then change the id number
#Fdisk –l
#Fdisk /dev/sda
Run the command
#Partprobe /dev/sda Pvcreate /dev/sda7 /dev/sda8 [to create physical volume]
#Vgcreate /dev/lg /dev/sda7 /dev/sda8 [here lg is the volume group which will create by default and sda7 sda8 is added into it]
#Lvcreate –L +500M –n username /dev/lg [space will be provide for user]
#Mke2fs –j /dev/lg/username [format directory user]
#Mount /dev/lg/username /mnt [mount the directory]
#Cd /mnt Ls It will show lost+found means partition is ready Pvdisplay [to show physical volume]
#Vgdisplay [to show volume group]
#Lvdisplay [to show logical volume]
#Vgs Pvs Lvs To increase the lvm
#Lvextend –L 800M /dev/Dirctory/username
[to increase the size of the User lvm]
#Resize2fs /dev/Dirctory/username [to resize the partition ]
#E2fsck –f /dev/Dirctory/username [to activate the increased the partition of lvm]
#Vgextend /Dirctory/username [to extend the volume group]
#Vgreduce /Dirctory/username [to reduce the volume group]
#Lvreduce –L -500m /dev/Dirctory/username
#Lvremove /dev/Dirctory/username [to remove the lvm]
#Vgremove /dev/Dirctory/username [to remove the volume group]
Physical volume
Group volume
Logical volume
Step = 1
Create a two partition
then change the id number
#Fdisk –l
#Fdisk /dev/sda
Run the command
#Partprobe /dev/sda Pvcreate /dev/sda7 /dev/sda8 [to create physical volume]
#Vgcreate /dev/lg /dev/sda7 /dev/sda8 [here lg is the volume group which will create by default and sda7 sda8 is added into it]
#Lvcreate –L +500M –n username /dev/lg [space will be provide for user]
#Mke2fs –j /dev/lg/username [format directory user]
#Mount /dev/lg/username /mnt [mount the directory]
#Cd /mnt Ls It will show lost+found means partition is ready Pvdisplay [to show physical volume]
#Vgdisplay [to show volume group]
#Lvdisplay [to show logical volume]
#Vgs Pvs Lvs To increase the lvm
#Lvextend –L 800M /dev/Dirctory/username
[to increase the size of the User lvm]
#Resize2fs /dev/Dirctory/username [to resize the partition ]
#E2fsck –f /dev/Dirctory/username [to activate the increased the partition of lvm]
To extend volume group
#Vgreduce /Dirctory/username [to reduce the volume group]
To decrease the lvm
To remove lvm and vg
#Vgremove /dev/Dirctory/username [to remove the volume group]

No comments:
Post a Comment