[patch] allow crash dumps to Linux swap partitions

John-Mark Gurney jmg at funkthat.com
Thu Jan 12 01:33:43 UTC 2012


Don Lewis wrote this message on Mon, Jan 09, 2012 at 02:09 -0800:
> On  9 Jan, Nikos Vassiliadis wrote:
> > On 1/9/2012 11:25 AM, Doug Barton wrote:
> >> Actually I'm fairly confident that we write dumps backwards from the end
> >> of the swap partition. It's done that way on purpose in case fsck'ing
> >> causes the system to swap, it may still be possible to save the dump.
> > 
> > So, dumping core is safe, but not sharing the swap area...
> > It would be nice to be able to do that.
> 
> According to the mkswap(8) man page (which hasn't been updated
> since 2.2 even though the machine is running a 2.6 kernel) on a nearby
> Linux machine, the metadata stored in the first page of the swap
> partition. It looks like we could safely coexist if we skipped the first
> page of the partition. Otherwise Linux will want mkswap to be run on the
> partition before it will swap to the partition.

Don't we already skip the first 8k of the swap partition because back
in the day when bsdlabel's partition sector 0 was the same as the
slice sector 0, and so if any FS or swap wrote to the first 8k, it
would overwrite the bsdlabel?

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."


More information about the freebsd-arch mailing list