Operating System - HP-UX
1848432 Members
6237 Online
104027 Solutions
New Discussion

Mirroring swap space (HPUX11.11)

 
SOLVED
Go to solution
Mark Parsons
Valued Contributor

Mirroring swap space (HPUX11.11)

Hi,

I have created some additional swap devices on my machine and I am now trying to mirror them. The output for the volume group vg00 is as follows:

# vgdisplay -v vg00
--- Volume groups ---
VG Name /dev/vg00
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 12
Open LV 12
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 8598
Free PE 82
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

--- Logical volumes ---
LV Name /dev/vg00/lvol1
LV Status available/syncd
LV Size (Mbytes) 300
Current LE 75
Allocated PE 150
Used PV 2

LV Name /dev/vg00/lvol2
LV Status available/syncd
LV Size (Mbytes) 2048
Current LE 512
Allocated PE 1024
Used PV 2

LV Name /dev/vg00/lvol3
LV Status available/syncd
LV Size (Mbytes) 300
Current LE 75
Allocated PE 150
Used PV 2

LV Name /dev/vg00/lvol4
LV Status available/syncd
LV Size (Mbytes) 1500
Current LE 375
Allocated PE 750
Used PV 2

LV Name /dev/vg00/lvol5
LV Status available/syncd
LV Size (Mbytes) 3000
Current LE 750
Allocated PE 1500
Used PV 2

LV Name /dev/vg00/lvol6
LV Status available/syncd
LV Size (Mbytes) 1000
Current LE 250
Allocated PE 500
Used PV 2

LV Name /dev/vg00/lvol7
LV Status available/syncd
LV Size (Mbytes) 1500
Current LE 375
Allocated PE 750
Used PV 2

LV Name /dev/vg00/lvol8
LV Status available/syncd
LV Size (Mbytes) 2548
Current LE 637
Allocated PE 1274
Used PV 2

LV Name /dev/vg00/lvol9
LV Status available/syncd
LV Size (Mbytes) 1500
Current LE 375
Allocated PE 750
Used PV 2

LV Name /dev/vg00/lvol11
LV Status available/syncd
LV Size (Mbytes) 2000
Current LE 500
Allocated PE 500
Used PV 1

LV Name /dev/vg00/lvol12
LV Status available/syncd
LV Size (Mbytes) 4500
Current LE 1125
Allocated PE 1125
Used PV 2

LV Name /dev/vg00/lvol13
LV Status available/syncd
LV Size (Mbytes) 500
Current LE 125
Allocated PE 125
Used PV 1


--- Physical volumes ---
PV Name /dev/dsk/c1t2d0
PV Status available
Total PE 4340
Free PE 0
Autoswitch On
Proactive Polling On

PV Name /dev/dsk/c2t2d0
PV Status available
Total PE 4340
Free PE 82
Autoswitch On
Proactive Polling On

Primary swap is on lvol2 which is mirrored (used PV = 2) with secondary swap on lvol9, lvol11, lvol12 and lvol13. Lvol9 and lvol12 are mirrored but lvol11 and lvol13 aren't. How do I get these two mirrored?

Many thanks - Mark P.
11 REPLIES 11
R.O.
Esteemed Contributor

Re: Mirroring swap space (HPUX11.11)

Hi,

I should be:

lvextend -m 1 /dev/vg00/lvol11 /dev/dsk/c2t2d0
lvextend -m 1 /dev/vg00/lvol13 /dev/dsk/c2t2d0

BUT you seem have no enough space in your "/dev/dsk/c2t2d0" disk : Free PE 82.

You need 500 + 125 Free PE....

Regards,
"When you look into an abyss, the abyss also looks into you"
Torsten.
Acclaimed Contributor

Re: Mirroring swap space (HPUX11.11)

At the moment you cannot.

Your disks are full.



However, why creating up to 4 different swap spaces on the same disk???

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Mark Parsons
Valued Contributor

Re: Mirroring swap space (HPUX11.11)

Swapinfo looks like this:

# swapinfo
Kb Kb Kb PCT START/ Kb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 2097152 0 2097152 0% 0 - 1 /dev/vg00/lvol2
dev 1536000 56964 1479036 4% 0 - 0 /dev/vg00/lvol9
dev 2048000 0 2048000 0% 0 - 2 /dev/vg00/lvol11
dev 4608000 0 4608000 0% 0 - 3 /dev/vg00/lvol12
dev 512000 58456 453544 11% 0 - 0 /dev/vg00/lvol13
reserve - 5739608 -5739608
memory 4952788 338620 4614168 7%

If I was to delete the swap on lvol11, lvol12 and lvol13 how do I add this to secondary swap on lvol9.
Can you also let me know if my current priorities are correct.

Many thanks - Mark P.
rariasn
Honored Contributor

Re: Mirroring swap space (HPUX11.11)

Hi,

remove "lvol11", "lvol12" and "lvol13" and create new unique lvol.
rgs,
R.O.
Esteemed Contributor

Re: Mirroring swap space (HPUX11.11)

Hi,

You have to comment out the lines in "/etc/fstab" for the logical volumes you want to stop acting as swap devices.(11-12-13-9)
Then you have to reboot the server to release these logical volumes from swap. Once it has be done, you can remove the logicals volumes 11-12-13-9. Then you can create the new lvol9 with the desired size and the needed options for swapping:

(better if you create on differnt disk than primary swap disk)
# lvcreate -L "xxM" -n lvol9 -C y -r n /dev/vg00
# swapon -p "same_priority_as_primary_swap" /dev/vg00/lvol9

It is better to have the same priority than the primary swap, because it gives advantage of round robin swapping and it is helpful

Regards,
"When you look into an abyss, the abyss also looks into you"
Mark Parsons
Valued Contributor

Re: Mirroring swap space (HPUX11.11)

Hi R.O.

I will still need to do an lvextend as well?

Mark P.
R.O.
Esteemed Contributor

Re: Mirroring swap space (HPUX11.11)

Hi,

To do the mirror at the time of creating the new lvol, add the "-m 1" option:

# lvcreate -L "xxM" -n lvol9 -m 1 -C y -r n /dev/vg00

Or you can do the lvextend -m 1 if you did not mirrored when created.

Regards,
"When you look into an abyss, the abyss also looks into you"
Steven E. Protter
Exalted Contributor

Re: Mirroring swap space (HPUX11.11)

Shalom,

lvextend -m 1

that command creates the mirror copies of the logical volume
m stands for mirror, the number stands for the number of copies.

Without that step there is no mirror copy.

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
atul2701
Frequent Advisor

Re: Mirroring swap space (HPUX11.11)

Hi Mark,

>Primary swap is on lvol2 which is mirrored (used PV = 2) with secondary swap on lvol9, lvol11, lvol12 and lvol13. Lvol9 and lvol12 are mirrored but lvol11 and lvol13 aren't. How do I get these two mirrored?

your lvol12 is also not mirrored.

LV Name /dev/vg00/lvol12
LV Status available/syncd
LV Size (Mbytes) 4500
Current LE 1125
Allocated PE 1125
Used PV 2

Its showing used PV 2 bcoz it may possible that lv is spawn across the disk. If its mirrored allocated PE would be double of current LE.

At present you don't have enough space in VG so you can't mirror these lv's.
Atul Gupta
Mark Parsons
Valued Contributor

Re: Mirroring swap space (HPUX11.11)

Hi,

How does the 'swapon -p "same_priority_as_primary_swap" /dev/vg00/lvol9'

Looking at the swapon /swapinfo man pages it says that the option after the '-p' should be a number.

Many thanks,

Mark P.
R.O.
Esteemed Contributor
Solution

Re: Mirroring swap space (HPUX11.11)

Hi,

"How does the 'swapon -p "same_priority_as_primary_swap" /dev/vg00/lvol9'

Looking at the swapon /swapinfo man pages it says that the option after the '-p' should be a number."

Yes, that is a number. Replace "same_priority_as_primary_swap" by "1":

'swapon -p 1 /dev/vg00/lvol9'

Regards,
"When you look into an abyss, the abyss also looks into you"