Skip to contentSkip to conversation

Swap on LVM - swapoff problem

linux-lvm George Karaolides 2 participants 2 messages Apr 7, 2003

lore
Share & tools
lore
#0 lore raw

Hi all,

I am swapping on lvm devices and aving a strange problem with swapoff.

I have the swap device configured in /etc/fstab, the relevant line is:

/dev/vg1/swap none swap sw 0 0

swap seems to work OK but I have a strange problem with swapoff:

# swapoff /dev/vg1
swapoff: /dev/vg1: Invalid argument

If I comment out the swap line in /etc/fstab and start the swap manually with swapon after system boot, then swapoff and swapon seem to work as expected.

OS: Debian 3.0r1 "woody"

Kernel: 2.4.18, 2.4.18 patched with VFS lock patch, and 2.4.20 patched with VFS lock patch (problem is the same on various machines running all these kernels).

The problem occurs in the same way on LVM swap devices built on disk partition physical volumes, and also on software-RAID physical volumes.

Any ideas?

Signature · 10 lines
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: [email protected]           Republic  of Cyprus.
|
#1 lore raw
Quoted 5 lines · George Karaolides

Hi all,

I am swapping on lvm devices and aving a strange problem with swapoff.

Quoted 8 lines

I have the swap device configured in /etc/fstab, the relevant line is:

/dev/vg1/swap none swap sw 0 0

swap seems to work OK but I have a strange problem with swapoff:

# swapoff /dev/vg1
swapoff: /dev/vg1: Invalid argument

swapoff /dev/vg1/swap

might be a better command to use :-)

patrick