LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-16-2004, 11:20 AM   #1
Etraman
LQ Newbie
 
Registered: Dec 2004
Distribution: Slackware 10
Posts: 11

Rep: Reputation: 0
Multiple mount --bind's to 1 mount point ?


Hi,

Recently i took the step to use Linux and after some reading i went for Slack. And i like it.

Now i try to set up ProFTP and i ran into a problem.

situation:

#ls /mnt/harddiskE
dir1 dir2

#ls /mnt/harddiskG
dir3 dir4

I'd like to mount all of the above to /home/ftp. Since FTP users are chrooted into this dir the only way i found to mount the above dir's into /home/ftp is by using:
# mount --bind /mnt/harddiskE /home/ftp
# mount --bind /mnt/harddiskG /home/ftp

That's nice, but it doesn't work. It seems that the latter mount supersedes the first so only dir3 and dir4 are accessible on the FTP. Only when i umount /mnt/harddiskG the first 2 dir's are accessible.

So, is there a way to mount all 4 dir's to /home/ftp ? I'd like to see:
# ls /home/ftp
dir1 dir2 dir3 dir4

Hope someone can help me out here.

tia,
Etraman

edit: typo

Last edited by Etraman; 12-16-2004 at 11:33 AM.
 
Old 12-16-2004, 12:07 PM   #2
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 244Reputation: 244Reputation: 244
Did you try symlinks ?

ln -s /mnt/harddiskE /home/ftp/harddiskE
ln -s /mnt/harddiskG /home/ftp/harddiskG
 
Old 12-16-2004, 12:37 PM   #3
Etraman
LQ Newbie
 
Registered: Dec 2004
Distribution: Slackware 10
Posts: 11

Original Poster
Rep: Reputation: 0
Thnx for your reply.

Yes i tried symlinking but that doesnt work because the mountpoint is on an other disk ànd the FTP users are chrooted in their home directory /home/ftp.
So the symlinked dir's are visible for the FTP clients but they are not accessible.
Besides that; symlinking does not give me the desired tree structure in the FTP:

# ln -s /mnt/harddiskE /home/ftp/
# ln -s /mnt/harddiskG /home/ftp/
# ls /home/ftp
harddiskE harddiskG

ofcourse i could use
# mount --bind /mnt/harddiskE /home/ftp/pub1
# mount --bind /mnt/harddiskG /home/ftp/pub2

which gives me
# ls /home/ftp
pub1 pub2
# ls pub1
dir1 dir2
#ls pub2
dir3 dir4

But that's not what i'd like to see.

It's too bad ProFTP doesn't have an implemented Virtual Directories thingy (it really doesnt, does it?) because that would sure save me some hassle.
 
Old 12-20-2004, 09:14 AM   #4
Etraman
LQ Newbie
 
Registered: Dec 2004
Distribution: Slackware 10
Posts: 11

Original Poster
Rep: Reputation: 0
Isn't there anybody here who could help me out ?

Perhaps sombody could point me to an FTP server that is capable of handling complex virtual directories then ?

Thnx again.
 
Old 12-20-2004, 02:03 PM   #5
killerbob
Member
 
Registered: Oct 2004
Location: Ottawa, ON
Distribution: Slackware
Posts: 662

Rep: Reputation: 31
Why not use symlinks?

mount /mnt/harddiskE
mount /mnt/harddiskG
ln -s /mnt/harddiskE/dir1 /home/ftp/pub/dir1
ln -s /mnt/harddiskE/dir2 /home/ftp/pub/dir2
ln -s /mnt/harddiskG/dir3 /home/ftp/pub/dir3
ln -s /mnt/harddiskG/dir4 /home/ftp/pub/dir4

If there's a bunch of links, you can do it with scripting. But you'll only have to create the symlinks once. They'll still be there when you unmount the hard disks. I'm afraid that other than that, you won't be able to mount two directories in the same place.



I also know that, in Windows, I've used GuildFTPd on my laptop to let people who couldn't figure out Samba download files at a lan party.
 
Old 12-21-2004, 06:25 AM   #6
Etraman
LQ Newbie
 
Registered: Dec 2004
Distribution: Slackware 10
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by killerbob
Why not use symlinks?
As said before, symlinking doesnt seem to work because the FTP users are chrooted in /home/ftp and the symlinks are outside this chroot. Maybe there is a way to make those symlinks accessible but i don't know how to.

Quote:
Originally posted by killerbob
mount /mnt/harddiskE
mount /mnt/harddiskG
ln -s /mnt/harddiskE/dir1 /home/ftp/pub/dir1
ln -s /mnt/harddiskE/dir2 /home/ftp/pub/dir2
ln -s /mnt/harddiskG/dir3 /home/ftp/pub/dir3
ln -s /mnt/harddiskG/dir4 /home/ftp/pub/dir4

If there's a bunch of links, you can do it with scripting. But you'll only have to create the symlinks once. They'll still be there when you unmount the hard disks.
By editing /etc/fstab it's possible to make the mount --bind's as permanent as symlinks are:

# cat /etc/fstab |grep bind
/mnt/harddiskE/Server/ServDown /home/ftp/pub0 none bind 0 0
/mnt/harddiskG/Server/ServDown /home/ftp/pub1 none bind 0 0
/mnt/harddiskA7/Server/ServDown /home/ftp/pub2 none bind 0 0

Quote:
Originally posted by killerbob
I'm afraid that other than that, you won't be able to mount two directories in the same place.
Allright then; i guess i'll take it for granted for now.


Quote:
Originally posted by killerbob
I also know that, in Windows, I've used GuildFTPd on my laptop to let people who couldn't figure out Samba download files at a lan party.
I've always used Serv-U on my windows box. Serv-U does a great job when it comes to virtual directories. I'm on the look-out for a linux FTP server that does the same.


Thnx for the replies !
 
Old 12-23-2004, 07:18 PM   #7
liber8ate
LQ Newbie
 
Registered: Dec 2004
Location: Colorado, USA
Distribution: Gentoo
Posts: 2

Rep: Reputation: 0
You can make one large 'psuedo' drive from many (both IDE or SCSI or both) by using either RAID 0 or RAID linear.
Im not too sure what the difference between the two (0 and linear) is, but I would guess that your best bet is RAID 0.
If you don't have the RAID hardware, you can do software RAID (quite easily too).
Check out: http://www.tldp.org/HOWTO/Software-RAID-HOWTO.html
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to give not-root user ability to mount devices to any mount point??? jdupre Linux - General 8 02-04-2012 10:03 AM
Mount problem - device already mounted or mount point busy zahoo Linux - General 7 08-28-2009 05:02 PM
samba mount when not owner of mount point cotton213 Linux - General 1 08-04-2005 06:21 AM
One mount point, multiple filesystems - how? hellwyn Linux - Hardware 4 02-15-2005 04:15 PM
Multiple devices on the same mount point Knotz Linux - Hardware 3 05-15-2003 03:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration