How to increase swap size in LVM?
My current swap file is a logical volume of a volume group. How should I go about increasing the swap size after adding another physical disk?
PS. Is it recommended to put the swap file on a partition/disk under LVM?
You could remove/resize (lvremove/lvresize) the current swap logical volume and create a larger one, but it’s probably easier to add a second swap logical volume (lvcreate, mkswap, swapon) if you really think you need it.
If you’re not really using much swap, then it really doesn’t make a lot of difference as to where it is. My personal preference is to have a small 1st priority swap partition at the outer edge of the disk (i.e., the “fast” zone) and for the rest, if present, to be 2nd priority swap buried somewhere down the disk in a partition or LVM. But swap size and location is strictly a personal preference.
|All times are GMT -5. The time now is 09:04 PM.|