How to Extend the partition after extending it from VMware / SAN
06. March 2015 SysAdmin 0
- CentOS 6/7, RHEL6/7 with XFS file system
- My / Filesystem is full
- I have extended the size from VMware datastore or SAN LUN
- Reboot is necessary (6/7) if it is an OS parition ie /.
- Makesure you have a backup / snapshot of the `sda` disk
In this example, we are assuming that the disk is /dev/sda and the partition is /dev/sda3 mounted on /.
- Rescan the disk after extending the disk from VMware or SAN.
echo 1 > /sys/block/sda/device/rescan
fisk -l /dev/sdawill show the disks new size.
- Now we have to extend the partition, for that run fdisk on the disk and re-create the parition.
pto print the partion table, and note your partion id for / (In our case its 3)
dto delete the partition
- Enter the number
3and your partion is deleted.
- Now press
cto create a new partion and select
3again, then just presss
ENTERwhen it as for starting and ending cylindar number.
pagain to see the parion list and press
wto write the partition table.
- Now reboot your system
- After rebooting, run
- Now run
df -hand your partion will be extended.
Please Comment and share if found helpful 🙂