1

I have some problem when I'm trying to allocate disk limit for user in Ubuntu Desktop 12.04 LTS system. I use edquota to specify the amount of disk space for user after edit fstab file. Here are some questions I'm confusing.

I have enabled disk quota in the "/" inside fstab file. The problem is when I use the command sudo repquota -a, you can see that the block size of my test2 user is 48928 KB

enter image description here

Let's compare the total amount of disk space of test2 user by issuing the command

sudo du -hc /home/test2

enter image description here

See what? The du command calculated the whole test2's home directory only 2MB. So why repquota calculates that much? 48MB.

By the way, How can I config the disk limit for user's home directory only? Is that useful? Because users only have permission of thier home directory. But I just want to know if it can be done.

1
  • Could you ask your last question in another question?
    – Braiam
    Aug 28, 2013 at 22:47

1 Answer 1

1

Because when you use du -hc /home/test2, as you can see you don't have permission access at some files from /home/test2. Use:

sudo du -hc /home/test2

as you used for repquota -a.

Also, if you used -h (--human-readable) for du you should use -s (--human-readable) for repquota. See man du and man repquota for more info.

5
  • I edited! But just only 2MB after calculation. Still confusing very much X_X Aug 28, 2013 at 11:24
  • 1
    @GeorgeLuong What about sudo repquota -as? If you used -h (--human-readable) for du you should use -s (--human-readable) for repquota. See man du and man repquota for more info. Aug 28, 2013 at 11:34
  • Hey! I found that, for example, If you put a 10MB file to the home folder of any user, the repquota will double that file's size! In this case, 20MB. But when I delete that file, empty the trash. rep only clear 10MB of the calculation... If you have time, you must check it down. The du command works fine. I tested. Aug 28, 2013 at 12:18
  • @GeorgeLuong that sounds like a bug in repquota...
    – Braiam
    Aug 28, 2013 at 22:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .