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

Richard Ryniker ryniker at alum.mit.edu
Fri Dec 7 21:33:45 UTC 2012


John Reiser <jreiser at bitwagon.com> wrote on Fri, 07 Dec 2012 07:30:50 -0800
>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.

I still think it is better to arrange shared swap spaces after
installation of a new system.

Yes, the installer could offer the option to format or not format a swap
space.  Certainly, if the installer creates a new swap space, it must be
formatted.  For an existing swap space... it's more complicated.  Must
the installer ascertain whether an existing swap space is correctly
formatted?  Should the installer offer a facility to set priority values
for swap spaces used by the new system?

What about page size?  I am no expert (well, maybe a modest expert), but
I think linux supports four page sizes on Intel processors: 4, 8, 16, and
64 KBytes [see:  arch/ia64/include/asm/page.h].  Swap spaces must be
formatted for the appropriate page size.

Rather than ask the installer to handle an issue this complex, which can
readily be arranged after installation, I prefer the installer be limited
to things that cannot reasonably be done later.

If the installer permits a request to include a swap space without formatting
it, it should refuse if this existing swap space cannot be used by the
kernel it will install.  Without this check, it seems all to easy for a
user to think he has a swap space when it actually will not be used.

I must admit I have never tested how astute the Fedora installer is about
swap spaces.  Maybe it is terribly clever, and everything always comes out
right.  I'll try a test the next time I install.


More information about the test mailing list