Skip to content

Instantly share code, notes, and snippets.

@glennswest
Created August 15, 2017 02:46
Show Gist options
  • Save glennswest/c1319240f1a677156f56370c472231e0 to your computer and use it in GitHub Desktop.
Save glennswest/c1319240f1a677156f56370c472231e0 to your computer and use it in GitHub Desktop.
Grow Azure RHEL Root Value - Full Auto
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