1748054 Members
4929 Online
108758 Solutions
New Discussion юеВ

Re: Swap Space VG01

 
Craig_130
New Member

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 3
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
I work for HPE

[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
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!