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
Submitted by JamieCameron on Tue, 04/26/2016 - 10:47 Comment #1
Does the host system support for XFS filesytem? If it's an older Linux distro (like CentOS 6) it may not.
Yes, its running CentOS Linux 7.2.1511
Submitted by JamieCameron on Tue, 04/26/2016 - 18:40 Comment #3
Is the
xfs_growfs
command installed on the host system?Yes. I have successfully expanded the file system using the command.
Submitted by JamieCameron on Thu, 04/28/2016 - 00:41 Comment #5
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.