[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#3133: quota files not sparse after running quotacheck



Wichert Akkerman:
> This problem is mentioned in the quota-package documentation. On modern
> filesystem (like e2fs) however this is not a problem: we simply make a
> hole in the file. This means that no diskspace is wasted on large amounts

I know.  The problem is that quotacheck removes the holes.  Also, the
quota files seem to grow by 32 bytes every time quotacheck is run.
Here is a simple test which demonstrates both problems:

# quotaoff /
# ls -l /quota.user
-rw-r-----   1 root     staff     2097280 May 28 17:02 /quota.user
# du /quota.user
2058    /quota.user
# echo /quota.user | cpio -p --sparse /tmp
4097 blocks
# ls -l /tmp/quota.user
-rw-r-----   1 root     staff     2097280 May 28 17:05 /tmp/quota.user
# du /tmp/quota.user
17      /tmp/quota.user
# mv /tmp/quota.user /quota.user
# quotacheck /
# ls -l /quota.user
-rw-r-----  1 root      staff     2097312 May 28 17:09 /quota.user
# du /quota.user
2058
#

That not everyone is seeing this problem may be because I have a few
files owned by nobody (65534) - /var/lib/locate/locatedb is one of them.
But, since sizeof(struct dqblk) is 32, no quota file should be larger
than 2097120 (65535*32) bytes.

> of zero's. If space has been allocated and later reset to zero's you can
> use the makefile-program (no idea where to find it, try ftp-search).

I think it was called makehole but archie didn't find it.  I guess it
is part of some larger package.

Marek


Reply to: