Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Mandrake Linux v10.2, RHEL3u8, RHEL4u4 & RHEL5 Client Beta2 for desktop
Posts: 59
Rep:
Fstab not taking a mount of a sub directory?
Hello again guys,
I seem to be hitting a brick wall on this one. I normally issue 2 mount --bind commands everytime I reboot my box and I thought I'd put it in /etc/fstab instead of 'manual labor'. Anyways the mount of a drive to 2 locations works just fine. I thought I would have been able to well actually you know what let me print some actual code out here because explaining it in words is confusing.
ok as you can see I'm mounting DVD drive, MP3 folder, and a Storage (D) folder remotely. Now I had a bind mount of the MP3 to my wimpy folder but that didn't work so I made it like above as a normal mount and that works, but MTAB and of course /autogallery/Gallery is empty it didn't mount... is that because I'm trying to reference a "subdirectory" Pictures of a filesystem that is getting mounted in this fstab? Do I have to put them in a certain order? I was trying to make this automated. I know the mount point and remote point exist because I type:
mount --bind /mnt/COMP2400\ Storage/Pictures /var/www/html/e107_plugins/autogallery/Gallery and it mounts...
If you guys have any idea how to do this or maybe I need to run a script on bootup, but I'm sure there is a reason this isn't working.
Thanks in advance, and if anything doesn't make sense or need more explaination please let me know.
Yes. You need to mount a directory before you mount a subdirectory...
I don't use samba, so I am unsure of this notation:
Code:
/mnt/COMP2400\040DVD\040drive
but I can tell you if this is your linux mountpoint it is invalid. The '\' character cannot be used as a path separator in UNIX, as it is a special delimiter. You must change the '\' to '/', and you must also manually create the /mnt/COMP2400/040DVD/040drive directories before you can mount anything to them...
Distribution: Mandrake Linux v10.2, RHEL3u8, RHEL4u4 & RHEL5 Client Beta2 for desktop
Posts: 59
Original Poster
Rep:
Quote:
Originally Posted by bulliver
Yes. You need to mount a directory before you mount a subdirectory...
The order I used seems to be correct if it starts from top to bottom. The only reused subdirectory is Storage and I mount the subdirectory Pictures 2 mounts below the main directory.
Quote:
Originally Posted by bulliver
I don't use samba, so I am unsure of this notation:
Code:
/mnt/COMP2400\040DVD\040drive
but I can tell you if this is your linux mountpoint it is invalid. The '\' character cannot be used as a path separator in UNIX, as it is a special delimiter. You must change the '\' to '/', and you must also manually create the /mnt/COMP2400/040DVD/040drive directories before you can mount anything to them...
The COMP2400 is a remote PC sorry if i forgot to mention that. Also the \040 is designated as a space when mounting. I'm was going to change them to Storage_(D) and DVD_Drive but the mounting seems to work using this notation in fstab. I haven't tried "mnt/COMP2400\ DVD\ drive" in fstab but from testing it does work at a prompt suprisingly. You did give a good point though stating the directories must be created first... I might try creating the subdirectory /Pictures inside of my COMP2400 Storage directory on the linux box and then let the subdirectory tree on the windows box put its Picture files into that directory in turn being created before the mount of the root directory was mounted in stab. I wonder if it will flag off to test it. If you think of anything else let me know.
Distribution: Mandrake Linux v10.2, RHEL3u8, RHEL4u4 & RHEL5 Client Beta2 for desktop
Posts: 59
Original Poster
Rep:
Actually I just figured something out here... I can't display these pictures on my site without setting them 777 and I don't really wanna give that kind of access to my personal files. So what I did was copy the 5618 pictures over to my /home/lid1111/Pictures folder and set chmod'd them 777 and then added this line to fstab: /home/lid1111/Pictures /var/www/html/e107_plugins/autogallery/Gallery none rw bind 0 0
Worked like a champ plus my files are nice and safe if someone wipes my files or changes them I got the original on the windows box.
I never did try the creation of the subdirectory a good lesson if anyone wants to see if that was the problem. Thanks again for your help bulliver.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.