RHEL 7 – vpshere increase space on unpartioned disk (root or non-root) ext4 XFS

1. login to vpshere and expand disk to new space for the vm

2. echo the following command – change controller to match ; you can also reboot to see the changes

echo "- - -" > /sys/class/scsi_host/host0/scan

3. login to VM – determine if filesystem mount is directly written to; if so you can expand the filesystem directly

Disk /dev/sdc: 107.4 GB, 107374182400 bytes, 209715200 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

4. check fstab to see which identifier your partition is mounted by

UUID=a3ea5cce-cd61-4f40-9a53-36364c8a0a6c /    ext4    defaults        1 1

5. use lsblk command to check  the device (determine partioned or unpartioned) ;in the case below sdc (unpartioned)

lsblk –fs /dev/disk/by-uuid/a3ea5cce-cd61-4f40-9a53-36364c8a0a6c

sdc ext4 root a3ea5cce-cd61-4f40-9a53-36364c8a0a6c /

6. from the above we can resize the filesystem (on-line) directly even if it is root partition

resize2fs /dev/disk/by-uuid/a3ea5cce-cd61-4f40-9a53-36364c8a0a6c

7. if XFS fileystem

xfs_growfs /mnt/yourFS



Leave a Reply

Your email address will not be published.



Get Free Shipping on Everything All Season Long
Best Buy Co, Inc.
Best Buy Co, Inc.