Hibernate with LVM Swap

Lamont R. Peterson lamont at gurulabs.com
Sat Jun 10 17:08:46 UTC 2006


On Saturday 10 June 2006 08:25am, Chris Tyler wrote:
> I've been playing around with hibernate in rawhide and notice that it
> doesn't work with an LVM-based swap space -- yet Anaconda's default disk
> layout sets up swap on LVM (which is, except for the hibernate issue,
> probably the Right Thing(tm)). Suspend isn't working on my test machine
> due to broken BIOS (from a 4-letter system vendor where the 3rd and 4th
> characters of the name are the same).

I've been using LVM for my laptops and workstations for over two years now 
(i.e. before it became "popular" :) ).  In all that time, I've always kept my 
one swap partition on a standard old partition and *not* in LVM.

Swap works best when you don't have extra layers of abstraction and when the 
swap device is contiguous storage.  I know; LVM only adds a tiny bit of 
overhead, but when you start hammering on swap, every last ounce helps.

If you ever resize an LVM swap, it's very unlikely to remain contiguous 
(however, I'm sure none of your swapped memory pages will ever be split over 
PE boundaries).  Still, every bit helps when you have to get into swap.  I 
have created a temporary swap LVM once or twice to provide extra swap for 
some operation.  Sure, it was slow, but it got the job done and then I 
removed the extra LVM swap.

However, I've never tried hibernate with LVM swap, so I can't speak to that, 
directly.  I have seen a friend do it successfully once, but I have no idea 
what gyrations he had to go through (if any) to make it happen.

Anyway, I recommend to keep the "main" swap device on a regular old partition 
and not in LVM, but to put everything else (well, of course, not /boot/) in 
LVM.

HTH.

[snip]
-- 
Lamont R. Peterson <lamont at gurulabs.com>
Senior Instructor
Guru Labs, L.C. [ http://www.GuruLabs.com/ ]
GPG Key fingerprint: F98C E31A 5C4C 834A BCAB  8CB3 F980 6C97 DC0D D409
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.fedoraproject.org/pipermail/devel/attachments/20060610/4d7f7f95/attachment-0002.bin 


More information about the devel mailing list