Monday, December 07, 2020

Extend XFS root Fileystem

 My Notes to extend the existing XFS root filesystem

O/S: Redhat 7 

1) Create new Disk

fdisk /dev/sda  
-- create new partition

2) Recognize the new disk
$ partprobe
-- Error "The backup GPT table is not at the end of the disk"

$parted -l
Error: The backup GPT table is not at the end of the disk, as it should be.
This might mean that another operating system believes the disk is smaller.
Fix, by moving the backup to the end (and removing the old backup)?
Fix/Ignore/Cancel? Fix 

3) Verify the new disk added 
$ lsblk


4) Create Physical Volume
$ pvs /dev/sda5

5) Extend the existing root volume group
$ vgextend rhel /dev/sda5

6) Extend the Logical Volume
$ lvextend -l 100%FREE /dev/rhel/root

7) Verify if the new disk is added 
$ df -h
-- Still my filesystem has old size

8) Extend the root filesystem 
$ xfs_growfs -d /

9) Verify if the new disk is added 
$ df -h

Good Luck!


No comments: