[linux-lvm] swap lv
Holger.Rauch at heitec.de
Tue Oct 24 16:40:45 UTC 2000
First of all, thanks a lot for your quick reply!
On Tue, 24 Oct 2000, Mark Phillips wrote:
> Holger Rauch [Holger.Rauch at heitec.de] wrote:
> > Is it possible to have only one swap partition that resides on an LV? If
> > so, how can this be achieved? Are swap LVs resizable?
> I'm not quite sure what you mean by your first question.
What I mean is whether the swap partition residing on an LV may be the
only swap partition that's found on the system. Or do I need a normal swap
partition that resides on a "real" partition?
> But yes, you
> can have a single lv which acts as a swap partition. You need to
> create the partition. Then use mkswap on it, and then mount it as
> swap. For example, I have the line:
> /dev/main_vg/swap_lv none swap sw 0 0
> in my /etc/fstab file.
> As for resizing a swap partition. What I would do is as follows.
> First unmount your swap partition so that you are not using it
> anymore. Then delete the partition. Then create it again, making it
> a different size. Then run mkswap again and mount it again.
> (Not that I have actually tried this myself, but I don't see why it
> wouldn't work.)
Isn't there a danger that while the swap LV is unmounted one can run out
of memory? What I mean is that there is almost always a small amount of
swap space that's used by the system. When I really unmount the swap
partition, I'm taking this space away from the system and I'm afraid that
this will cause unexpected results.
More information about the linux-lvm