[comp.sys.sun] Diskless Client under 4.0

len%rufus.math.nwu.edu@eecs.nwu.edu (Len Evens) (02/14/89)

We are adding a 3/60 to a network served by a 3/260 (with 8M of physical
memory and 16M of swap space for the server) which currently has one other
diskless client.   When the server was set up (by the Sun engineer) it was
provided with a 16M partition mounted on /export/swap, and that was used
as the swap path for the client.   I plan to repartition the disk to allow
space for the second client, but as an interim measure I created a
directory /home/swap (on the /home partition) and made that the swap path
for the second client.   The client boots, but at the end of the boot
sequence, it complains of NFS write error 13 several times and then comes
up multiuser.   However, sunview is painfully slow while it works fine on
the first client.   Does anyone have any explanations or helpful advice?
I have found the documentation misleading and very little help.

One other point I don't understand.   The shell script setup_client on our
machines does not have a `dumppath' parameter while the documentation
seems to call for one.   Is this the result of some decision made during
the original installation or is it just an error in the documentation? 

wmg@att.att.com (02/19/89)

In article <8902031448.AA11583@rufus.math.nwu.edu> you write:
>We are adding a 3/60 to a network served by a 3/260 (with 8M of physical
>memory and 16M of swap space for the server) which currently has one other
>diskless client....The client boots, but at the end of the boot
>sequence, it complains of NFS write error 13 several times and then comes
>up multiuser.   However, sunview is painfully slow while it works fine on
>the first client.   Does anyone have any explanations or helpful advice?

On the NFS write error 13 it has to do with the /etc/exports file.  You do
not have an entry for the client that you just added.  After making an
entry as per the man page (section 5) you must rerun /etc/exportfs.  There
is more info on exportfs(8) in section 8 of the manual.  If you have any
problems, send mail or call.

Good luck,

Bill Gilroy

William M. Gilroy - AT&T Engineering Research Center
erc3ba!wmg
(609) 639-2582	- CORNET 258

brad@nwc.arpa (Brad Clark) (02/23/89)

>The client boots, but at the end of the boot sequence, it complains of
>NFS write error 13 several times and then comes up multiuser.

I had this problem when setting up a dataless 3/60 client. I solved it by
going into the /etc/exports file on the server and giving root privilege
access to the client that as going to mount the directory as swap space. I
then ran /usr/etc/exportfs -a.

	e.g. /home/swap -root=client3,access=client1:client2:client3

Don't forget that once a file system or any part thereof is exported, it
cannot be exported again. You might consider exporting all of /home.

Good luck,
Brad Clark   arpanet: clarkb@nwc.arpa

kelly@ames.arc.nasa.gov (kelly rise) (02/28/89)

len%rufus.math.nwu.edu@eecs.nwu.edu (Len Evens) writes:
>...I plan to repartition the disk to allow
>space for the second client, but as an interim measure I created a
>directory /home/swap (on the /home partition) and made that the swap path
>for the second client.   The client boots, but at the end of the boot
>sequence, it complains of NFS write error 13 several times and then comes
>up multiuser....

probably one of two things:
	/home	 is not exported 
or	/home and /home/swap are both exported

run exportfs to check whats exported  and exportfs -a (if both are in
/etc/exports this will complain that /home/swap parent already exported)
also the client may need root access to /home/swap (-root=client[:client]
in /etc/exports) 

kelly rise		pyramid!boulder!stan!kelly
			solbourne computer, inc.

blc@uunet.uu.net (Brett Chapman) (02/28/89)

Len Evens wrote about adding swap space to /home for a new client.

I, too, fell into this same trap.  There should be a note in the
setup_client(8) man page (I'm sure there's a bug report somewhere even
though I can't seem to find it) stating that you cannot "double export"
directories.  The following warning appears in the EXPORTS(5) man page and
should appear at the end of setup_client(8):

WARNINGS
     You cannot export either a parent directory or  a  subdirec-
     tory  of  an  exported  directory  that  is  within the same
     filesystem.  It would be illegal, for  instance,  to  export
     both  /usr and /usr/local if both directories resided on the
     same disk partition.

In this case it means that you cannot export /home and /home/swap.  I am
not sure why, but I think it has to do with the server trying to keep
track of what's going on in swap twice - once as /home, and once as swap.
I am probably wrong, but that's the best explanation I have at this time.

I finally just had to decrease the swap space of the other client in the
/export/swap partion and add the new client with a small swap space.

The only other alternative would be if you had an extra partition laying
around :-) or a directory/partition that wasn't exported.

I do think that it would be nice if you could create swaps where ever
there was space.  Well, maybe in 4.0.2 (-:.

	Brett Chapman
	General Electric Medical Sys.
	uunet!steimetz!gemed!chapmanB
	sun!sunbrew!gemed!chapmanB

galvin-peter@yale-bulldog.arpa (Peter Baer Galvin) (03/08/89)

This brings up something I've wanted to mention for a while but never got
around to.  Under 4.0 you are now able to create many separate swap files
for use by one client, allowing easy addition of swap space as needed.
Isn't that convenient...except that there is a noticible performance
penalty.

A user had 16mb of swap and needed another 8, so I created (using mkfile)
another 8mb file on a separate partition on the same disk and added it to
the workstation via swapon.  The user came back saying that the system was
now _much_ slower than it had been...maybe by 1/3.  I called this in to
sun, after more experimentation, and asked about it at the SUG conference
too.  The best guess was that we were being hit by disk head seeks, and
that unless we had two disks on two controllers to do separate seeks and
transfers, (swap files on each of the two disks) we would see this kind of
problem.

I then built a 24mb swap file on the other partition, and the problem went
away, so the guess seems correct.  I'm a little surprised though, since in
the old days we had 0b and 1b partitions on separate disks on the same
controller on our servers and didn't notice and performance problems.
You'd think that separate swap files on two disks on one controller would
perform similarly, but I tried this configuration also, on a workstation,
and saw the performance problem again.  Of course we're using the usual
dumb Sun disk controller, so just changing that for a 7053 (or whatever)
might help.

--Peter

Peter Baer Galvin       		      (203)432-1254
Senior Systems Programmer, Yale Univ. C.S.    galvin-peter@cs.yale.edu
51 Prospect St, P.O.Box 2158, Yale Station    ucbvax!decvax!yale!galvin-peter
New Haven, Ct   06457			      galvin-peter@yalecs.bitnet

id@uunet.uu.net (Ian Domville) (03/08/89)

There is nothing to stop you telling a client that its swap directory is
in /home/swap and just exporting /home. As long as  nobody goes and hacks
the swap file  (you need to out 666  protection on it or  give  root
access to the /home partition), it works fine.  Of course, if anyone
knows how to  patch  the swap space, they could walk through your
security, but the risk is slight.

Ian Domville

PHONE  	: PHONE	: +44 279 29531 x2576
POST	: STC Technology Ltd., Old London Road, HARLOW, Essex, CM17 9NA, UK.
ARPA	: id%stl.stc.co.uk@cs.ucl.ac.uk
JANET	: id@stl.stc.co.uk
UUCP	: id@stl.UUCP

zombolas@ads.com (Gene Zombolas x7624) (03/16/89)

In article <2634@eos.UUCP> steinmetz!gemed!sol!blc@uunet.uu.net (Brett Chapman) writes:
>I do think that it would be nice if you could create swaps where ever
>there was space.  Well, maybe in 4.0.2 (-:.

I'm unsure if the question was clearly answered.  If you want to move the
swap to another file system, such as /home/swap/<client>, this is ok.  If
/home is already exported, then you cannot export /home/swap/<client>.
You will however, have to give root access for that client to /home.  This
does present some security risks, but the only other alternates is to live
with small swap spaces, increase the /exports/swap partition, or create a
new partition dedicated to client swap files.  The default size for
/exports/swap in the suninstall installation is rediculously small.

Gene Zombolas                                 phone:    415-960-7624
Verity Inc.                                   internet: zombolas@verity.com
1550 Plymouth St.                             UUCP:     Hell if I know!
Mountain View, CA 94043

dupuy@cs.columbia.edu (Alexander Dupuy) (03/23/89)

While we're on this subject - does anyone know how to configure a kernel
so that it can swap to both nfs and local disk?  I tried "swap on type nfs
and sd" but config barfed on that one.

@alex

[[ We configure our kernel to swap on two devices with
"swap on xy0b swap on xy1b", but we've never tried mixing local and NFS
swap files.  --wnl ]]

dupuy@cs.columbia.edu (Alexander Dupuy) (03/24/89)

While we're on this subject - does anyone know how to configure a kernel
so that it can swap to both nfs and local disk?  I tried "swap on type nfs
and sd" but config barfed on that one.

@alex

inet: dupuy@cs.columbia.edu
uucp: ...!rutgers!cs.columbia.edu!dupuy

david@elroy.jpl.nasa.gov (David Robinson) (03/30/89)

zombolas@ads.com (Gene Zombolas x7624) writes:
< In article <2634@eos.UUCP> steinmetz!gemed!sol!blc@uunet.uu.net (Brett Chapman) writes:
< >I do think that it would be nice if you could create swaps where ever
< >there was space.  Well, maybe in 4.0.2 (-:.
< 
< I'm unsure if the question was clearly answered.  If you want to move the
< swap to another file system, such as /home/swap/<client>, this is ok.  If
< /home is already exported, then you cannot export /home/swap/<client>.
...

I have not tried this but if you don't want to give root access to /home
in this example, why not make the swap file owned by "-2" (aka nobody),
you still have the potential of other roots on other clients trashing your
swap space but at least you don't give root away on all of /home.

	David Robinson		elroy!david@csvax.caltech.edu     ARPA
				david@elroy.jpl.nasa.gov	  ARPA
				{cit-vax,ames}!elroy!david	  UUCP

pat@decwrl.dec.com (Pat Lashley) (04/04/89)

In article <8903092101.AA24327@cs.columbia.edu> dupuy@cs.columbia.edu (Alexander Dupuy) writes:
>While we're on this subject - does anyone know how to configure a kernel
>so that it can swap to both nfs and local disk?  I tried "swap on type nfs
>and sd" but config barfed on that one.

I added a local nfs swap space without kernel changes by creating the swap
space and  adding `swapon /files/swap/serendip' to my rc.local.


--- Reply to address below - DO NOT auto-route --- 
PMLashley	...{sun | megatest | sts | zygot}!cohesive!kla!pat
KLA Instruments	Corp.	Santa Clara, CA 95052	+1 408 988 6100