Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Expanding (resize) Centos 7 (or Red Hat EL 7) root partition in Custom Google Compute Image
# Requires cloud-utils-growpart to be installed
# Resize ROOT FS
part=`df --output=source / |grep "/dev/"`
if [ ! -z "$part" ] ; then
p=`echo $part|cut -c$len`
d=`echo $part|cut -c1-$(($len-1))`
growpart "$d" "$p"
xfs_growfs "$part"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment