LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-14-2006, 11:03 AM   #1
Rufus330Ci
Member
 
Registered: Aug 2002
Location: PA
Distribution: Mandrake Linux v10.2, RHEL3u8, RHEL4u4 & RHEL5 Client Beta2 for desktop
Posts: 59

Rep: Reputation: 15
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.

[root@rufusland etc]# cat fstab
/dev/hda1 / ext3 defaults 1 1
/dev/hda6 /home ext3 defaults 1 2
//comp2400/G\040DVD\040DRIVE /mnt/COMP2400\040DVD\040drive smbfs credentials=/etc/samba/auth.comp2400.administrator 0 0
//comp2400/E\040MP3\040Archive /mnt/COMP2400\040MP3\040Archive smbfs credentials=/etc/samba/auth.comp2400.administrator 0 0
//comp2400/STORAGE\040(D) /mnt/COMP2400\040Storage smbfs credentials=/etc/samba/auth.comp2400.administrator 0 0
//comp2400/E\040MP3\040Archive /var/www/html/wimpy/mp3 smbfs credentials=/etc/samba/auth.comp2400.administrator 0 0
//comp2400/STORAGE\040(D)/Pictures /var/www/html/e107_plugins/autogallery/Gallery smbfs credentials=/etc/samba/auth.comp2400.administrator 0 0
/dev/hdc /mnt/cdrom auto user,iocharset=iso8859-1,codepage=850,noauto,ro,exec,users 0 0
/dev/fd0 /mnt/floppy auto user,iocharset=iso8859-1,sync,codepage=850,noauto,exec,users 0 0
none /proc proc defaults 0 0
/dev/hda5 swap swap defaults 0 0

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.

--- Justin
 
Old 02-15-2006, 04:23 AM   #2
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
Quote:
Do I have to put them in a certain order?
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...
 
Old 02-15-2006, 08:45 AM   #3
Rufus330Ci
Member
 
Registered: Aug 2002
Location: PA
Distribution: Mandrake Linux v10.2, RHEL3u8, RHEL4u4 & RHEL5 Client Beta2 for desktop
Posts: 59

Original Poster
Rep: Reputation: 15
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.
 
Old 02-15-2006, 01:20 PM   #4
Rufus330Ci
Member
 
Registered: Aug 2002
Location: PA
Distribution: Mandrake Linux v10.2, RHEL3u8, RHEL4u4 & RHEL5 Client Beta2 for desktop
Posts: 59

Original Poster
Rep: Reputation: 15
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.
 
  


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
fstab problem: mount: can't find dvd in /etc/fstab or /etc/mtab Nikon01 Slackware 5 11-17-2006 06:15 AM
problems with smbfs mount-point in /etc/fstab - "mount -a" works, but not at boottime MarkSide Linux - Software 4 11-20-2005 03:30 PM
mount:not a directory. Suse dvd mount problem tzanis Linux - General 8 11-06-2005 11:30 AM
Preserving directory tree structure /etc/fstab Hikito Linux - Newbie 1 09-11-2004 04:07 PM
Why a FSTAB entry will mount using -a switch but will not mount automatically at boot mjen Linux - Newbie 3 05-19-2004 07:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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