LVM and VxVM

extending swap space on hpux v2 machine rp3440

 
shabash
Frequent Advisor

extending swap space on hpux v2 machine rp3440

i have upgradated the system memory from 4gb to 8gb.
my previous swap is 4096
now after increasing 8gb memory i want to extend the lvol swap space to 8gb.

whenever i run the command it gave me error
strict contigious policy .

whts the proper way to extend swap space

someone??
4 REPLIES 4
James R. Ferguson
Acclaimed Contributor

Re: extending swap space on hpux v2 machine rp3440

Hi:

You can't extend primary swap without contiguous physical disk extents as you have found. There are a few ways to do this is you would insist; the safest being to re-Ignite your server and resize your swap space at that time.

Secondary or primary device swap are equivalent. Simply add secondary device swap.

Do something like:

# lvcreate -C y -r n -L 8192 -n lvolN /dev/vgXX
# swapon -p /dev/vgXX/lvolN

See the manpages for more information. You can do this without a reboot. Remember to add activation of the secondary device swap so built to '/etc/fstab':

/dev/vgXX/lvolN ... swap pri=0 0 0

As you can see, the secondary device swap can be on any volume group you choose.

Regards!

...JRF...
Ganesan R
Honored Contributor

Re: extending swap space on hpux v2 machine rp3440

Hi,

It is not compulsory to extend the primary swap. You can always the secondary swap.

Follow the steps provided by James, or use SAM to create the secondary swap.
Best wishes,

Ganesh.
shabash
Frequent Advisor

Re: extending swap space on hpux v2 machine rp3440

i have tested swap size on another test machine.this machien have already swap space 1592 i.e on lvol2

What i did is by running ur provided command
lvcreate ......

it create a logical volume but giving error of not enough LE available.

In volumegroup i have limited space available
wht i need is to test on this machine and then deploy in production systems.

now i have to assign size to logical extend new volume for swap.

how i proceed further.
# lvdisplay /dev/vg00/lvol2
--- Logical volumes ---
LV Name /dev/vg00/lvol2
VG Name /dev/vg00
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 1592
Current LE 398
Allocated PE 398
Stripes 0
Stripe Size (Kbytes) 0
Bad block off
Allocation strict/contiguous
IO Timeout (Seconds) default

# lvdisplay /dev/vg00/lvol9
--- Logical volumes ---
LV Name /dev/vg00/lvol9
VG Name /dev/vg00
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 0
Current LE 0
Allocated PE 0
Stripes 0
Stripe Size (Kbytes) 0
Bad block off
Allocation strict/contiguous
IO Timeout (Seconds) default

# vgdisplay /dev/vg00
--- Volume groups ---
VG Name /dev/vg00
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 10
Open LV 10
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 4350
VGDA 4
PE Size (Mbytes) 4
Total PE 8680
Alloc PE 8608
Free PE 72
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

# lvcreate -l 100 -n lvol9 vg00
lvcreate: Logical volume "/dev/vg00/lvol9" already exists.
# lvdisplay /dev/vg00/lvol9
--- Logical volumes ---
LV Name /dev/vg00/lvol9
VG Name /dev/vg00
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 0
Current LE 0
Allocated PE 0
Stripes 0
Stripe Size (Kbytes) 0
Bad block off
Allocation strict/contiguous
IO Timeout (Seconds) default

# lvextend -l 100 /dev/vg00/lvol9
lvextend: Not enough free physical extents available.
Logical volume "/dev/vg00/lvol9" could not be extended.
Failure possibly caused by contiguous allocation policy.
Failure possibly caused by strict allocation policy
Prashanth Waugh
Esteemed Contributor

Re: extending swap space on hpux v2 machine rp3440

Hi
As the ganeshan suggested you can craete the secondary device swap on vg00 or other than vg00.for that first check you have ample free PE available or not. if not you can use vg01 for device swap.

In your case
1) # lvcreate -l 100 -n lvol9 vg00
lvcreate: Logical volume "/dev/vg00/lvol9" already exists

you tried the to create the lv but its already exit thats why the message is lv alraedy exit so you have to select new lv for eg:- lvol10


=========================================================================================
IN your case you can achive your objective by 2 ways

1) Cretae the new device swap it will be secondary device swap
2) if you want to extend the primary device swap then you have to go through ignite restore procedure. while restoring you can modify the swap option. but for that server down will be require.

Best option is add the seconday device swap. you will get the number of thread for swap on forum. pls serach it

Regards
Prashnat
For success, attitude is equally as important as ability