fmbutt@cloud9.Stratus.COM (Farooq Butt) (11/22/89)
Hi here Net-OIDS ! 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 ? Inquiring minds want to know... fmbutt@cloud9.UUCP -- NOTHING in the above article has the slightest relationship to reality. If any reality correspondences are found, please notify me IMMEDIATELY. Any threats, abuse or stupidity of any kind are purely UNINTENTIONAL. My employer does not know that I exist and is not responsible for anything.
mchinni@pica.army.mil (Michael J. Chinni, SMCAR-CCS-E) (11/28/89)
> 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@pica.army.mil "System been down long?" () UUCP: ...!uunet!pica.army.mil!mchinni /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
chris@mimsy.umd.edu (Chris Torek) (11/28/89)
>> ... root on xd0a swap on xd0b swap on xd6f In article <21533@adm.BRL.MIL> mchinni@pica.army.mil (Michael J. Chinni, SMCAR-CCS-E) writes: >First, the kernal line should say: [kernEl] > ... root on xd0a swap on xd0b and on xd6f >(notice the 'and' vs. the 'swap'). Right. Incidentally, the `on' is optional, and there is some clever (if rather convoluted) code in config that will arrange for `root on XXNa swap on XXNb dumps on XXNb args on XXNb' if you simply say `config foo root XXN', but I always spell everything out and write, e.g., config vmunix root on ra0a swap on ra0b and ra1b dumps on ra0b args on ra0b >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. Although many things have certainly changed in SunOS 4.0.x, this at least is unlikely to be one of those: `swapon device' *adds* that device, and does not remove any current swap device. It is hard to remove an active swap area, since arbitrarily many processes might be using it. >to: "swapon -a". The "-a" option says start swaping on any partitions defined >as swapable in /etc/fstab. More precisely, `swapon -a' means `add everything listed as a swap partition', as if by swapon `awk '{if ($3 == "sw") print $1}' /etc/fstab` -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@cs.umd.edu Path: uunet!mimsy!chris
konczal@mail-gw.ncsl.nist.gov (Joseph C. Konczal) (11/28/89)
RTFRTF. (Read the RTF.) The SunOS 4.0.3 RTF (Read This First), Rev. B of August 1989, page 11, under [Known Problems] Utilities, says "`config' will not define multiple swap partitions." No workaround is given in the RTF. Joe Konczal
guy@auspex.auspex.com (Guy Harris) (11/29/89)
>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). Note that when running SunOS 4.x you do not, as far as I know, have to reconfigure the kernel to know about new swap partitions, unlike 4.xBSD and older SunOS releases that use the 4.xBSD code for swapping. >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. More precisely, it says "add only this space to the list of swap areas", it doesn't say "forsake all other swap areas and cleave only unto this one". >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. Note also that there's already a "swapon -a" command in "/etc/rc".
stan@squazmo.solbourne.com (Stan Hanks) (11/30/89)
In article <21540@adm.BRL.MIL> konczal@mail-gw.ncsl.nist.gov (Joseph C. Konczal) writes: >RTFRTF. (Read the RTF.) The SunOS 4.0.3 RTF (Read This First), Rev. B >of August 1989, page 11, under [Known Problems] Utilities, says >"`config' will not define multiple swap partitions." No workaround is >given in the RTF. While I don't have any experience doing this on a Sun, I did jack around with this for quite some time on my Solbourne 4/602 running OS/MP 4.0A (which is basicly SunOS 4.0.1 with some other bug fixes) and found that if you just keep the config line as: "blah blah.... swap generic" then add the appropriate lines to /etc/fstab: /dev/sd1b swap swap rw 0 0 that it all worked as advertised. Spielunking the source, I found that the old swap syntax of letting you name the partitions was no longer recognized. I didn't check the raw SunOS source, but our modifications to config were minimal. Sigh. Another link to the past broken..... Regards, -- Stanley P. Hanks Science Advisor Solbourne Computer, Inc. Phone: Corporate: (303) 772-3400 Houston: (713) 964-6705 E-mail: ...!{boulder,sun,uunet}!stan!stan stan@solbourne.com
guy@auspex.auspex.com (Guy Harris) (12/07/89)
>I didn't check the raw SunOS source, but our modifications to config >were minimal. Raw SunOS 4.x doesn't give a f*rt whether you tell it in advance what partitions you plan to use for swapping; you don't have to reconfigure your kernel just to add a new swap area. That's a link to the past I'm quite happy to see broken....