Reclaim disk space doesn't reuse existing swap, should it?

John Reiser jreiser at bitwagon.com
Fri Dec 7 15:30:50 UTC 2012


On 12/07/2012 06:47 AM, Richard Ryniker wrote:
> Probably not.  There are too many possibilities to make reasonable any
> default except "do what the user explicitly says is desired".

Except that for many years installing has collected all discoverable
swap partitions, and put them into /etc/fstab for use as swap.  This has
resulted in time bombs.  I often have one swap partition per spindle,
exactly so that any OS with a root on another spindle still will run
when a drive fails.  Systemd has changed the way things work: an "absent"
swap partition now causes a mysterious 90-second timeout at boot,
which looks like an unexplained failure.  See:
   https://bugzilla.redhat.com/show_bug.cgi?id=872369
   "RFE: add mount option 'nofail' for discovered swap partitions"

> 
> The usual problems are hot-swap devices (USB, ESATA, etc.) that may be
> present during installation but not later, and swap spaces intended for
> other operating systems than the one currently being installed.
> 
> It seems prudent to have the installer perform mkswap on any spaces the
> user identifies for use by this installed system, 

NO! NO! NO!  Do NOT format any partition, including swap partitions,
except when explicitly requested.  I want to share _some_ swap partitions,
but running mkswap destroys the UUID and/or label which other /etc/fstab depend on.
In particular, I want to share the swap partition as the primary swap
partition for all OS on the same drive.  For better performance
I'll allow using the swap partitions on other drives.  But I don't want
the "temporary" non-appearance of a swap partition on some other drive
to interfere with booting when the swap partition on the same drive
is working fine.  Again, see bug 872369.

> but mkswap will destroy
> data in a swap space in use by another (perhaps hibernating) system.
[snip]
> 
> There are cases where shared swap spaces may make sense.  I think
> these are more appropriate to set up after installation, with edits to
> /etc/fstab, than with additional complexity in the system installer.

That would be a change from past practice.  Some of that change is good,
but on a box with only one drive I should be able to install another OS
which shares the same swap partition [on that drive] without having
to edit /etc/fstab later, and without having the installer re-format
the shared swap partition unless I explicitly request that.

-- 



More information about the test mailing list