Unable to delete files with full disk quota

来源:互联网 发布:裴蕾网络黄金 编辑:程序博客网 时间:2024/05/04 19:08

 

This issue has been resolved with the home directory file server OS update

In the event that you run out of space in your home directory, you will be unable to delete files to free space. This issue will be fixed with the next OS update of the home directory fileservers, which will happen mid-summer 2009.

Symptoms of the issue

You will probably see something that looks like this:

gmason@brody:~> cp testfile1 testfile2cp: cannot create regular file `testfile2': Disk quota exceeded

The difficult problem is that when the quota runs out you can not remove a file using the 'rm' command.  For example:

gmason@brody:~> rm testfile1rm: cannot remove file `testfile1': Disk quota exceeded
Workaround for this issue

You will need to copy /dev/null into a non-zero byte file (i.e. a file that is taking up space).
Example:

gmason@brody:~> ls -lah testfile1-rw-r--r-- 1 gmason staff 16M 2009-03-23 10:44 testfile1gmason@brody:~> cp /dev/null testfile1gmason@brody:~> ls -lah testfile1-rw-r--r-- 1 gmason staff 0 2009-03-23 11:41 testfile1gmason@brody:~> rm testfile1gmason@brody:~> ls -lah testfile1/bin/ls: testfile1: No such file or directory

As you can see, the file is 16 Megs in size, I then make the file zero bytes, and then I'm able to remove it. Once enouph files have been removed in this manner, you should be able to use the rm command again.

Technical background of issue

This is due to how ZFS functions. ZFS is a Copy On Write filesystem, so a file deletion actually takes slightly more space on disk before a file is actually deleted, as it writes the metadata involved with the file deletion before it removes the allocation for the file being deleted. This is how ZFS is able to always be consistent on disk, even in the event of a crash.

原创粉丝点击