Add Extra Partition to LVM Configured Os
To add extra partition and increase the lvm volume do following:
1. Format the new harddrive:
~#:fdisk /dev/sdb(1) n(2) p ->1-4(3) w
2. To see all LVM Partition:
~#:lvscan
3. To see all physical volume and their status, whether it is devoted to a groub or not:
~#:lvmdiskscan
4. To change a partition state to a LVM Physical Volume:
~#:pvcreate /dev/sdb1
5. To see all LVM groups:
~#:vgdiplay
6. To add the new LVM physical volume to the group listed above:
~#:vgextend [Group Name] /dev/sdb1
7. To see all physical volume dedicated to a group:
~#:vgdisplay [Group Name]
8. To create a new LVM logical volume in a group:
~#:lvcreate -l 100%FREE -n [ a name you want ] [ LVM Group ]
* this command will devote all free space in a group to the new one called [a name you want]
9. To extend current LVM logical partition and increase the system space:
~#:lvextend -l +100%FREE /dev/[LVM Group]/[name of current logical volume] #/dev/LVMgr/LogVol01
10. To remove a logical volume:
~#:lvremove /dev/[LVM Group]/[name of poor logical volume]
* If you increase the logical volume of a system, it should be informed by following command:
~#:resize2fs /dev/[LVM Group]/[name of lvm logical volume]