Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a configuration in which I want to use a huge amount (1000-10000) of self mounts (mount --bind). My filesystem is ext4 in RAID 1 with two 400GB HDDs.

Basically, what I am trying to do is making files available, that are synchronized from a local servers with low bandwith to the internet, via ftp and eventually a webinterface on top. These files come from many different sources and I found it viable to just chroot my round about 1000 users to individual directories and putting self-mounted reference to the different synchronized paths in them, according to the individuals rights. Symlinks do not work because of the chroot jail. I am using vsftpd.

Is there a performance or any different problem with that?

share|improve this question
I don't think there's anything inherently wrong with it, but can you tell us more about this "exotic configuration"? There's really not enough to work with here in order to give you a good answer. – voretaq7 Feb 8 '11 at 17:28
I did expanded on it a bit. I hope that makes the situation clearer. – HalloDu Feb 8 '11 at 17:37
that's a LOT of bind mounts! – warren Feb 8 '11 at 18:12
Indeed, that's my problem ^^ – HalloDu Feb 8 '11 at 18:21
up vote 1 down vote accepted

I can't think of a better way of accomplishing what you're looking to do (short of rsyncing the data to each directory it should be in -- messy & disk-space intensive.

Performance-wise I doubt this will be an issue, though you may have to tweak /proc/sys/super-max if you run out of slots for mounted filesystems (I'm not sure if --bind takes up a slot in the mounted FS superblocks list or not).

That being said, there are lots of reasons not to use mount --bind, this one being one of my favorites. If a quick google search doesn't turn up any egregiously bad consequences I think you're probably OK doing this, though it's definitely odd and should be extensively documented :)

share|improve this answer
I tried it, and it seems to work fairly well. The directory structure there is entirely managed by a script, so that should not be a problem. – HalloDu Feb 11 '11 at 10:49

If this is being done with FTP, could you not just use the built in /home/$user subsystem that most FTP daemons use? Most popular daemons can do the chroot for you. This would save you from binding on the filesystem level if its only going to need to be enforced via FTP.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.