cancel
Showing results for 
Search instead for 
Did you mean: 

Swap Space VG01

Craig_130
Occasional Visitor

Swap Space VG01

Hello All, I want to create 4gig of swap space on /dev/vg01, please help with the lvcreate syntax? for some reason I keep second guessing
3 REPLIES
Dave Olker
HPE Pro

Re: Swap Space VG01

Hi Craig,

Have you tried using SAM?

Disks and Filesystems -> Logical Volumes -> (Actions Pull Down Menu) -> Create

From this screen, select the Volume Group, then select "Define New Logical Volumes". From this screen in the "Usage" menu select "Swap Device". You can specify the size, the name of the volume, the swap priority, when to enable the swap device, etc.

Regards,

Dave
Bill Hassell
Honored Contributor

Re: Swap Space VG01

lvcreate -L 4000 vg01

If this succeeds, use the lvol name that was automatically created (eg, lvol1) and:

swapon /dev/vg01/lvol1

You'll need to add lvol1 to fstab to make this extra swap space activate automatically after a reboot.


Bill Hassell, sysadmin
Jeff Schussele
Honored Contributor

Re: Swap Space VG01

Hi Craig,

It's pretty straight forward:

lvcreate -L 4000 -n lvswap vg01

Then *do not* create a filesystem - instead add the following line to the /etc/fstab file

/dev/vg01/lvswap swap ... 0 0 0

At this point you can activate it with

swapon -a

IF you kernel parms will support this extra swap it will come right on-line. IF not then you'll
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!