The Gentoo documentation for adding user
quotas
actually tells the user to create invalid quota files, leaving quotacheck to
fix them up on next reboot. This is pretty stupid, so here’s the proper way to
create user quotas:
Add
usrquota(and/orgrpquota) to the filesystem options in/etc/fstab:/dev/sda4 /mnt/foo reiserfs noatime,usrquota 0 0Ensure the filesystem root does not have any of the quota files:
rm -f /mnt/foo/quota.* /mnt/foo/aquota.*Create the quota file(s). Make sure you pass
quotacheckthe device, not the mountpoint!quotacheck -ucvd /dev/sda4If you wish to enable group quotas, add
-gto the arguments. The key here is the-cargument: this tells the tool to create the quota files if they are missing.Switch on quotas:
quotaon /mnt/foo
Also, the big red warning in the Gentoo docs can safely be ignored, I’ve never had a problem with quotas on ReiserFS.