Skip to contentSkip to conversation

swap on LVM

linux-lvm Gergely Imre 5 participants 6 messages Apr 28, 2005 – May 2, 2005

lore
Share & tools
lore
#0 lore raw

what about swap partitions on LVM? are there any known problems? can one
put swap on a LV safely?
thx.

Signature · 5 lines
Gergely Imre
SysAdmin
Astral Telecom
http://www.nextra.ro/gimre
GPG key: 0x34525305 (www.keyserver.net)
#1 lore raw
Quoted 4 lines · Gergely Imre

what about swap partitions on LVM? are there any known problems? can one put swap on a LV safely?

I've had crashes directly attributable to Swap on LVM both LVM1 and LVM2.

I've stopped setting up machines like that as a result.

Signature · 1 line
Michael T. Babcock
#2 lore raw
Quoted 4 lines · Michael T. Babcock
Quoted 2 lines · Gergely Imre

what about swap partitions on LVM? are there any known problems? can one put swap on a LV safely?

I'd say so.

Quoted 1 line

I've had crashes directly attributable to Swap on LVM both LVM1 and LVM2.

I can't confirm that, as I've been using swap partitions on LVs on several systems with both LVM1 and LVM2 for some years without problems.

Regards,
Thomas

#3 lore raw
Quoted 5 lines · Thomas Schwinge

On Thu, Apr 28, 2005 at 10:03:36AM -0400, Michael T. Babcock wrote:

I can't confirm that, as I've been using swap partitions on LVs on several systems with both LVM1 and LVM2 for some years without problems.

I also have used swap on LVM for over a year. The only problem I've ever had was with LVM1 not allowing me to swapoff any lvm-based swap partitions. For that reason, on lvm1 boxes I make a big ext2 partition and put a swap file on that. Slightly lower performance.. but I don't mind. For me swap on servers is just there to prevent the box from OOM killing stuff before I can get on and shut things down gracefully.

#4 lore raw
In reply to Thomas Schwinge
Quoted 9 lines · Thomas Schwinge
Quoted 3 lines

I've had crashes directly attributable to Swap on LVM both LVM1 and LVM2.

I can't confirm that, as I've been using swap partitions on LVs on several systems with both LVM1 and LVM2 for some years without problems.

Everything seemed to be working fine on those servers -- except that once every few months, the customer would call and complain that the machine had "locked up" without reason. Usually it was when they'd been doing something memory intensive.

In each case, moving swap onto its own partition or into a file on a non-LVM partition fixed the problem.

Signature · 1 line
Michael T. Babcock
#5 lore raw
In reply to Gergely Imre

Le 28.04.2005 15:23:16, Gergely Imre a écrit :

Quoted 5 lines

what about swap partitions on LVM? are there any known problems? can one
put swap on a LV safely?
thx.

I've a lvm2 over raid1 and the swap is in lvm. I didnt encoutered any problem.

Quoted 3 lines

--
Gergely Imre

Regards

Jean-Luc