Quota Workaround?
Well now I discover that in order to setup quotas, the program needs the ability to unmount the user partition to do its thing. I think that's a bit extreme for what I need, and I certainly don't wish to have to reformat my disks to set this up, considering I finally got all my software working correctly.
So I was wondering if this might could be used as a workaround: use loopback filesystems. For example,
dd if=/dev/zero of=/home/USER.img bs=1024 count=102400
mkfs.ext3 /home/USER.img
mount -o loop /home/USER.img /home/USER
Of course I'd probably allocate a little more space than what's promised to the user since part of that is eaten up from the formatting, and possibly store the image files elsewhere, but theoretically, I can't see a problem with this. Is there something I'm missing? It seems to be a perfect way to limit how much space a user is allowed to work in without going to all the trouble of setting up quotas.
7 Replies
It's all resized now and running like a charm with the new /home. Now to figure out quotas.
And thanks!
$.02
-tiz
All you have to do is change the approproate settings at /etc/fstab, install appropriate binaries (apt-get install quota) and reboot - most distros during reboot check for quota-enabled partitions and enable them.
@saman007uk:
For enabling quotas, you don't need to cretae or hcnage any partitions.
All you have to do is change the approproate settings at /etc/fstab, install appropriate binaries (apt-get install quota) and reboot - most distros during reboot check for quota-enabled partitions and enable them.
Would this command work after doing the other stuff?
# mount -o rw,remount,usrquota /home
(adjust filesystem name as needed; also add grpquota if needed.)
Might save a reboot if it does the trick.