Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
Showing results for 
Search instead for 
Did you mean: 

Swap Space VG01

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
Dave Olker

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.


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!