SunOS 4.0.3 swapping across multiple drives........

Michael J. Chinni, SMCAR-CCS-E mchinni at pica.army.mil
Tue Nov 28 03:49:28 AEST 1989


> I have a question about swapping across multiple drives on SunOS 4.0.3.
> I thought that my 3/280 was running out of swap space so I configured it 
> to swap on a new disk in addition to its current swap (It used to swap 
> on xd0b only, I configured the kernel to swap on xd6f too ... total 
> swap was 35M, it became 85M after the second swap area was added).  I 
> changed the kernel line that told the system:
>     ... root on xd0a swap on xd0b 
> to
>     ... root on xd0a swap on xd0b swap on xd6f 
> 
> Now, I thought that all I needed to do was to add a line saying 
> "swapon /dev/xd6f" in /etc/rc.local to add swapping on the 2nd drive.  To my 
> shock and horror, during the kernel boot dialog, I saw that the Sun 
> seemed to be telling me that it was now swapping on my new drive (i.e. 
> xd6f).  Which one is it really swapping on ? Can I come up without 
> /dev/xd6f or am I now doomed to have both xd0 and xd6 around at boot
> time ? What happened to the swap entry for xd0b that had been there 
> all along ? Is the boot dialog just telling me half the story ?
> What is the swapon command I need to put in rc.local ?

I have two possible explanations/solutions.

First, the kernal line should say:
    ... root on xd0a swap on xd0b and on xd6f 
(notice the 'and' vs. the 'swap'). My guess is that what you are telling the
kernal is that you want swapping on xd6f ONLY (i.e. swap on xd6f overrides swap
on xd0b).

Second, read the man page for swapon. Those I have seen say that specifying 
"/etc/swapon name" (like swapon /dev/xd6f) makes ONLY THIS SPACE available to
the system for swaping.  Change the swapon command from: "swapon /dev/xd6f" 
to: "swapon -a". The "-a" option says start swaping on any partitions defined
as swapable in /etc/fstab. See "man swapon" for details.

/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
			    Michael J. Chinni
      Chief Scientist, Simulation Techniques and Workplace Automation Team
	 US Army Armament Research, Development, and Engineering Center
 User to skeleton sitting at cobweb   () Picatinny Arsenal, New Jersey  
    and dust covered workstation      () ARPA: mchinni at pica.army.mil
      "System been down long?"        () UUCP: ...!uunet!pica.army.mil!mchinni
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/



More information about the Comp.unix.questions mailing list