From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Irene A. Shilikhina" Newsgroups: gmane.os.tru64.managers Subject: [SUMMARY]: *MUST* the primary swap reside on the system disk? Date: Wed, 11 Jun 2003 12:05:33 +0700 (NSD) Sender: tru64-unix-managers-owner@ornl.gov Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Content-Transfer-Encoding: QUOTED-PRINTABLE X-Trace: main.gmane.org 1055307808 17806 80.91.224.249 (11 Jun 2003 05:03:28 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 11 Jun 2003 05:03:28 +0000 (UTC) Original-X-From: tru64-unix-managers-owner-gotm-tru64-unix-managers=m.gmane.org@sws1.ctd.ornl.gov Wed Jun 11 07:03:27 2003 Return-path: Original-Received: from sws1.ctd.ornl.gov ([160.91.22.101]) by main.gmane.org with smtp (Exim 3.35 #1 (Debian)) id 19Pxle-0004ct-00 for ; Wed, 11 Jun 2003 07:03:26 +0200 Original-Received: (qmail 20863 invoked by uid 5); 11 Jun 2003 05:05:48 -0000 Original-Followup-To: poster Precedence: bulk Original-Received: (qmail 20854 invoked by uid 49493); 11 Jun 2003 05:05:48 -0000 Original-Received: from irene@alpha.iae.nsk.su by sws1 by uid 49491 with qmail-scanner-1.14 (clamscan: 0.54. spamassassin: 2.50-cvs. Clear:SA:0(-9.4/5.0):. Processed in 0.688718 secs); 11 Jun 2003 05:05:48 -0000 Original-Received: from unknown (HELO emroute2.cind.ornl.gov) (160.91.86.17) by 0 with SMTP; 11 Jun 2003 05:05:47 -0000 Original-Received: from emroute2.cind.ornl.gov (LOCALHOST [127.0.0.1]) by emroute2.cind.ornl.gov (PMDF V6.2 #30669) with ESMTP id <0HGA00ETKWTLMA@emroute2.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Wed, 11 Jun 2003 01:05:46 -0400 (EDT) Original-Received: from alpha.iae.nsk.su (alpha.iae.nsk.su [193.124.169.61]) by emroute2.cind.ornl.gov (PMDF V6.2 #30669) with ESMTP id <0HGA00L4VWTBDJ@emroute2.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Wed, 11 Jun 2003 01:05:37 -0400 (EDT) Original-Received: from alpha.iae.nsk.su (localhost [127.0.0.1]) by alpha.iae.nsk.su (8.12.8/8.12.8) with ESMTP id h5B55YDK000869 for ; Wed, 11 Jun 2003 12:05:34 +0700 (NSD) Original-Received: (from irene@localhost) by alpha.iae.nsk.su (8.12.8/8.12.8/Submit) id h5B55XR6000868; Wed, 11 Jun 2003 12:05:33 +0700 (NSD) In-reply-to: Original-To: tru64-unix-managers@ornl.gov Xref: main.gmane.org gmane.os.tru64.managers:4501 X-Report-Spam: http://spam.gmane.org/gmane.os.tru64.managers:4501 What informative replies I've got... and an exhaustive background from=20 DEC/COMPAQ/HP experts. So, not to miss any valuable information, I'll=20 quote some answers (for future readers of the archives), but a short=20 summary is: It's important: I don't use LSM to mirror root (see the answer by Martin=20 Moore). So, I changed to "lazy" (called also "commitment" or "overcommit")= =20 swapping mode (i.e. moved aside the symlink /sbin/swapdefault pointing to= =20 the former "primary" swap space), edited fstab removing swap1 and retaining= =20 the other, rebooted the system, and voila - "swapon -s" shows what I=20 expected. It seems, in "lazy" mode, the notion "primary swap" doesn't exist= =20 and everything relies on fstab. Some respodents have no swap space at all= =20 (I guess, if the physical memory is sufficient, which is not in my case). Just a comment: I only need such a manoeuvre for restoring the damaged=20 boot disk since there is an evidence it's the primary swap partition that= =20 is a culprit. At the same time, this system has not enough physical memory,= =20 and dump|restore surely needs swapping, so it's for the sake of avoiding=20 failure during this procedure. Fortunately, swap2 was larger than swap1. Many thanks (in the order of arrival) go to: Nikola Milutinovic James Sainsbury Meiklejohn David Paul Gallop Thomas.Blinn Steve Thompson Martin Moore Alan Rollow (glad to meet you on the list again :). Quotes from some answers and the original post are under the signature. Irene ************************************************************************* * * * Irene A. Shilikhina e-mail: irene@alpha.iae.nsk.su * * System administrator, * * Institute of Automation & Electrometry, * * Siberian Branch of Russian Academy of Sciences, * * Novosibirsk, Russia * * http://www.iae.nsk.su/~irene * ************************************************************************* * * * The road to hell is paved with good intentions. * * * ************************************************************************* From=20Meiklejohn David:=20 I use dedicated swap disks, i.e. no swap on the system disk, for one of the servers here. It runs Tru64 5.1A, so I can't tell you that 4.0D will work for certain, but I don't see why it wouldn't. Tru64 does not actually need a swap partition to boot - it will come up in overcommitment mode if one is not defined, so I'm quite sure that you will be ok. -------------------------------------------------------------------------- From=20Paul Gallop I run some v4.0d/e alphas and I have set them up without any swap space at all. =20 -------------------------------------------------------------------------- From=20Tom Blinn: In V4.0x you need to look at the /sbin/swapdefault symlink and make it point to the "primary" swap partition if you want "eager" swap mode. If you want "lazy" swap mode, remove (or move aside) the symlink so it no longer exists, and the swap choices will be made entirely from your /etc/fstab entries. =20 If your /sbin/swapdefault points to a disk partition, that partition will be used for swap even if it's not listed in /etc/fstab. In V5.x things change significantly, but you say you are using V4.0D. There is NO requirement (in any release) that you have a "primary" swap, or that it has to be on the boot disk. So you won't find any statement to that effect. However, the DEFAULT location set up by the installation procedure is always on the boot disk, in the "b" partition. It's good practice to have your swap space on a disk that isn't used for a lot else if you do a lot of swapping. If you really have enough physical memory, you can swap to any disk and the need is to have more swap space available that the combined memory needs of your entire workload, if you use "eager" swap. If you use "lazy" swap you need enough swap for all the pages that ever actually need to be swapped out at the same time. Yes, it's all rather confusing. Tom --------------------------------------------------------------------------- From=20Steve Thompson: No, the primary swap partition does not have to be on the boot device. I have many systems for which this is true. Usual disk availability considerations apply. --------------------------------------------------------------------------- From=20Martin Moore: In most cases, swap does not have to be on the same disk as root. The=20 exception (in V4 and earlier) is if you are using LSM to mirror root. In= =20 V5, even this restriction is gone. --------------------------------------------------------------------------- From=20Alan Rollow: There was a point in the history of ULTRIX (Digital's UNIX operating system before DEC OSF/1, Digital UNIX and Tru64 UNIX), that the system *dump* device had to be on the same disk as the boot disk. I think this was because the console disk driver was used to write the dump. I think. Early versions of DEC OSF/1, may have had a similar limitation though probably for a different reason. All that said, look at the other side of it. Given sufficient real memory and low enough virtual memory needs, you can get by without any page/swap space. Lacking it, you simply run in "lazy" or overcommit mode. Without a dump space, you won't be able to save a crash dump, but in a sufficiently stable system that shouldn't be an issue. I think modern versions will chain crash dumps across all necessary page/swap spaces if the primary isn't large enough. Finally, when you do run in overcommit mode, what is the "primary" page/swap space. The first one added? The one that happens to end up on the same disk as the root? I think of overcommit mode as not having a primary at all, but many (or one) secondary spaces. Given the options available in configuring page/swap space, I think it is reasonable to take an open minded view of what must be done. At the same time, I suspect most testing is done in the same old conventional configurations. Without regular and extensive testing of the more creative variants, there's no telling what subtle problems may lurk. And while such problems may not be in the operating system, 3rd parties may make assuptions about typical configurations. As a short-term workaround for a problem, you're probably safe. ---------------------------------------------------------------------------= - On Tue, 10 Jun 2003, Irene A. Shilikhina wrote: >=20 > >From the swapon manual: >=20 > Usually, the swap device number is the same as the boot device=20 > number, and the primary swap partition is partition b. >=20 > Well, "usually" doesn't mean "always". But in a far corner of my memory= =20 > there sits something which tells me that the root and primary swap partit= ions > MUST be on the same device. Unfortunately, I can't find the exact answer > in the archives. >=20 > Some explanation: >=20 > Having a problem with the system disk (confirmed with scu: Nonrecoverable > medium error, plus, for a short time, lots of error messages from uerf=20 > concerning this target), I'm getting prepared to change the disk and goin= g > to do that in a day or two. But meanwhile, I thought... >=20 > The matter is that a couple of times there was an error "Failed to write= =20 > initial header to primary swap". So, it's quite possible that the damaged= =20 > part of the disk falls on the primary swap space. The system has two swap= =20 > spaces. And I thought, why not to edit fstab switching swap1 to the other > disk, exclude swap2 and look at the situation further. At the same time,= =20 > I'm afraid it's not possible. Yes or no? Version 4.0D, if this matters. >=20 > Thanks, > Irene=20 >=20 > ************************************************************************* > * * > * Irene A. Shilikhina e-mail: irene@alpha.iae.nsk.su * > * System administrator, * > * Institute of Automation & Electrometry, * > * Siberian Branch of Russian Academy of Sciences, * > * Novosibirsk, Russia * > * http://www.iae.nsk.su/~irene * > ************************************************************************* > * * > * The road to hell is paved with good intentions. * > * * > *************************************************************************