All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-lvm] Swap on LVM - swapoff problem
@ 2003-04-07  2:48 George Karaolides
  2003-04-07  3:52 ` Patrick Caulfield
  0 siblings, 1 reply; 12+ messages in thread
From: George Karaolides @ 2003-04-07  2:48 UTC (permalink / raw)
  To: linux-lvm

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?

-- 
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] 12+ messages in thread

* RE: [linux-lvm] Swap on LVM - swapoff problem
@ 2003-04-07  3:33 Koch, Steffen
  0 siblings, 0 replies; 12+ messages in thread
From: Koch, Steffen @ 2003-04-07  3:33 UTC (permalink / raw)
  To: 'linux-lvm@sistina.com'

> 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
devices are no longer available due to system shutdown. LVM's are turned off
before swap space. Try to change that for shutdown.

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

* Re: [linux-lvm] Swap on LVM - swapoff problem
  2003-04-07  2:48 [linux-lvm] Swap on LVM - swapoff problem George Karaolides
@ 2003-04-07  3:52 ` Patrick Caulfield
  0 siblings, 0 replies; 12+ messages in thread
From: Patrick Caulfield @ 2003-04-07  3:52 UTC (permalink / raw)
  To: linux-lvm

On Mon, Apr 07, 2003 at 10:47:47AM +0300, George Karaolides wrote:
> 
> 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

swapoff /dev/vg1/swap 

might be a better command to use :-)

patrick

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

* Re: [linux-lvm] Swap on LVM - swapoff problem
@ 2003-04-07  7:30 George Karaolides
  2003-04-07  8:22 ` Patrick Caulfield
  0 siblings, 1 reply; 12+ messages in thread
From: George Karaolides @ 2003-04-07  7:30 UTC (permalink / raw)
  To: linux-lvm

Hi Patrick,

> > swapoff: /dev/vg1: Invalid argument
>
> swapoff /dev/vg1/swap 
>
> might be a better command to use :-)

Sorry, typo. I _did_ mean /dev/vg1/swap.  And it didn't work...

-- 
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] 12+ messages in thread

* Re: [linux-lvm] Swap on LVM - swapoff problem
@ 2003-04-07  7:33 George Karaolides
  0 siblings, 0 replies; 12+ messages in thread
From: George Karaolides @ 2003-04-07  7:33 UTC (permalink / raw)
  To: linux-lvm

Hi Steffen,

> devices are no longer available due to system shutdown. LVM's are 
> turned off before swap space. Try to change that for shutdown.

The problem also occurs when I try to execute swapoff while the system
is running and logical volumes are active.

Thanks,

-- 
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] 12+ messages in thread

* Re: [linux-lvm] Swap on LVM - swapoff problem
  2003-04-07  7:30 George Karaolides
@ 2003-04-07  8:22 ` Patrick Caulfield
  0 siblings, 0 replies; 12+ messages in thread
From: Patrick Caulfield @ 2003-04-07  8:22 UTC (permalink / raw)
  To: linux-lvm

On Mon, Apr 07, 2003 at 03:30:34PM +0300, George Karaolides wrote:
> Hi Patrick,
> 
> > > swapoff: /dev/vg1: Invalid argument
> >
> > swapoff /dev/vg1/swap 
> >
> > might be a better command to use :-)
> 

Odd, it seems fine here. what version LVM are you using ?
-- 

patrick

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

* Re: [linux-lvm] Swap on LVM - swapoff problem
@ 2003-04-07  8:31 George Karaolides
  2003-04-07  8:41 ` Patrick Caulfield
  0 siblings, 1 reply; 12+ messages in thread
From: George Karaolides @ 2003-04-07  8:31 UTC (permalink / raw)
  To: linux-lvm

Hi Patrick,

> Odd, it seems fine here. what version LVM are you using ?

1.0.4 on Debian GNU/Linux 3.0r1 "woody"

Some machines have the Debian package from stable (version 1.0.4-4) and
some the version from testing (version 1.0.4-6)

The problem is identical on all machines: swapoff does not work if the
LVM swap device is listed in /etc/fstab, but works just fine if swap on
the LVM swap device is started manually with swapon after the system
starts.

Thanks,

|   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] 12+ messages in thread

* Re: [linux-lvm] Swap on LVM - swapoff problem
  2003-04-07  8:31 George Karaolides
@ 2003-04-07  8:41 ` Patrick Caulfield
  0 siblings, 0 replies; 12+ messages in thread
From: Patrick Caulfield @ 2003-04-07  8:41 UTC (permalink / raw)
  To: linux-lvm

On Mon, Apr 07, 2003 at 04:31:33PM +0300, George Karaolides wrote:
> Hi Patrick,
> 
> > Odd, it seems fine here. what version LVM are you using ?
> 
> 1.0.4 on Debian GNU/Linux 3.0r1 "woody"
> 
> Some machines have the Debian package from stable (version 1.0.4-4) and
> some the version from testing (version 1.0.4-6)

Actually, I'm more interested in the kernel LVM version. The tools have no
impact on how swappping works. Sorry I should have said. The first line of
/proc/lvm/global should tell you that.
 
> The problem is identical on all machines: swapoff does not work if the
> LVM swap device is listed in /etc/fstab, but works just fine if swap on
> the LVM swap device is started manually with swapon after the system
> starts.

Yes, I tried that. You should check that that when you do swapoff that the
device actually exists: and that the major/minor matches that of the device
when it was swapped on. I think /proc/swaps should tell you this.
-- 

patrick

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

* Re: [linux-lvm] Swap on LVM - swapoff problem
@ 2003-04-07  9:10 George Karaolides
  2003-04-07  9:22 ` Patrick Caulfield
  0 siblings, 1 reply; 12+ messages in thread
From: George Karaolides @ 2003-04-07  9:10 UTC (permalink / raw)
  To: linux-lvm

Hi Patrick,

> Actually, I'm more interested in the kernel LVM version. The tools 
> have no impact on how swappping works. Sorry I should have said. The 
> first line of /proc/lvm/global should tell you that.

2.4.18 machines:

# cat /proc/lvm/global
LVM module LVM version 1.0.1-rc4(ish)(03/10/2001)

2.4.20 machines:

# cat /proc/lvm/global
LVM module LVM version 1.0.5+(22/07/2002)

> You should check that that when you do swapoff that the
> device actually exists: and that the major/minor matches that of the 
> device when it was swapped on. I think /proc/swaps should tell you
> this.

I can't see anything about device major/minor nos. in /proc/swaps:

# cat /proc/swaps
Filename                        Type            Size    Used    Priority
/dev/vg1/swap                   partition       1048568 0       -1

Of course I can see the major/minor nos. if I list the device:

# ls -l /dev/vg1/swap
brw-rw----    1 root     disk      58,   1 Apr  5 22:28 /dev/vg1/swap

So now I need to check if these are the same as when the device was
swapped on.  But no info in /proc/swaps...

-- 
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] 12+ messages in thread

* Re: [linux-lvm] Swap on LVM - swapoff problem
  2003-04-07  9:10 George Karaolides
@ 2003-04-07  9:22 ` Patrick Caulfield
  0 siblings, 0 replies; 12+ messages in thread
From: Patrick Caulfield @ 2003-04-07  9:22 UTC (permalink / raw)
  To: linux-lvm

On Mon, Apr 07, 2003 at 05:10:26PM +0300, George Karaolides wrote:
> Hi Patrick,
> 
> > Actually, I'm more interested in the kernel LVM version. The tools 
> > have no impact on how swappping works. Sorry I should have said. The 
> > first line of /proc/lvm/global should tell you that.
> 
> 2.4.18 machines:
> 
> # cat /proc/lvm/global
> LVM module LVM version 1.0.1-rc4(ish)(03/10/2001)
> 
> 2.4.20 machines:
> 
> # cat /proc/lvm/global
> LVM module LVM version 1.0.5+(22/07/2002)

If it was just the 2.4.18 machines I would suggest you get a later LVM, but if
the 2.4.20 boxes do it too then that's obviously not going to help.
 
> > You should check that that when you do swapoff that the
> > device actually exists: and that the major/minor matches that of the 
> > device when it was swapped on. I think /proc/swaps should tell you
> > this.
> 
> I can't see anything about device major/minor nos. in /proc/swaps:
> 
> # cat /proc/swaps
> Filename                        Type            Size    Used    Priority
> /dev/vg1/swap                   partition       1048568 0       -1
> 
> Of course I can see the major/minor nos. if I list the device:
> 
> # ls -l /dev/vg1/swap
> brw-rw----    1 root     disk      58,   1 Apr  5 22:28 /dev/vg1/swap
> 
> So now I need to check if these are the same as when the device was
> swapped on.  But no info in /proc/swaps...

I think /proc/swaps works out the name from the major.minor so that's probably
right.

It could just be that the machine has not enough memory to hold all the
processes VM state., but I think it should return ENOMEM for that situation.


/me is baffled.
-- 

patrick

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

* [linux-lvm] Swap on LVM - swapoff problem
@ 2003-04-07  9:29 George Karaolides
  2003-04-07  9:35 ` Patrick Caulfield
  0 siblings, 1 reply; 12+ messages in thread
From: George Karaolides @ 2003-04-07  9:29 UTC (permalink / raw)
  To: linux-lvm

Hi Patrick,

> It could just be that the machine has not enough memory to hold all
> the processes VM state., but I think it should return ENOMEM for that
> situation.

Wouldn't the memory requirement be the same for the case where I comment
out the swap device line in /etc/fstab and start swap manually?  But it
works OK then...

-- 
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] 12+ messages in thread

* Re: [linux-lvm] Swap on LVM - swapoff problem
  2003-04-07  9:29 George Karaolides
@ 2003-04-07  9:35 ` Patrick Caulfield
  0 siblings, 0 replies; 12+ messages in thread
From: Patrick Caulfield @ 2003-04-07  9:35 UTC (permalink / raw)
  To: linux-lvm

On Mon, Apr 07, 2003 at 05:29:13PM +0300, George Karaolides wrote:
> Hi Patrick,
> 
> > It could just be that the machine has not enough memory to hold all
> > the processes VM state., but I think it should return ENOMEM for that
> > situation.
> 
> Wouldn't the memory requirement be the same for the case where I comment
> out the swap device line in /etc/fstab and start swap manually?  But it
> works OK then...
> 

probably, I did say I was baffled.


patrick

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

end of thread, other threads:[~2003-04-07  9:35 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-07  2:48 [linux-lvm] Swap on LVM - swapoff problem George Karaolides
2003-04-07  3:52 ` Patrick Caulfield
  -- strict thread matches above, loose matches on Subject: below --
2003-04-07  3:33 Koch, Steffen
2003-04-07  7:30 George Karaolides
2003-04-07  8:22 ` Patrick Caulfield
2003-04-07  7:33 George Karaolides
2003-04-07  8:31 George Karaolides
2003-04-07  8:41 ` Patrick Caulfield
2003-04-07  9:10 George Karaolides
2003-04-07  9:22 ` Patrick Caulfield
2003-04-07  9:29 George Karaolides
2003-04-07  9:35 ` Patrick Caulfield

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.