LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-18-2013, 12:55 PM   #1
sandygws
LQ Newbie
 
Registered: Nov 2009
Location: London, UK
Posts: 11

Rep: Reputation: 0
Need help with a mount --bind problem ...


Hi all

Running Debian 7 x264 with a pair of HDDs, I have mounted /dev/md127 to /disk2 as follows:

Quote:
/dev/md127 3.6T 197M 3.6T 1% /disk2
That works fine.


But when I try and mount --bind /home/ftpusers/user1/incoming to /disk2/ftp it mounts as follows:

Quote:
/dev/root 20G 1.1G 18G 6% /disk2/ftp
ie it seems to mount the whole 'home' folder on disk2!

'/home/ftpusers/user1/incoming' is a chrooted folder for Pure-FTPD users

What am I doing wrong?

Last edited by sandygws; 09-18-2013 at 12:56 PM. Reason: More info added
 
Old 09-19-2013, 05:59 AM   #2
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
not sure you are doing anything wrong

I get the same kind of output in df -ah

if you look in /disk2/ftp what do you see?
for me I see what I expected to see, the files that were in the dir I bind mounted.

Last edited by Firerat; 09-19-2013 at 06:00 AM.
 
Old 09-19-2013, 10:09 AM   #3
sandygws
LQ Newbie
 
Registered: Nov 2009
Location: London, UK
Posts: 11

Original Poster
Rep: Reputation: 0
Yes, but the thing I don't understand is why the 'mount' is only 18GB - the same size as 'home'

Surely if I'm mounting the folder to '/disk2/ftp' then it should be the same size as /disk2/ftp?

ie 3.6T and not 18GB

Or not?
 
Old 09-19-2013, 10:19 AM   #4
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
nope....

the filesystem is still on /home, and is still constrained by the space available in /home

it is now just available in on two different mountpoints at the same time.
 
Old 09-19-2013, 10:33 AM   #5
sandygws
LQ Newbie
 
Registered: Nov 2009
Location: London, UK
Posts: 11

Original Poster
Rep: Reputation: 0
Ahh, I see

Other than pointing a users /ftp/home folder to /disk2/ftp and the 3.6TB of free space, is there any other way?
 
Old 09-19-2013, 10:43 AM   #6
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
if you want them to have access to the 3.6TB space, then do it the other way round

i.e.

Code:
mount --bind /disk2/ftp/user1/incoming /home/ftpusers/user1/incoming
but I can't help thinking you need something a little more involved , like volume groups with quotas
https://wiki.debian.org/LVM
 
Old 09-19-2013, 11:38 AM   #7
sandygws
LQ Newbie
 
Registered: Nov 2009
Location: London, UK
Posts: 11

Original Poster
Rep: Reputation: 0
Wow, thanks. I didn't know that would work

Can you suggest the correct fstab entry for the above bind?

Last edited by sandygws; 09-19-2013 at 11:39 AM.
 
Old 09-19-2013, 11:57 AM   #8
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
Code:
/disk2/ftp/user1/incoming /home/ftpusers/user1/incoming auto bind 0 0
But honestly, you should be looking at something more sophisticated/robust, like LVM and mount direct

the fstab line is a little 'hacky' , I don't think you will find it in "man fstab"
 
Old 09-19-2013, 12:10 PM   #9
sandygws
LQ Newbie
 
Registered: Nov 2009
Location: London, UK
Posts: 11

Original Poster
Rep: Reputation: 0
I'm looking for the most robust solution to keep that 3.6TB mounted/available permanently

What would you suggest?
 
  


Reply

Tags
bind, debian, mount



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Vsftp ntfs --bind mount problem ¿F M J¿ Linux - Newbie 1 08-29-2008 12:26 AM
Bind problem: config files are missing after re-install bind 9.5 on Fedora Core 8 elvisious Linux - Software 1 07-15-2008 07:49 PM
Mount --bind & NFS problem BerlinBadger Linux - Networking 2 12-02-2005 12:25 PM
mount --bind (fstab problem) renski Linux - General 2 11-17-2005 03:50 PM
Multiple mount --bind's to 1 mount point ? Etraman Slackware 6 12-23-2004 07:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:02 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