Thursday, April 16, 2020

Centos 7 : Extending LVM Volume



1. Check the un-partition disk under Disk GUI on Centos 7 GUI



2. Create and format disk 
#fdisk -l
#fdisk -l /dev/sda3
- to format the partition :
- n = create new partition
- p = creates primary partition
- 1 = makes partition the first on the disk
- to prepare the partition to be used by LVM :
- t = change partition type
- 8e = changes to LVM partition type
- verify and write the information to the hard drive:
- p = view partition setup so we can review before writing changes to disk
- w=write changes to disk

3. Check the LVM volume on server
#pvs - show physical volume status
#lvs - show logical volume status
#vgs - show volume group status

4. Used fdisk to create new free partition
#fdisk /dev/sda ,then enter p for print the details partition status

5. Work with  new partition create and extend LV volume
#pvcreate /dev/sda3
#vgextend "<volume group name>" /dev/sda3

6. Extend the Logical Volume
#lvextend -L +200G /dev/mapper/centos-home

* if insufficient free space status, please used this
#lvextend -l +100%FREE /dev/mapper/centos-home

7. Use xfs_growfs utility
#xfs_growfs /dev/mapper/centos-home

#resize2fs /dev/mapper/centos-home - in Centos 6

8. Recheck the disk status
#df -h

source : 
 

Related Posts:

0 comments:

Post a Comment