From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96075324106807.tru64-unix-managers.marc@archive.invalid> From: "Dave Wolinski, University of Michigan" () sws1 ! CTD ! ORNL ! GOV Date: Fri, 27 Oct 1995 16:49:00 +0000 To: tru64-unix-managers Subject: SUMMARY: swap on partition A ??? X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96075324106807 Followup-To: poster Precedence: bulk Original question: Is there any danger of overwriting the disklabel if I use partition A for swap? Thanks to all who replied: jmh@rto.dec.com (Jan Mark Holzer) Shen Bing Shiung joe@resptk.bhp.com.au olle@cb.uu.se (Olle Eriksson) Hellebo Knut David Warren "Paul E. Rockwell" Pat Huber Anthony D'Atri David R Courtade gaich@Sales.TGV.COM (Dragan Gaich) Mike Matthews, Mike_Matthews@sgate.com Anne Henderson "Bernt Christandl" Tom Blinn Answer: The overwhelming majority of people advised me to NOT use partition A for swap, because: The disklabel is written to block 0 of the disk. The default partiton A begins at block 0, so there is a real danger that the swap space will overwrite the disk partition, and you won't be able to mount any filesystems on that disk. This may not happen for a long time, but the general consensus was is that it will eventually, particularly when swap space is heavily used. ( I received definite confirmations of this problem from people using SunOS 4.0 and ULTRIX, but no one was absolutely sure about Digital Unix.) --------------------- Quoting Sean Watson: At least under Ultrix, there was a message a while back about a swap partition which uses block 0 of a disk overwritting the partition table. As I understand it, a filesystem puts its superblock at block 0 when it is used on such a partition and knows to build it "around" the partition table. The kernel's pager (which reads/writes virtual memory to and from the swap partitions) in Ultrix wasn't smart enough to avoid the partition table. --------------------- and Anne Henderson: NEVER put swap partitions, or partitions that are to be used as raw devices, at the start of the disk. Always have filesystems or unused buffer zones. --------------------- and Olle Eriksson: You can use the whole disk (ie the c partition) as swapspace without any a-partition because in that case it doesn't matter that the disk is un-labeled. --------------------- Other solutions included making a small A partition (a few blocks) and using partition B for swap; or, just make sure that your swap partition does not start at block 0, but some later block (is block 1 safe?). --------------------- One alternate solution, from Paul E. Rockwell: Another idea is to put the disk under the control of LSM (if you're already running LSM, that is), create a volume for non-file system use, and set up secondary swap to that volume. Yes, you can do this (see the LSM documentation for particulars). That way you don't worry about the disk label, and you don't lose that much in performance. You can also do stuff like mirror the swap, move it to another disk (if the original is going bad), resize it, etc... --------------------- -Dave Wolinski, University of Michigan Physics