Operating System - HP-UX
1836787 Members
2486 Online
110110 Solutions
New Discussion

How to remove mirrored swap

 
S.K. Chan
Honored Contributor

How to remove mirrored swap

Situation :-
1) vg00 (got 3 disks c1t6d0, c2t6d0, c9t3d0)
2) LVs are :-
o lvol1 /stand (on c1t6d0)
o lvol2 device-swap (on c1t6d0, c2t6d0)
o lvol3 / (on c1t6d0)
o lvol4 device-swap (on c9t3d0)
3) All lvols are not mirrored except lvol2.
lvol2 is on c1t6d0 and mirrored to c2t6d0.
4) c2t6d0 is dead ! lvol2 shows "stale".
5) vgdisplay vg00 gives .."couldn't query.."

How do I lvol2 and the dead disk c2t6d0 ?
6 REPLIES 6
Lou Zirko_1
Frequent Advisor

Re: How to remove mirrored swap

lvreduce -m 1 /dev/vg00/lvol2 /dev/dsk/c2d6c0

Lou Zirko
Lou Zirko_1
Frequent Advisor

Re: How to remove mirrored swap

Opps

lvreduce -m 0 /dev/vg00/lvol2 /dev/dsk/c2d6c0

Lou
A. Clay Stephenson
Acclaimed Contributor

Re: How to remove mirrored swap

Try to do an lvreduce.

lvreduce -m 0 /dev/vg00/lvol2 /dev/dsk/c2t6d0


You should then be able to do a vgreduce to remove c2t6d0 if no other lvols are using it.
If it ain't broke, I can fix that.
G. Vrijhoeven
Honored Contributor

Re: How to remove mirrored swap

Ok..
first reduce the number of mirror copies
lvreduce -m 0 /dev/vg00/lvol
then remove the stale disk
vgreduce -f /dev/dsk/c?t?d? /dev/vg00
now you should be able to put in a new disk and:
pvcreate, vgextend, lvextend to re astate your mirror.

Hope this will help
A. Clay Stephenson
Acclaimed Contributor

Re: How to remove mirrored swap

Hi:

I should really point out that the real question is should I worry about this? Your better approach is to shutdown, replace the disk, reboot (you may need to override disk quorum), and the do a vgcfgrestore.

If it ain't broke, I can fix that.
James R. Ferguson
Acclaimed Contributor

Re: How to remove mirrored swap

Hi:

Since you can't query the disk because its dead, I think you are going to have to take a "long" approach. I'd treat this the same as any reconstruction of a vg00 mirrored disk:

# Shutdown your system and replace the disk that is failing.

# Boot into single user mode:

# ISL> hpux -is -lq /stand/vmunix

# vgcfgrestore -n /dev/vg00 /dev/rdsk/cXtYdZ

# mkboot /dev/rdsk/cXtYdZ

# mkboot -a "hpux -lq /stand/vmunix" /dev/rdsk/CXtYdZ

# lvlnboot -R

# lvlnboot -v #...to verify all is as desired...

# vgchange -a y /dev/vg00

# vgsync /dev/vg00

# shutdown -ry 0

Regards!

...JRF...