Quotas and bind mounts

yorn

Verified User
Joined
Apr 24, 2006
Messages
17
In my new server setup I have one big /mnt partition that holds the following directories:
  • backup
  • home (/home)
  • html (/var/www/html)
  • mail (/var/spool/mail)
  • mysql (/var/lib/mysql)
  • named (/var/named)

All these directories are linked to directories elsewhere using bind mounts, as I figured symlinks sometimes cause trouble. The /mnt partition is chmodded 700 and chowned by 0:0, so users cannot enter. This renders it even impossible to use symlinks.
Now the bind mounts work perfectly, except for one thing. Quotas. When I make/modify an account I get
Error with system Quotas
setquota: Mountpoint (or device) /home not found. setquota: Not all specified mountpoints are using quota.
I hardlinked /mnt/aquota.* to /mnt/home but still no luck. Can I make quotas work this way?
 
Since you didn't say which OS you use, I can only be general:

No, because quotas work on the partition level.

What does the contents of your /etc/fstab file look like?

Jeff
 
Sorry I forgot to mention the OS, I mentioned it so often in another thread that I felt it was obvious, which it wasn't of course.
It's Fedora Core 7

My fstab looks like this

Code:
/dev/sda2               /                       ext3    defaults,usrquota,grpquota      1 1
/dev/sda1               /boot                   ext2    defaults        1 2
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
tmpfs                   /tmp                    tmpfs   defaults        0 0
/dev/sda3               swap                    swap    defaults        0 0
/dev/sda4               /mnt                    ext3    defaults,usrquota,grpquota      1 2

/mnt/home               /home                   auto    bind            0 0
/mnt/mysql              /var/lib/mysql          auto    bind            0 0
/mnt/mail               /var/spool/mail         auto    bind            0 0
/mnt/named              /var/named              auto    bind            0 0
/mnt/html               /var/www/html           auto    bind            0 0
/mnt/log                /var/log                auto    bind            0 0
As you see /home actually lives in /mnt/home and /mnt has quotas enabled, and so has /. softlinking is not an option because I've had much problems with it on another server (Fedora as well, no DirectAdmin though), and bind mounts are tested for 3 years by me now, and found to be stable.
 
Last edited:
My guess is that it's something DA doesn't expect. You might want to contact DA support.

Jeff
 
The reply I got was
Hello,

In your /usr/local/directadmin/conf/directadmin.conf file, set:

quota_partition=/mnt

I'm not quite sure if that will break anything in that format as I've never seen it setup that way.. but it would be only real option at this point.
This did the trick
 
Based on what you tell us is mounted in /mnt, this should work fine for you.

Jeff
 
I have similar problem.

I'm using my own dedicated box with Debian.
I tried everything as instructed by the tutorial help. Still not working.

My fstab:
Code:
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
/dev/sda1       /               ext3    rw,usrquota,grpquota 0       1
/dev/sda2       none            swap    sw              0       0
/dev/hda        /media/cdrom0   udf,iso9660 user,noauto     0       0
 
Back
Top