1832438 Members
4313 Online
110042 Solutions
New Discussion

Re: creating swap space

 
SOLVED
Go to solution
Arnold_14
Advisor

creating swap space

Hi,

I have allocated a swap space on /dev/vg00/swap about 12G. Using the command "swapinfo", it's showing up fine.

Under SAM, the primary swap is set to none, and using lvlnboot -v, it says "no swap/dump configured"

I'm trying to do "lvlnboot -s /dev/vg00/swap" and it complains that the LV must be contiguous.

How do I fix this issue?

Thanks
Arnold
9 REPLIES 9
Steven E. Protter
Exalted Contributor

Re: creating swap space

your system appears to be confused.

I recommend starting over.

lvremove /dev/vg00/swap

Use sam to add in new swap.

You will be forced to boot after configuration to get swap working, which may be the problem in the first place btw. You might want to check that.

I also favor allocating swap in smaller chunks. Lets say you have 8 GB primary memory, make a priority 0 swap for 4 GB, then a priority 1 for 8 GB. This will give you better light/medium load performance.

Also whatever the size of your swap areas the individual areas themselves need to be contiguous.

If you could elaborate on the process used to create the swap, I could elaborate on the process to correct this situation without starting over.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Sundar_7
Honored Contributor

Re: creating swap space

With LVM, swap should always be the second LV on VG00 and should be contiguous with bad block relocation disabled.

Are you trying to add a secondary swap inaddition to the primary one ?

In swapinfo whatelse is showing up ? - Only the pseudo swap (memory) and the /dev/vg00/swap ?

lvlnboot -s lvol2 /dev/vg00

Try the above command.

12 Gigbytes of swap ? - how much is the total RAM you have ?
Learn What to do ,How to do and more importantly When to do ?
SS_6
Valued Contributor
Solution

Re: creating swap space

lvremove this file system and create new swap file system with contiguous allocation. Using SAM would be more easier for you.Use the same prioriry as you have in another swap file system.
By providing solutions I am helping myself
Arnold_14
Advisor

Re: creating swap space

I think I did something bad.

This is what I did. The system came with lvol2 as a swap/dump space, which was small. So I created a different swap (/dev/vg00/swap) and blew away the lvol2. I was thinking that I did not need lvol2 anymore and just used the new swap. i did most of my work using SAM by the way.

After a couple reboots, the machine went up fine, no problem. Doing a swapinfo, it shows up the new swap, and no more lvol2.

I just tried to do lvlnboot -v, and it said no swap/dump space available, which is bad.

So I guess my goal is, to have a primary swap back online.

Thanks a lot
-a
Geoff Wild
Honored Contributor

Re: creating swap space

To make your "new" swap primary - try:

lvlnboot -s swap vg00



From man page:
/usr/sbin/lvlnboot [[-A autobackup] { -b boot_lv | -d dump_lv | -r root_lv | -R | -s swap_lv }] [-v] [vg_name]



Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Geoff Wild
Honored Contributor

Re: creating swap space

Forgot to mention - you have to reboot after the lvlnboot -s command....

-s swap_lv Define swap_lv to be the primary swap volume the next time the system is booted on the volume group. swap_lv must be a contiguous logical volume, and a root logical volume must have been previously defined with this command.

The command updates the Boot Data Reserved Area of each bootable physical volume in the volume group (see pvcreate(1M) ). Any existing swap area previously defined must be removed via lvrmboot(1M) .

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Arnold_14
Advisor

Re: creating swap space

I re-created lvol2 using SAM as a swap device. Under SWAPINFO, it's showing up fine. When I do lvlnboot -s /dev/vg00/lvol2, I get:

# lvlnboot -s /dev/vg00/lvol2
lvlnboot: Logical Volume "/dev/vg00/lvol2" must be contiguous

# lvlnboot -s lvol2 vg00
The volume group to which the logical volume "lvol2" belongs
could not be found. The logical volume path is probably wrong.

Thanks
Arnold
KapilRaj
Honored Contributor

Re: creating swap space

What I would do is to create a temp filesystem which will hogg the whole size except the space between BOOT <<====>> ROOT.

Then hpux -lm (maint mode)

lvcreate -C y -r n -n lvol2 -L
lvlnboot -s /dev/vg00/lvol2
lvlnboot -d /dev/vg00/lvol
lvlnboot -R /dev/vg00
reboot

once node is up remove the temp lv

Regds,

Kaps
Nothing is impossible
KapilRaj
Honored Contributor

Re: creating swap space

Use lvdisplay -v for lvol1 and lvol3 to find out whether they are contegous

Regds,

Kaps
Nothing is impossible