I am using a VM on Google Compute Cloud. I grew my disk from 10G to 200G.
I followed the exact steps here:
https://cloud.google.com/compute/docs/disks#repartitionrootpd
To summarize:
- I ran fdisk, removed the only partition, created a new one of the full size, same start / new end, same device ID
- I rebooted the instance
- I resized my filesystem using
sudo xfs_growfs /
(I am running CentOS 7)
After this I untar
a 3.5G archive in a /opt
subdirectory which, after a few minutes, ended with :
Cannot mkdir: No space left on device
I can check that the space is here and it seems (to me at least) that it should be available everywhere
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 200G 13G 188G 7% /
devtmpfs 1.9G 0 1.9G 0% /dev
tmpfs 1.9G 0 1.9G 0% /dev/shm
tmpfs 1.9G 8.3M 1.8G 1% /run
tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
Now, with this exact configuration, a simple cp command on a 50Mb directory also returns:
cp: cannot create regular file ‘toto/conf/server.xml’: No space left on device
I had many small files in my tar so I thought about a inode limitation, but:
# df -ih
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/sda1 200M 100K 200M 1% /
devtmpfs 462K 285 462K 1% /dev
tmpfs 463K 1 463K 1% /dev/shm
tmpfs 463K 309 463K 1% /run
tmpfs 463K 13 463K 1% /sys/fs/cgroup
It is as if my new disk space is not available. Because I have the feeling that it approximately stopped at my former 10G disk limitation.
I have no idea what to do now.
Best Answer
I managed to make it work through the command:
Apparently this is a regression in CentOS kernel 3.7 to 3.17 and I am in 3.10.
Here is the relevant link: http://xfs.org/index.php/XFS_FAQ#Q:_Why_do_I_receive_No_space_left_on_device_after_xfs_growfs.3F