[comp.unix.admin] two swapping devices for a Sun 4.1.1 kernel

breck@ganzer.ecs.umass.edu (Liam Breck) (06/22/91)

Hi all

Just putting in a custom kernel, but SunOS config doesn't like:

config	vmunix	  root on sd0a swap on sd0b and sd1b dumps on sd1b

If I take out the "and sd1b" I get no complaints.  I thought this
was the standard way to tell the kernel to swap on two devices!

So someone please tell me and the net how it's done!
-- 
Liam Breck     breck@umvlsi.ecs.umass.edu

karl@thuja.gsfc.nasa.gov (Karl Anderson) (06/23/91)

In article <1991Jun21.211100.9073@risky.ecs.umass.edu>,
breck@ganzer.ecs.umass.edu (Liam Breck) writes:
|> Hi all
|> 
|> Just putting in a custom kernel, but SunOS config doesn't like:
|> 
|> config	vmunix	  root on sd0a swap on sd0b and sd1b dumps on sd1b
|> 
|> If I take out the "and sd1b" I get no complaints.  I thought this
|> was the standard way to tell the kernel to swap on two devices!
|> 
|> So someone please tell me and the net how it's done!
|> -- 
|> Liam Breck     breck@umvlsi.ecs.umass.edu

The standard way to add a swap device under SunOS is with the 
swapon(8) command.  It can be done from the command line or
in /etc/rc.local with "swapon /dev/r<add'l-swap-partition>",
or by placing an entry in /etc/fstab of the form

/dev/r<add'l-swap-partition>	swap	swap	rw 0 0

and executing "swapon -a".
--
Karl A. Anderson		| Internet: karl@forest.gsfc.nasa.gov
NASA/GSFC code 923 (STX)	| voice: (301) 286-3815
Greenbelt, MD 20771		| #include "std_disclaimer"

jca@crash.cts.com (John C. Archambeau) (06/24/91)

In an article breck@ganzer.ecs.umass.edu (Liam Breck) writes:
>Just putting in a custom kernel, but SunOS config doesn't like:
>
>config	vmunix	  root on sd0a swap on sd0b and sd1b dumps on sd1b
>
>If I take out the "and sd1b" I get no complaints.  I thought this
>was the standard way to tell the kernel to swap on two devices!
>
>So someone please tell me and the net how it's done!

You're going about it the hard way.  You should always leave the swap
device as generic.  The easiest way to do it is to modify /etc/fstab.
For example, let's say I wanted to take /dev/sd0h (which defaults to the
/home file system) and use it as a swap device, here's what I add to
/etc/fstab:

/dev/sd0h    swap    swap    rw 0 0

Of course, I have to comment out the line in /etc/fstab that mounts
/dev/sd0h as /home since it is no longer being used as a 4.2 filesystem.
If you don't want to repartition your hard drive, you could make a
swap file and then add that line to /etc/fstab and use it as a swap
device, but I don't muck with the kernel configuration to add swap
devices, it's just too much of a headache.