Re: "No space left on device" from hell

Arkadiusz Miśkiewicz
2014-09-24T08:54:15Z

On Wednesday 24 of September 2014, Fran Tsao Santín wrote:
> 2014-09-24 9:03 GMT+02:00 Arkadiusz Miśkiewicz <arekm@maven.pl>:
> > Hello.
> >
> > 3.10.40 kernel and creating files causes "No space left on device". After
> > deleting some files I can create new files again until the problem
> > happens again.
>
> Are you sure the problem is the filesystem device? Maybe you are running a
> process that fills up another device i.e. shm.

Dave Chinner figured out the problem already (on irc).

Basically this fs was grown from 300GB to 600GB but due to bug (fixed by
commit 9de67c3 ("xfs: allow inode allocations in post-growfs disk space"))
that new space was never used for new inodes.

So ended up with full AGs 0-3 (xfs_db -r -c "freesp -s -a XX" /dev/xyz shows
that for each AG XX).

Fs was never unmounted after grows but fortunately mount -o remount,inode32
... followed by mount -o remount,inode64 cured it without a need to reboot, so
now new inodes are distributed to all AGs.

I still need to free some space in AGs 0-3 though (by moving data to new dirs
allocated in new AGs; xfs_db -r -c "convert inode DIR_INODE_NR agno" /dev/xyz
shows in which AG new dir got allocated).

There are more bugs hiding (like if ENOSPC on some AG happens it should try
next AG instead of failing). Dave knows all that magic.

Big thanks to Dave!

--
Arkadiusz Miśkiewicz, arekm / maven.pl