LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   automount vs fstab (http://www.linuxquestions.org/questions/linux-networking-3/automount-vs-fstab-215493/)

Walter Sobchek 08-09-2004 03:48 PM

automount vs fstab
 
How do I configure Machine1 to auto mount /mydir from Machine2? Or, what should the fstab look like?

Should I use the automount or fstab?

I'm using Fedora Core 2.

ToniT 08-09-2004 04:47 PM

Code:

machine2:/mydir /mydirfrommach2 nfs auto  0      0

Walter Sobchek 08-10-2004 09:04 AM

Doc:/home3 /home3 nfs auto,rw 0 0

This is exactly how my fstab looks and it still won't mount at bootup.

Walter Sobchek 08-10-2004 09:34 AM

During bootup when it tries to mount nfs filesystems it pauses and then returns "can't get address for Doc" and fails. Yet once the machine is up and running I can do a mount -a, it reads the fstab and mounts Doc:/home3. I am confused...

Cedrik 08-10-2004 10:16 AM

You have to put the IP of the machine named 'Doc' in your fstab, say it is 10.0.0.1, try :

10.0.0.1:/home3 /home3 nfs auto,rsize=8192,wsize=8192,rw 0 0

I added rsize=8192 and wsize=8192 to accelerate file transfer rate, feel free to remove them

Walter Sobchek 08-10-2004 02:36 PM

I used the fully qualified name instead and it worked... with one exception. The first nfs mount won't mount, the rest do. Here's a copy of my fstab:

[root@Bubba etc]# more fstab
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /dev/shm tmpfs defaults 0 0
none /proc proc defaults 0 0
none /sys sysfs defaults 0 0
/dev/hda2 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
Doc.dville.com:/home3 /home3 nfs auto,rw 0 0
Doc.dville.com:/home3/pres /pres nfs auto,rw 0 0
Doc.dville.com:/red /red nfs auto,rw 0 0

/home3/pres and /red will mount on bootup but, /home3 will not. What the frag?

ToniT 08-10-2004 02:44 PM

Does the mountpoint exist? Is there any errors in dmesg or syslog?
Is your /etc/exports on the server ok? Does it mount afterwards when you say
"mount /home3"?

Walter Sobchek 08-10-2004 04:02 PM

Yes. No. Yes. Yes.

ToniT 08-10-2004 07:23 PM

Very strange indeed.

If you permutate the order of the mounts in fstab, is it still the /home3 that is not mounted, or is it the first one that doesn't get mounted?

Walter Sobchek 08-11-2004 11:01 AM

Just the first one... whatever it may be.

Walter Sobchek 08-16-2004 09:23 AM

The workaround is to copy the first line.

server:/dir1 /dir1 nfs auto 0 0
server:/dir1 /dir1 nfs auto 0 0
server:/dir2 /dir2 nfs auto 0 0
server:/dir3 /dir3 nfs auto 0 0

With it written this way it mounts dir1 on bootup. Still don't know why though.


All times are GMT -5. The time now is 03:43 AM.