I supplied a script output of a potential quota bug. I created a basic user. I gave a block quota (soft=15/hard =20). The account initial had 12 blocks in use. I then create a file in tmp that was about 1K in size. I then proceeded to copy that file to the home directory of the new user. I would continue to get quota warning/errors even though the user was below quota. I also received multiple message. Script started on Tue Nov 24 00:56:45 1998 $ quota Disk quotas for user infinii (uid 501): Filesystem blocks quota limit grace files quota limit grace /dev/hdc5 12 15 20 12 0 0 $ cp /tmp/1K_FILE a /: warning, user disk quota exceeded [WHY HERE] $ quota Disk quotas for user infinii (uid 501): Filesystem blocks quota limit grace files quota limit grace /dev/hdc5 13 15 20 13 0 0 $ cp /tmp/1K_FILE b /: warning, user disk quota exceeded /: write failed, user disk limit reached. [WHY BOTH MSG - STILL BELOW QUOTA] [FILES a and b DID GET COPIED] $ quota Disk quotas for user infinii (uid 501): Filesystem blocks quota limit grace files quota limit grace /dev/hdc5 14 15 20 14 0 0 $ cp /tmp/1K_FILE c /: warning, user disk quota exceeded [THIS ONE EXPECTED] /: write failed, user disk limit reached. [NOT EXPECTED] $ quota Disk quotas for user infinii (uid 501): Filesystem blocks quota limit grace files quota limit grace /dev/hdc5 15* 15 20 7days 15 0 0 $ cp /tmp/1K_FILE d /: write failed, user disk limit reached. [NOT EXPECTING THIS MSG - EXPECTING WARNING MSG] $ cp /tmp/1K_FILE e /: write failed, user disk limit reached. $ cp /tmp/1K_FILE f /: write failed, user disk limit reached. $ cp /tmp/1K_FILE h /: write failed, user disk limit reached. $ cp /tmp/1K_FILE g /: write failed, user disk limit reached. [FILES c to g DID GET COPIED] $ quota Disk quotas for user infinii (uid 501): Filesystem blocks quota limit grace files quota limit grace /dev/hdc5 20* 15 20 7days 20 0 0 $ cp /tmp/1K_FILE i cp: i: Disc quota exceeded [THIS ONE WAS EXCEPTED] Script done on Tue Nov 24 00:57:52 1998
I used linuxconf to enable user quotas of 15 and 20 as the reporter did. After rewriting fstab, it turned on quotas and ran quotacheck. I then copied a 6 block file to the home directory. When the block count reached 15, I finally got the warning, and got the write error when the count exceeded 20. I could not reproduce the reported behavior. Could it be that you did not run quotaon?
It looks like you didn't follow the original script supplied. From a fresh install of RH5.2. Enable the quota system. Create a test user. Give this test user a block limit of (soft=15/hard=20). The test user should be using about 12 blocks (from a fresh install). Then copy a 1K file to the home directory of the test user and you should see a warning that quota is exceed. Copy another 1K file and this time you will see a warning then an error message but if you list the quota for the user it is still below the soft limit. Why is it reporting warnings/errors. Please follow the script originally supplied. It shows the exact execution trail of what I did and the msgs produced.