Overfilled ZFS won’t delete files

Today I ran into a trouble when I had filled my ZFS filesystem and tried to free up some space:

$ rm boxroom-0.6.3.zip
rm: boxroom-0.6.3.zip: Disc quota exceeded

The same error was given for all kinds of rm options, recursive, force, etc.

Digging around, pointed me to this post and that B solution was excellent:

$ ls -larth boxroom-0.6.3.zip
-rw-r--r--  1 laas  wheel   344K Apr 19  2009 boxroom-0.6.3.zip

$ cat /dev/null > boxroom-0.6.3.zip
$ rm boxroom-0.6.3.zip

Though this only freed up 344 kilobytes, it was enough that I could remove the file itself and then move on to more bigger files to free up the needed space.

Note: It was pointed out to me that the ZFS filesystem was compressed, which would shed light on the whys of the problem, as modifying compressed structures might increase the size, whereas truncating is the only option to decrease it.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s