[comp.sys.sun] sun 4.0 multiple swap partitions

nassio%cfassp12@harvard.harvard.edu (George Nassiopoulos) (05/19/89)

We have a Sun 4/280 server running 4.0 -- we would like to be able to swap
on two partitions on two disks connected to the server, but don't seem to
be able to do so.

Does any one know if there is a way to do this in 4.0 ?  

In a previous article to Sun-Spots I BELIEVE someone said that
#
config vmunix root on xy0a swap on xy0b and swap on xy3b
#
would work, but when I tried the above config file I got the
same kernel as I got with the following:
# 
config vmunix root on xy0a swap on xy3b 
# 

Also, does anyone know if the naming of the kernel matters
at all. i.e. what does using the line:
#
ident           GENERIC
#
do to you if the rest of the kernel is not really GENERIC?

Thank you, 

George Nassiopoulos

nassio@cfa.harvard.edu (Internet)
nassio@cfa  (BITNET)

[[ The config line we use is:
"config vmunix root on xy0a swap on xy0b and xy1b"
Note that it does not say "and swap on".  --wnl ]]

nassio%cfassp12@harvard.harvard.edu (George Nassiopoulos) (05/24/89)

> [[ The config line we use is:
> "config vmunix root on xy0a swap on xy0b and xy1b"
> Note that it does not say "and swap on".  --wnl ]]

When I try:
config vmunix root on xy0a swap on xy0b and xy3b

I get:
config: line 77: syntax error

line 77 is the config line.  what am i doing wrong?  I've tried all kinds
of variations of this config line.

George Nassiopoulos
nassio@cfa.harvard.edu

whiteley@nadc.arpa (D. Whiteley) (05/25/89)

I'm responding with a question in response to this letter:

>Date:    Thu, 18 May 89 16:51:43 edt
>From:    nassio%cfassp12@harvard.harvard.edu (George Nassiopoulos)
>Subject: sun 4.0 multiple swap partitions
>
>We have a Sun 4/280 server running 4.0 -- we would like to be able to swap
>on two partitions on two disks connected to the server, but don't seem to
>be able to do so.

I also have a Sun3/280 that I would like to have swap on two partitions.
When I installed this machine I tried numerous combinations of the config
line in the kernel file.  I either got a syntax error from /etc/config for
that line, or a kernel that only swaps on one partition.

I thought maybe I hadn't tried what wnl suggested.  But I got a syntax
error from /etc/config when I did try it just now.

Is this perhaps a difference between SunOS 4.0 and SunOS 4.0.1?

Is it possible to put a line in the /etc/fstab file for a second swap
partition?  Or is that only for swap partitions for clients?

Thanks,

Denice

whiteley@nadc.arpa

alan%prism@gatech.edu (Alan M. Brown) (06/01/89)

In article <8905190032.AA05736@rice.edu>, nassio%cfassp12@harvard.harvard.edu
(George Nassiopoulos) writes:

> We have a Sun 4/280 server running 4.0 -- we would like to be able to swap
> on two partitions on two disks connected to the server, but don't seem to
> be able to do so.
[more detail removed - AMB]

After fighting with unknowledgable Sun employees and some experimentation,
I've found that the config program's handling of the "config vmunix..."
specification is different between Sun OS 3.5 and 4.0.  Note that at 3.5
and 4.0, TFM states that to specify two swap partitions, use a config line
similar to

   "config vmunix root on xy0a swap on xy0b and xy1b"

At 3.5 this works great, while at 4.0 an error message is produced by
/usr/etc/config.  

Solution for 4.0:  Simply specify your first (any) partition in the
config line similar to

   "config vmunix root on xy0a swap on xy0b"

then place in your /etc/fstab an entry for each partition to be swapped
upon.  For example, 

   /dev/xy0b   /swap   swap   rw   0 0
   /dev/xy1f   /swap   swap   rw   0 0

Now issue the "swapon -a" command.  You should be able to verify the
results with the "pstat -s" command.

> Also, does anyone know if the naming of the kernel matters
> at all. i.e. what does using the line:
> #
> ident           GENERIC
> #
> do to you if the rest of the kernel is not really GENERIC?

The naming of the kernel is entirely for your convenience.  We use the
names to specify different versions of the kernel, e.g., hostname.1,
hostname.2.  The only impact that I'm aware of is that your motd that
appears at login includes a header which specifies the kernel name
(RADAR.4 in this example), a build number (9), and a build date (...May
19...).

   login: alan
   Password:
   Last login: Thu Jun  1 09:51:09 from ...
   SunOS Release 4.0.1 (RADAR.4) #9: Fri May 19 16:47:05 EDT 1989


Alan M. Brown					Systems Support Specialist
						Office of Computing Services
telephone:  (404) 894-4660			Georgia Institute of Technology
Internet:   alan@prism.gatech.edu		Atlanta, Georgia  30332-0275
uucp:       ...!{allegra,amd,hplabs,ut-ngp}!gatech!prism!alan

davecb@nexus.yorku.ca (David Collier-Brown) (06/06/89)

In article <3456@kalliope.rice.edu> nassio%cfassp12@harvard.harvard.edu (George Nassiopoulos) writes:
| X-Sun-Spots-Digest: Volume 8, Issue 4, message 6 of 13
| When I try:
| config vmunix root on xy0a swap on xy0b and xy3b
| 
| I get:
| config: line 77: syntax error
| 
| line 77 is the config line.  what am i doing wrong?  I've tried all kinds
| of variations of this config line.

   We just got bit by the same thing, and went to "root on xy0a swap
on xy0b swap on xy3b" after reading the syntax reference.
   It appears to have changed (:-)).

dave

ekrell@ulysses.att.com (Eduardo Krell) (06/14/89)

In article <3502@kalliope.rice.edu> you write:

>Is it possible to put a line in the /etc/fstab file for a second swap
>partition?  Or is that only for swap partitions for clients?

You need an entry in /etc/fstab for all extra swap partitions.
Otherwise, "swapon -a" (being run from /etc/rc) won't find
them.

Use something like:

/dev/xd1b	swap			swap sw			0 0

I don't understand why people are having problems with the kernel
config file. All I have is

config		vmunix		swap generic

and we've never had any problems (even when we added the 2nd disk
where the extra swap partition is).

Eduardo Krell                   AT&T Bell Laboratories, Murray Hill, NJ

UUCP: {att,decvax,ucbvax}!ulysses!ekrell  Internet: ekrell@ulysses.att.com

itwaf@gatech.edu (Bill Fulton [Sys Admin]) (06/20/89)

In article <3641@kalliope.rice.edu> alan%prism@gatech.edu (Alan M. Brown)writes:
>In article <8905190032.AA05736@rice.edu>, nassio%cfassp12@harvard.harvard.edu
>(George Nassiopoulos) writes:
  [...]
>> Also, does anyone know if the naming of the kernel matters
>> at all. i.e. what does using the line:
>> ident           GENERIC
>> do to you if the rest of the kernel is not really GENERIC?
>The naming of the kernel is entirely for your convenience.  We use the

It's my understanding that the 'GERNERIC' designation (which can be used
either with the 'ident' line or as one of the 'option' lines) is a flag
that 'gives the kernal more latitude' when it comes up. For example, I
think that you can only specifiy the '-a' boot option when the kernal is
'generic' (otherwise, the '-a' is ignored, and you are not allowed to
specify the root device). Also, I think the the keyword 'generic' can be
used in the 'config' line only when GENERIC has been specified (that's
what it seems to say in the manual) That is;

    config vmunix swap generic

can be specified, and seems to allow more flexibility when booting.

In fact, the only way I can figure out to get a diskless workstation to
boot from a server is to use kernal which has the 'GENERIC' option
specified. I have, for example, reconfiged a smaller kernal for the
diskless workstations (no sd support, etc), but I seem to have to enable
the GENERIC option, and use 'swap generic' in the config line.

Which brings up a question ...

Is there a way to explicitly declare that a workstation should use the nd
server for the root and/or swap partition? I tried

    config vmunix root on nd0 swap on sd0b

It started to boot, but failed somewhere around rc.boot, with the message
    rootmount: can't mount root

If I used a generic kernel with both root and swap on sd0, and used the -a
boot option, to specify nd0 as the root device, it apparantly also used
nd0 as the swap device, despite the kernal config.  I was going to try
playing around with /etc/fstab as an alternate approach, but, after
playing with kernal reconfigs for a few hours, I was fuzzed out; I gave up
and implemented a work-around.

This foolishness started when, last week, I tried to get a normally
diskless client to use a loaner SCSI disk for the swap device only (NOT
the root device - due to a dedicated root structure which I didn't want to
recreate on the SCSI disk).

Anybody else tried this?

Bill Fulton