msgbartop
Tips and Tricks site for advanced HP-UX Engineers
msgbarbottom

25 Jul 13 Replacing a bad vxvm boot disk. HP-UX 11.23 PA-RISC

So you lose a boot disk on a vxvm booted system. You hot replace the disk, but now you need to make sure the software mirror is good.

 

Lets say for example its rootdisk02

If the disk stayed alive and did not power down you can run vxbrk_rootmirror and cleanly replace the disk.

What do do if the disk powered down?

/opt/VRTS/bin/vxdiskunsetup -C rootdisk02

vxrecover -g rootdg -sb

You more than likely end up with a disk named like this that is totally useless:

rootdg.26724.31359

vxdg destroy rootdg.26724.31359  (on rootdisk02)

 

Remove the incomplete mirror copy

 

/etc/vx/bin/vxbrk_rootmir -v rootdisk02

 

And mirror it back ,

/opt/VRTS/bin/vxrootmir -v -g rootdg rootdisk02

 

Tags: , , , ,

02 Oct 12 How to not blow up a vxvm boot HP-UX system when breaking the mirror

This is an improvement to fixing the problems if you do blow things up. Click here to see.

Here is the thing. VXvM is messed up on HP-UX. The mirror break command is broken on 11.23 and 11.31.

That being said depending on how you use it, you can have a mess to clean up or not.

Scenario:

[shmuel01]/root # vxdisk list
DEVICE TYPE DISK GROUP STATUS
c2t0d0 auto:hpdisk rootdisk02 rootdg online failing
c2t1d0 auto:hpdisk rootdisk01 rootdg online failing

Note the disks are supposedly failing. Easy fix, though I can’t say how long this will last.

[shmuel01]/root # vxedit -g rootdg set failing=off rootdisk01
[shmuel01]/root # vxedit -g rootdg set failing=off rootdisk02

Now we look at them.

[shmuel01]/root # vxdisk list
DEVICE TYPE DISK GROUP STATUS
c2t0d0 auto:hpdisk rootdisk02 rootdg online
c2t1d0 auto:hpdisk rootdisk01 rootdg online

Now they are fixed.

Now to the heart of the matter. Lets say you want to break c2t0d0 out of the mirror and say make a drd image. The man page and HP support says you can use this form.

/etc/vx/bin/vxbrk_rootmir -g rootdg -vb c2t0d0

If you use that form on many HP-UX systems the mirror break will fail and you will have a mess to clean up. If you want to prove your skills go ahead and use that form and click the link above to find the fix.

If you would rather look smart and say cruise the Internet, do this form.

/etc/vx/bin//vxbrk_rootmir -g rootdg -vb rootdisk02

You get the following UGLY results.

[shmuel01]/root # /etc/vx/bin//vxbrk_rootmir -g rootdg -vb rootdisk02
VxVM vxbrk_rootmir INFO V-5-2-4023 14:23: Checking specified disk(s) for presence and type
VxVM vxbrk_rootmir INFO V-5-2-4025 14:23: DA c2t0d0, DM rootdisk02 is a valid root mirror
VxVM vxbrk_rootmir INFO V-5-2-4052 14:23: Saving configuration data for later restoration
sed: Function s/plex=.*$/plex=homevol-02 cannot be parsed.
sed: Function s/plex=.*$/plex=lpvol-02 cannot be parsed.
sed: Function s/plex=.*$/plex=optvol-02 cannot be parsed.
sed: Function s/plex=.*$/plex=standvol-02 cannot be parsed.
sed: Function s/plex=.*$/plex=tmpvol-02 cannot be parsed.
sed: Function s/plex=.*$/plex=usrvol-02 cannot be parsed.
sed: Function s/plex=.*$/plex=varvol-02 cannot be parsed.
VxVM vxbrk_rootmir INFO V-5-2-4022 14:23: Breaking off root mirror on DA c2t0d0
VxVM vxbrk_rootmir INFO V-5-2-4054 14:23: Setting broken off mirror on c2t0d0 as unique root disk
VxVM vxbrk_rootmir INFO V-5-2-2566 14:23: Preparing disk c2t0d0 as a VxVM root disk
VxVM vxmake ERROR V-5-1-1173 Volume swvol already exists
VxVM vxbrk_rootmir ERROR V-5-2-4020 Attempting to recreate volume meta-data on rootdisk02/c2t0d0

However the only thing that actually goes wrong is removing the disk rootdisk02 from the roodg.

Easily fixed with a single command.

vxdg -g rootdg rmdisk rootdisk02

vxdisk list shows:

[shmuel01]/root # vxdisk list
DEVICE TYPE DISK GROUP STATUS
c2t0d0 auto:hpdisk – – online
c2t1d0 auto:hpdisk rootdisk01 rootdg online

A healthy ready for DRD cloning rootdg

[shmuel01]/root # vxprint -ht -g rootdg
DG NAME NCONFIG NLOG MINORS GROUP-ID
ST NAME STATE DM_CNT SPARE_CNT APPVOL_CNT
DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE
RV NAME RLINK_CNT KSTATE STATE PRIMARY DATAVOLS SRL
RL NAME RVG KSTATE STATE REM_HOST REM_DG REM_RLNK
CO NAME CACHEVOL KSTATE STATE
VT NAME NVOLUME KSTATE STATE
V NAME RVG/VSET/CO KSTATE STATE LENGTH READPOL PREFPLEX UTYPE
PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE
SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF DEVICE MODE
SV NAME PLEX VOLNAME NVOLLAYR LENGTH [COL/]OFF AM/NM MODE
SC NAME PLEX CACHE DISKOFFS LENGTH [COL/]OFF DEVICE MODE
DC NAME PARENTVOL LOGVOL
SP NAME SNAPVOL DCO

dg rootdg default default 0 1129312400.1025.loopback

dm rootdisk01 c2t1d0 auto 1024 143364644 –

v homevol – ENABLED ACTIVE 524288 SELECT – fsgen
pl homevol-01 homevol ENABLED ACTIVE 524288 CONCAT – RW
sd rootdisk01-04 homevol-01 rootdisk01 9961472 524288 0 c2t1d0 ENA
pl homevol-04 homevol ENABLED ACTIVE LOGONLY CONCAT – RW
sd rootdisk01-14 homevol-04 rootdisk01 35389473 33 LOG c2t1d0 ENA

v lpvol – ENABLED ACTIVE 524288 SELECT – fsgen
pl lpvol-01 lpvol ENABLED ACTIVE 524288 CONCAT – RW
sd rootdisk01-12 lpvol-01 rootdisk01 34865152 524288 0 c2t1d0 ENA
pl lpvol-04 lpvol ENABLED ACTIVE LOGONLY CONCAT – RW
sd rootdisk01-16 lpvol-04 rootdisk01 35389572 33 LOG c2t1d0 ENA

v optvol – ENABLED ACTIVE 4194304 SELECT – fsgen
pl optvol-01 optvol ENABLED ACTIVE 4194304 CONCAT – RW
sd rootdisk01-05 optvol-01 rootdisk01 10485760 4194304 0 c2t1d0 ENA
pl optvol-04 optvol ENABLED ACTIVE LOGONLY CONCAT – RW
sd rootdisk01-17 optvol-04 rootdisk01 35389605 66 LOG c2t1d0 ENA

v rootvol – ENABLED ACTIVE 1048576 ROUND – root
pl rootvol-01 rootvol ENABLED ACTIVE 1048576 CONCAT – RW
sd rootdisk01-03 rootvol-01 rootdisk01 8912896 1048576 0 c2t1d0 ENA

v standvol – ENABLED ACTIVE 524288 ROUND – fsgen
pl standvol-01 standvol ENABLED ACTIVE 524288 CONCAT – RW
sd rootdisk01-01 standvol-01 rootdisk01 0 524288 0 c2t1d0 ENA
pl standvol-04 standvol DETACHED ACTIVE LOGONLY CONCAT – RW
sd rootdisk01-18 standvol-04 rootdisk01 35389671 33 LOG c2t1d0 ENA

v swapvol – ENABLED ACTIVE 8388608 ROUND – swap
pl swapvol-01 swapvol ENABLED ACTIVE 8388608 CONCAT – RW
sd rootdisk01-02 swapvol-01 rootdisk01 524288 8388608 0 c2t1d0 ENA

v swvol – ENABLED ACTIVE 6291456 SELECT – fsgen
pl swvol-01 swvol ENABLED ACTIVE 6291456 CONCAT – RW
sd rootdisk01-10 swvol-01 rootdisk01 27525120 6291456 0 c2t1d0 ENA
pl swvol-03 swvol ENABLED ACTIVE LOGONLY CONCAT – RW
sd rootdisk01-06 swvol-03 rootdisk01 35389440 33 LOG c2t1d0 ENA

v tmpvol – ENABLED ACTIVE 2097152 SELECT – fsgen
pl tmpvol-01 tmpvol ENABLED ACTIVE 2097152 CONCAT – RW
sd rootdisk01-07 tmpvol-01 rootdisk01 14942208 2097152 0 c2t1d0 ENA
pl tmpvol-04 tmpvol ENABLED ACTIVE LOGONLY CONCAT – RW
sd rootdisk01-20 tmpvol-04 rootdisk01 35389737 33 LOG c2t1d0 ENA

v usrvol – ENABLED ACTIVE 5242880 SELECT – fsgen
pl usrvol-01 usrvol ENABLED ACTIVE 5242880 CONCAT – RW
sd rootdisk01-08 usrvol-01 rootdisk01 17039360 5242880 0 c2t1d0 ENA
pl usrvol-04 usrvol ENABLED ACTIVE LOGONLY CONCAT – RW
sd rootdisk01-21 usrvol-04 rootdisk01 35389770 66 LOG c2t1d0 ENA

v varvol – ENABLED ACTIVE 5242880 SELECT – fsgen
pl varvol-01 varvol ENABLED ACTIVE 5242880 CONCAT – RW
sd rootdisk01-09 varvol-01 rootdisk01 22282240 5242880 0 c2t1d0 ENA
pl varvol-04 varvol ENABLED ACTIVE LOGONLY CONCAT – RW
sd rootdisk01-22 varvol-04 rootdisk01 35389836 66 LOG c2t1d0 ENA

Tags: , , ,

sidebarbottom
sidebartop
sidebarbottom
WhatsApp chat