[linux-lvm] Swap on LVM - swapoff problem - more info
george.karaolides at planitis.net
Wed Apr 9 04:42:01 UTC 2003
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
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.
| 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 at planitis.net Republic of Cyprus.
More information about the linux-lvm