[comp.unix.questions] Swap on 4.2 BSD

tkevans@fallst.UUCP (Tim Evans) (11/09/89)

I've recently inherited system-administration responsibility for 4 VAX 
11/750's running 4.2 BSD and have been rummaging around on them.  I've
discovered that, although /etc/rc starts up 'swapon -a' there is no
swap partition defined in /etc/fstab.

Our vendor is unable to locate any records on why this might have been
set up in this fashion.  Their response was that "BSD does paging so maybe
you don't need swapping" (!!!).

/etc/disktab's entry for the Eagle disk(s) on the 4 machines appears to
show a 'b' partition having been defined.

Question is:  lacking any records on why this system was set up in this
fashion, can I safely throw a line into /etc/fstab defining partition 'b'
as swap?  Thanks.
-- 
UUCP:		uunet!anagld!aplcen!fallst!tkevans
INTERNET:	tkevans@wb3ffv.ampr.org
OTHER:		attmail!fallst!tkevans
Tim Evans	2201 Brookhaven Ct, Fallston, MD 21047  (301) 965-3286

danl@midget.towson.edu (11/10/89)

Tim Evans <tkevans@fallst.uucp> writes:
>11/750's running 4.2 BSD and have been rummaging around on them.  I've
>discovered that, although /etc/rc starts up 'swapon -a' there is no
>swap partition defined in /etc/fstab.

I run Ultrix on VAXen, which is a descendent of BSD, so I'm assuming this
all works the same.  "swapon -a" adds secondary or supplemental swap space
(namely other disk partitions marked :sw: in /etc/fstab and configured into
the kernel) to the primary swap which is also defined in the kernel config
file.  Try looking in /usr/sys/conf/machine_name for something like:

config	vmunix	root on ra0a  swap on ra0b  dumps on ra0b  

The above specifies ra0b as my primary (and only) swap space, and therefore
needs no entry in /etc/fstab.

"swapon -a" is in your /etc/rc in case you want to add other partitions as
swap.  To do this you need to add the parttion to the config file, reconfig
the kernel, add the partition to /etc/fstab, and reboot.  The line:

config	vmunix	root on ra0a  swap on ra0b  swap on ra1b  dumps on ra0b  

specifies ra0b as my primary swap and ra1b as an optional secondary swap
to be added by "swapon -a" if it is in /etc/fstab.

>/etc/disktab's entry for the Eagle disk(s) on the 4 machines appears to
>show a 'b' partition having been defined.

The "b" partition is usually used for swap, so if your system is running and
all you have is the one drive, it is probably already being used.  Try
"pstat -s" to see it's size, and check the config file again for its
location.  You shouldn't take /etc/disktab as gospel though, because it's
values are only default suggestions, and can be over-ridden by chpt.  Try
"chpt -q" to see how the disk is really layed out.

I have two Eagle's on one system and interleave the swap between them.

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dan Gosner				Internet: danl@midget.towson.edu
Operations Manager				  DGosner@TOE.TOWSON.EDU 
Towson State University			Bitnet:   DGosner@TOWSONVX
Academic Computing
Towson, Maryland  21204
   %% VMS pays the bills, but Unix is where my real work gets done. %%