Linux LVM users
 help / color / mirror / Atom feed
* [linux-lvm] Swap on LVM - swapoff problem - more info
@ 2003-04-09  4:42 George Karaolides
  2003-04-09  6:38 ` Alasdair G Kergon
  0 siblings, 1 reply; 2+ messages in thread
From: George Karaolides @ 2003-04-09  4:42 UTC (permalink / raw)
  To: linux-lvm, debian-user, patrick

Re. the problem with swapoff returning "invalid argument" with LVM
devices on a Debian woody system, I now have some more info.

The problem is caused by running vgscan while swap is active on the LVM
device (not necessarily actually using swap space; just active).  If
after that a swapoff is attempted, swapoff returns "Invalid argument".

The lvm init script runs vgscan, and where LVM has already been
activated using initrd and an LVM swap device is already activated, this
breaks swapoff.

I modified the "start" case of the lvm init script to run swapoff before
running vgscan, and swapon after.  That solved the problem.  I don't
know if this will cause any other problems, but I don't think it will.

When swapping on LVM, swapoff must be run before running vgscan
manually, too, or swapoff will break again.

-- 
Best regards,

|   George Karaolides                      Planitis Communications Ltd.,
|
|   tel:   +357 22 45 65 00              Office 102, 11 Florinis Street,
|
|   web:   www.planitis.net                             Nicosia CY 1065,
|
|   email: george.karaolides@planitis.net           Republic  of Cyprus.
|

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-04-09  6:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-09  4:42 [linux-lvm] Swap on LVM - swapoff problem - more info George Karaolides
2003-04-09  6:38 ` Alasdair G Kergon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox