[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: nfs woes



> 
> I have a diskless workstation setup (which I had working fine) and am
> having trouble incorporating 100Mbps NICs into the picture.
> 
> I have 10Mbps NICs and 100Mbps NICs, but netboot and etherboot only
> support the 10Mbps NICs I have.
> 
> However there are ways around this - just have the workstation use the
> 10Mbps NIC to get an IP, grab its kernel, mount root via NFS and begin
> booting.  While booting, it configures its 100Mbps NIC and remounts root
> over the 100Mbps line.

Are you trying to get a second IP assigned when the 100mbps card comes
up or are you using the same IP? The same IP won't work because dhcp
grabs NIC MAC addresses, so you must use a different IP for each card.

> The problem is that when trying to mount root via the 100Mbps line I keep
> getting permission denied error messages.  So it is failing at literally
> the very last step.

Check the network names and hosts and exports.

> here are the relevant details:
> 
> The network is setup such the 10Mbps and 100Mbps networks are entirely
> sepparate.  Physically, there are no connectiosn between the two, and it
> is configured so that 192.168.0.* is 10Mbps and 192.168.1.* is 100Mbps.
> 
> ----------------------------------------------------
> Server: (seele)
> 
> -----------------------------------------------------
> /etc/hosts
> 
> 127.0.0.1	seele	localhost
> 192.168.0.1	seele   localhost
> 192.168.1.1	seele   localhost
> 192.168.0.2     casper
> 192.168.1.2     casper

I would not suggest that you do this - having the same name in a hosts
file for different IPs is a cause of confusion. I would put .0.1 as
seele_10 and .1.1 as seele_100 and likewise with casper.
> 
> ----------------------------------------------------
> /etc/network/interfaces
> 
> auto lo
> iface lo inet loopback
> 
> # internet 100Mbit connection (top card)
> auto eth2
> iface eth2 inet static
>         address 192.168.1.1
>         netmask 255.255.255.0
> 
> # internet 10Mbit connection (middle card)
> auto eth0
> iface eth0 inet static
>         address 192.168.0.1
>         netmask 255.255.255.0
> 
> # external 10Mbit connection (bottom card)
> auto eth1
> iface eth1 inet dhcp

Um, this doesn't make sense - you have three cards of which two are
internet? Do you not mean intranet? Also, if you have these cards
assigned IPs then what is the dhcp doing on eth1? or is that for 
cable modem or equiv?

> 
> ------------------------------------------------------
> /etc/bootptab
> 
> default:ds=192.168.0.1:\
>     sm=255.255.255.0:\
>     gw=192.168.0.1:\
>     ds=66.245.60.4
> 
> casper:ht=ethernet:\
>     sa=192.168.0.1:\
>     ha=0x52544c1d2fb1:\
>     ip=192.168.0.2:\
>     tc=default:\
>     hd=/tftpboot/casper:\
>     bf=kernel:\
>     rp=/nfsroot/casper:
> 
> ------------------------------------------------------
> /etc/exports
> 
> /nfsroot/casper/	192.168.0.2(rw,no_root_squash)
> /nfsroot/casper/	192.168.1.2(rw,no_root_squash)

Are you sure that you're allowed multiple entries? Try simply putting a
single entry like this:

/nfsroot/casper 192.168.0.0/255.255.0.0(rw,no_root_squash)

> ---------------------------------------------------
> Client: (casper)
> 
> ---------------------------------------------------
> /etc/fstab
> 
> # <file system>	<mount point>	<type>	<options>	<dump>	<pass>
> none		/proc		proc	defaults	1	0
> 
> # 192.168.0.1 is 10Mbps
> # 192.168.1.1 is 100Mbps
> 
> # first mount at 10Mbps
> # <file system>			<mount point>	<type>	<options>			<dump>	<pass>
> 192.168.0.1:/nfsroot/casper/	/		nfs	rsize=8192,wsize=8192,nolock	0	1
> 
> # then remount at 100Mbps
> # <file system>			<mount point>	<type>	<options>			<dump>	<pass>
> 192.168.1.1:/nfsroot/casper/	/		nfs	rsize=8192,wsize=8192,nolock	0	1
> 192.168.1.1:/root/		/root		nfs	rsize=8192,wsize=8192,nolock	0	1
> 192.168.1.1:/home/jason/	/home/jason	nfs	rsize=8192,wsize=8192,nolock	0	1
> 192.168.1.1:/boot/		/boot		nfs	rsize=8192,wsize=8192,nolock	0	1
> 192.168.1.1:/usr/src/		/usr/src	nfs	rsize=8192,wsize=8192,nolock	0	1
> 192.168.1.1:/usr/audio/		/usr/audio	nfs	rsize=8192,wsize=8192,nolock	0	1
> 192.168.1.1:/usr/video/		/usr/video	nfs	rsize=8192,wsize=8192,nolock	0	1
> 
> # <file system>	<mount point>	<type>	<options>		<dump>	<pass>
> /dev/cdrom	/cdrom  	iso9660	defaults,ro,user,noauto	0	0
> /dev/dvd	/cdrom  	iso9660	defaults,ro,user,noauto	0	0
> /dev/fd0	/mnt/floppy	auto	defaults,user,noauto	0	0
> 
> -------------------------------------------------------

Hmm, I think this is the major problem - I don't think that you're
allowed to do such things in fstab because it has no reason to supply
the -o remount option when trying to mount the fs the second time so the
mount will fail. I would suspect so anyway - I may be wrong.

I would therefore suggest that you create a script that is run once the
system is up (use /etc/init.d/skeleton as a guide if you want) that
i) mount -o remount,rsize=8192,wsize=8192 -t nfs
192.168.1.1/nfsroot/casper /
ii) mounts the rest. 

Really this is still an ugly solution. A more elegant system would go:
i) client logs in an grabs a filesystem image which is uncompressed into
RAM, all over the 10MBit card.
ii) client inflates image, mounts it and boots it (initrd style).
iii) client drops 10MBit connection, starts up 100MBit connection,
mounts nfs, moves ramdisk off.

I would imagine that you have a lot of this already going. The problem
is that your setup to too complicated IMHO, simply use the 10MBit card
to boot, then drop 10mbps and start everything on the 100mbps.

I'm assuming that you're using a boot chip on your 10mbps card to tell
it where to get the kernel etc, in which case it should just be a matter
of redesigning the initrd image.

HTH,

Matthew
-- 

Matthew Sackman
Nottingham
England

BOFH Excuse Board:
Bogon emissions

Attachment: pgpREMxqBZtcy.pgp
Description: PGP signature


Reply to: