Error when creating a KVM with XFS CentOS7 image

When creating a new KVM using the XFS CentOS 7 image the following error is generated:

Expanding filesystem to 1024 GB ..
.. expansion failed : (mkdir -p \/tmp\/\.webmin\/620005_81808_22_create\.cgi && mount -t xfs /dev/loop1 /tmp/.webmin/620005_81808_22_create.cgi && xfs_growfs -D 268417024 \/tmp\/\.webmin\/620005_81808_22_create\.cgi ; ex=$? ; umount /tmp/.webmin/620005_81808_22_create.cgi ; rmdir /tmp/.webmin/620005_81808_22_create.cgi ; exit $ex) failed : sh: ((: mkdir -p /tmp/.webmin/620005_81808_22_create.cgi && mount -t xfs /dev/loop1 /tmp/.webmin/620005_81808_22_create.cgi && xfs_growfs -D 268417024 /tmp/.webmin/620005_81808_22_create.cgi ; ex=0 ; umount /tmp/.webmin/620005_81808_22_create.cgi ; rmdir /tmp/.webmin/620005_81808_22_create.cgi ; exit : division by 0 (error token is "/.webmin/620005_81808_22_create.cgi && mount -t xfs /dev/loop1 /tmp/.webmin/620005_81808_22_create.cgi && xfs_growfs -D 268417024 /tmp/.webmin/620005_81808_22_create.cgi ; ex=0 ; umount /tmp/.webmin/620005_81808_22_create.cgi ; rmdir /tmp/.webmin/620005_81808_22_create.cgi ; exit ")

The server is still installed successfully, however the disk space isn't expanded:

df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       2.0G  1.1G  977M  53% /
devtmpfs        3.9G     0  3.9G   0% /dev
tmpfs           3.9G     0  3.9G   0% /dev/shm
tmpfs           3.9G  8.3M  3.9G   1% /run
tmpfs           3.9G     0  3.9G   0% /sys/fs/cgroup

Manual expansion resolves the problem.

xfs_growfs /

Status: 
Active

Comments

Does the host system support for XFS filesytem? If it's an older Linux distro (like CentOS 6) it may not.

pixel_paul's picture
Submitted by pixel_paul on Tue, 04/26/2016 - 11:03 Pro Licensee

Yes, its running CentOS Linux 7.2.1511

Is the xfs_growfs command installed on the host system?

pixel_paul's picture
Submitted by pixel_paul on Wed, 04/27/2016 - 03:11 Pro Licensee

Yes. I have successfully expanded the file system using the command.

Hmm ... it seems like one of the XFS commands is failing with a "division by 0" error. It's kind of hard to debug this though, since it isn't Virtualmin code - just a standard command that we're calling.