[Techtalk] NFS

Conor Daly conor.daly at oceanfree.net
Wed Feb 5 01:27:30 EST 2003


On Tue, Feb 04, 2003 at 04:31:56PM -0600 or so it is rumoured hereabouts, 
Gretchen thought:
> Right now I'm running Linux on both my laptop and desktop (SUSE 8.1)  Things 
> are going swimmingly and last night I started sharing files with NFS.  It 
> works slick because right now I don't need to connect to Windows at all.  I 
> haven't started Samba yet.  Anyway, I also use my laptop at school and when I 
> start the computer up there, it looks and looks for the NFS share which isn't 
> there because it's on my network at home.
> 
> I've edited the /etc/fstab to time out as soon as possible with options I 
> found in man nfs.  However it still takes about five minutes for my computer 
> to start up if it can't find my desktop and that isn't acceptable for a 
> laptop I start up and shut down a few times a day.

You could set the NFS mount to "noauto" in /etc/fstab.  You'll need to set
it to "user" also so you can mount it without being root.  You can model
the line in /etc/fstab on the CDROM line.  Mine looks like:

/dev/cdrom		/mnt/cdrom	iso9660 noauto,user,exec,ro 0 0
                                                ^^^^^^^^^^^

noauto	-> doesn't get mounted at boot time
user	-> don't need to be root to mount

Then, when at home, you do 'mount /your/mount/point' to mount the NFS
directory and at school, you do nothing[0]....

> In the start up sequence, the ip addess is assigned
 
Is the ip address assigned by DHCP or hard coded?  If it's DHCP, that will
also contribute to the boot delay.  If you _do_ use DHCP, you can set the
interface to _not_ come up at boot time and manually start it when at
home.  If you add the following line to
/etc/sysconfig/network-scripts/ifcfg-eth0

USERCTL="yes"

then a non-root user can do 

/sbin/ifup eth0

to bring up the interface.  Mind you, /etc/sysconfig/network-scripts is a
RedHatism as I undestand it so the USERCTL= option may not be available...

Conor

[0] about the NFS mount that is.  I presume you _do_ study.  :-)
-- 
Conor Daly <conor.daly at oceanfree.net>

Domestic Sysadmin :-)
---------------------
Faenor.cod.ie
 11:57pm  up 91 days,  8:41,  0 users,  load average: 0.00, 0.00, 0.00
Hobbiton.cod.ie
 11:54pm  up 41 days, 31 min,  4 users,  load average: 0.03, 0.04, 0.01



More information about the Techtalk mailing list