 |
 |
 |
 |
| Servers & Networking Discuss any Fedora server problems and Networking issues such as dhcp, IP numbers, wlan, modems, etc. |

10th August 2005, 05:52 PM
|
|
Registered User
|
|
Join Date: Jun 2005
Location: Washington D.C. area
Posts: 158

|
|
|
can someone post their /etc/auto.net file?
Hi, I'm trying to mount a remote filesystem via autofs (on FC3), but when I look at /var/log/messages, I keep getting errors from auto.net. I think my auto.net file is messed up. Can someone please post what they use? Alternatively, can someone plese tell me what's wrong with mine? I get an error on the last line of the file (the line that begins with home -fstype), where I'm trying to tell it to mount the directory /home/me that lives on the computer at 128.150.72.58
#!/bin/sh
# $Id: auto.net,v 1.5 2003/09/29 08:22:35 raven Exp $
# Look at what a host is exporting to determine what we can mount.
# This is very simple, but it appears to work surprisingly well
key="$1"
# add "nosymlink" here if you want to suppress symlinking local filesystems
# add "nonstrict" to make it OK for some filesystems to not mount
opts="-fstype=nfs,hard,intr,nodev,nosuid"
# Showmount comes in a number of names and varieties. "showmount" is
# typically an older version which accepts the '--no-headers' flag
# but ignores it. "kshowmount" is the newer version installed with knfsd,
# which both accepts and acts on the '--no-headers' flag.
#SHOWMOUNT="kshowmount --no-headers -e $key"
#SHOWMOUNT="showmount -e $key | tail +2"
# Newer distributions get this right
SHOWMOUNT="/usr/sbin/showmount --no-headers -e $key"
$SHOWMOUNT | sort +0 | \
awk -v key="$key" -v opts="$opts" -- '
BEGIN { ORS=""; first=1 }
{ if (first) { print opts; first=0 }; print " \\\n\t" $1, key ":" $1 }
END { if (!first) print "\n"; else exit 1 }'
home -fstype=nfs,rw,hard,intr 128.150.72.58:/home/me Thanks,
Derek
|

10th August 2005, 05:56 PM
|
 |
Registered User
|
|
Join Date: May 2004
Posts: 206

|
|
mine
Code:
#!/bin/bash
# $Id: auto.net,v 1.8 2005/04/05 13:02:09 raven Exp $
# This file must be executable to work! chmod 755!
# Look at what a host is exporting to determine what we can mount.
# This is very simple, but it appears to work surprisingly well
key="$1"
# add "nosymlink" here if you want to suppress symlinking local filesystems
# add "nonstrict" to make it OK for some filesystems to not mount
opts="-fstype=nfs,hard,intr,nodev,nosuid"
# Showmount comes in a number of names and varieties. "showmount" is
# typically an older version which accepts the '--no-headers' flag
# but ignores it. "kshowmount" is the newer version installed with knfsd,
# which both accepts and acts on the '--no-headers' flag.
#SHOWMOUNT="kshowmount --no-headers -e $key"
#SHOWMOUNT="showmount -e $key | tail -n +2"
for P in /bin /sbin /usr/bin /usr/sbin
do
for M in showmount kshowmount
do
if [ -x $P/$M ]
then
SMNT=$P/$M
break
fi
done
done
[ -x $SMNT ] || exit 1
# Newer distributions get this right
SHOWMOUNT="$SMNT --no-headers -e $key"
$SHOWMOUNT | LC_ALL=C sort +0 | \
awk -v key="$key" -v opts="$opts" -- '
BEGIN { ORS=""; first=1 }
{ if (first) { print opts; first=0 }; print " \\\n\t" $1, key ": " $1 }
END { if (!first) print "\n"; else exit 1 }
'
__________________
athlon 64 3700+ san diego | asus a8n5x | x1900xt | 1GB
Compaq Presario R3000 (DP533AV) | Athlon XP-M 2800+ | 512MB | 54g WLAN | Geforce4 MX 420 Go 32M | 40GB | 15.4" WXGA
|

10th August 2005, 05:58 PM
|
|
Registered User
|
|
Join Date: May 2005
Location: London, UK
Posts: 704

|
|
|
Derek,
auto.net is not a regular automounter map, it's used for mounting /net/<hostname> automagically. Use auto.misc instead and make sure it's uncommented in auto.master.
C.
|

10th August 2005, 06:09 PM
|
|
Registered User
|
|
Join Date: Jun 2005
Location: Washington D.C. area
Posts: 158

|
|
Thanks Heon.
to fsck, thanks for the advice. Yeah, I'm trying to mount desktop files on my laptop, and thought autofs was the way to go. I'm a total newbie with respect to networking, and I've been following the instructions in http://forums.fedoraforum.org/forum/...ad.php?t=64680 by kosmosik, but it's not yet working. It's clear the last line of my file is wrong, but I'm not sure why.
|

10th August 2005, 06:14 PM
|
|
Registered User
|
|
Join Date: May 2005
Location: London, UK
Posts: 704

|
|
|
That file is a shell script, not a mounter map file. If you put automounter lines in it you'll get all sorts of errors about "home: command not found" or suchlike.
Take the line out of auto.net, and put it in auto.misc. Then edit auto.master and make sure the auto.misc line does not begin with a #. Then restart the automounter (service autofs condrestart), cd to /misc/home and you should be away.
Also, check the autofs service is set to start on boot (chkconfig --list autofs).
C.
|

10th August 2005, 06:18 PM
|
|
Registered User
|
|
Join Date: Nov 2004
Location: São Paulo, Brazil
Age: 42
Posts: 112

|
|
|
That's mine:
#!/bin/bash
# $Id: auto.net,v 1.8 2005/04/05 13:02:09 raven Exp $
# This file must be executable to work! chmod 755!
# Look at what a host is exporting to determine what we can mount.
# This is very simple, but it appears to work surprisingly well
key="$1"
# add "nosymlink" here if you want to suppress symlinking local filesystems
# add "nonstrict" to make it OK for some filesystems to not mount
opts="-fstype=nfs,hard,intr,nodev,nosuid"
# Showmount comes in a number of names and varieties. "showmount" is
# typically an older version which accepts the '--no-headers' flag
# but ignores it. "kshowmount" is the newer version installed with knfsd,
# which both accepts and acts on the '--no-headers' flag.
#SHOWMOUNT="kshowmount --no-headers -e $key"
#SHOWMOUNT="showmount -e $key | tail -n +2"
for P in /bin /sbin /usr/bin /usr/sbin
do
for M in showmount kshowmount
do
if [ -x $P/$M ]
then
SMNT=$P/$M
break
fi
done
done
[ -x $SMNT ] || exit 1
# Newer distributions get this right
SHOWMOUNT="$SMNT --no-headers -e $key"
$SHOWMOUNT | LC_ALL=C sort +0 | \
awk -v key="$key" -v opts="$opts" -- '
BEGIN { ORS=""; first=1 }
{ if (first) { print opts; first=0 }; print " \\\n\t" $1, key ":" $1 }
END { if (!first) print "\n"; else exit 1 }
'
|

10th August 2005, 06:58 PM
|
|
Registered User
|
|
Join Date: Jun 2005
Location: Washington D.C. area
Posts: 158

|
|
I'm starting to see now. Thanks marcos and especially fsck. It looks like the directions I followed did things in an odd way. I've fixed auto.misc, auto.net, and auto.master, and it seems they are working fine. But it looks like I still have an issue. When I try and cd to /misc/home, nothing's there. /var/log/messages shows:
Code:
Aug 10 13:47:15 dereklaptop automount[9952]: >> mount to NFS server '128.150.72.58' failed: server is down.
Aug 10 13:47:15 dereklaptop automount[9952]: mount(nfs): nfs: mount failure 128.150.72.58:/home/derek on /misc/home
Aug 10 13:47:15 dereklaptop automount[9952]: failed to mount /misc/home
/etc/exports on the server says:
Code:
/home/derek/ 128.150.72.*(rw,sync,no_root_squash)
and /usr/sbin/exportfs says:
Code:
/home/derek 128.150.72.*
I've checked and the nfs service is running on both machines, and neither machine has anything in the hosts.deny file. I think I'm getting close, but I'm not sure what to do next. Can anyone help?
|

10th August 2005, 07:05 PM
|
|
Registered User
|
|
Join Date: May 2005
Location: London, UK
Posts: 704

|
|
|
You might well be in the realm of selinux or the firewall settings now, I suggest they would be the next place to look. Check out system-config-securitylevel.
|

10th August 2005, 07:32 PM
|
|
Registered User
|
|
Join Date: Jun 2005
Location: Washington D.C. area
Posts: 158

|
|
|
Thanks fsck. Your posts have been very helpful.
|

10th August 2005, 07:34 PM
|
|
Registered User
|
|
Join Date: May 2005
Location: London, UK
Posts: 704

|
|
No problem  Let us know how you get on.
|

10th August 2005, 08:00 PM
|
|
Registered User
|
|
Join Date: Jun 2005
Location: Washington D.C. area
Posts: 158

|
|
|
I fixed the problem. Turns out I had to change the line in /etc/exports from this:
/home/derek/ 128.150.72.0(rw,synch,no_root_squash)
to this:
/home/derek 128.150.72.0/24(rw,synch,no_root_squash)
I'm not sure what was wrong with the previous statement, but am a happy camper now. Thanks again to everyone.
|

10th August 2005, 08:30 PM
|
|
Registered User
|
|
Join Date: May 2005
Location: London, UK
Posts: 704

|
|
|
Ah. The first was a specific IP, the second allows a range of IP addresses to connect. In this case, anything on the 128.150.72.x subnet.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 11:59 (Thursday, 20-06-2013)
|
|
 |
 |
 |
 |
|
|