Created
August 15, 2017 02:46
-
-
Save glennswest/c1319240f1a677156f56370c472231e0 to your computer and use it in GitHub Desktop.
Grow Azure RHEL Root Value - Full Auto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "Grow Root FS" | |
rootdev=`findmnt --target / -o SOURCE -n` | |
rootdrivename=`lsblk -no pkname $rootdev` | |
rootdrive="/dev/"$rootdrivename | |
majorminor=`lsblk $rootdev -o MAJ:MIN | tail -1` | |
part_number=${majorminor#*:} | |
yum install -y cloud-utils-growpart.noarch | |
growpart $rootdrive $part_number -u on | |
xfs_growfs $rootdev |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment