Operating System - HP-UX
1847488 Members
5276 Online
110265 Solutions
New Discussion

frozen rootdg copy - detached mirror or snapshot?

 
SOLVED
Go to solution
Scott McIntosh_2
Honored Contributor

frozen rootdg copy - detached mirror or snapshot?

Hello. Recently installed 11.23 on a PA-RISC system and decided to try out the VxVM as the default volume manager. So I have a rootdg. I'm trying to implement what I know how to do with LVM, split the mirrored vg00 lvols so I have a static copy on an alternate boot disk should the primary fail, or more importantly, a static copy which I can refresh the primary lvols with after some user trashes something.

But I can't seem figure out the recommended way of having a static, bootable copy of rootdg with VxVM. I see I can detach the mirror, but it sounds like detached mirrors get reattached automatically at reboot. Not desired. There's the snapshot thing, which apparently I can convert my mirror to be a snapshot, but can that be booted? If VxVM simply can't be both, I guess a refresh source is probably more important than an alternate boot source.

The volumes are all mirrored-concatenated, ie unlayered volumes. Although rootvol keeps quoting "root" rather than "mirrored-concatenated".

Thanks,
Scott
4 REPLIES 4
Patrice Le Guyader
Respected Contributor

Re: frozen rootdg copy - detached mirror or snapshot?

Hi scott,

what you need to use is :

vxplex -g -o rm dis

instead of :

vxplex -g det

because what you've done is only temporary and can be undone with :

vxplex -g att

or at next reboot.

I don't know if on HPUX there is an encapsulation of the boot disk too. If it is you'll have to make more operations to boot on it.Can you post the result of :

vxprint -ht

Regards
Pat
Good judgement comes with experience. Unfortunately, the experience usually comes from bad judgement.
Senthil Kumar .A_1
Honored Contributor
Solution

Re: frozen rootdg copy - detached mirror or snapshot?

Hi Scott,

I have an workaround process, But takes an advantage of LVM co-existance with VXVM.

The work around is as follows.

Assumptions:

lets assume /dev/dsk/c0t0d0 is part of your rootdg and is the boot disk aswell.

lets assume /dev/dsk/c1t0d0 is spare local disk you have which for now is used as mirror in rootdg.

Procedure.

(A) Just remove the second disk out of rootdg.

1) You need to disassociate the plexes associated from the second disk,

vxplex -g rootdg homevol-02 optvol-02 rootvol-02 standvol-02 swapvol-02 tmpvol-02 usrvol-02 varvol-02


verify the action,
vxprint -t


2) you need to delete the plexes that are disassociated now.

vxedit -g rootdg -r rm homevol-02 optvol-02 rootvol-02 standvol-02 swapvol-02 tmpvol-02 usrvol-02 varvol-02

verify the action,
vxprint -t


3) remove the second disk from the rootdg,

vxdg -g rootdg rmdisk rootdisk02

(B) At the right time when you feel the conf is at ideal state in the boot disk of managed by VXVM(rootdg), create a LVM boot disk which would be created using the actual boot disk in the rootdg.

/etc/vx/bin/vxres_lvmroot -v /dev/dsk/c1t0d0

NOTE: at this stage you have 2 independent boot disk one maintained by VXVM and the other by LVM.


CO-RELATION:

Now lets correlate this situation as per your requirement.

Lets us assume, the system is unbootable from the VXVM boot disk. Now boot from the second disk, which is maintained by LVM. Once you have the access to the OS. Thrash the data in the first disk "/dev/dsk/c0t0d0", now you can create a fresh VXVM boot disk on "/dev/dsk/c0t0d0" (so called rootabilty) and now you have a working copy of VXVM boot disk on "/dev/dsk/c0t0d0". This restores the data as it was when you created the LVM boot disk. Now you can reboot from the first disk as is your "current requirement".

The command for this activity is...

/etc/vx/bin/vxcp_lvmroot -v /dev/dsk/c0t0d0

regards,
Senthil Kumar .A
Let your effort be such, the very words to define it, by a layman - would sound like a "POETRY" ;)
Senthil Kumar .A_1
Honored Contributor

Re: frozen rootdg copy - detached mirror or snapshot?

Hi the command in the section (A).1 should be corrected as follows...

vxplex -g rootdg dis homevol-02 optvol-02 rootvol-02 standvol-02 swapvol-02 tmpvol-02 usrvol-02 varvol-02


,Sorry missed the "dis" keyword.

Regards,
Senthil Kumar .A
Let your effort be such, the very words to define it, by a layman - would sound like a "POETRY" ;)
Scott McIntosh_2
Honored Contributor

Re: frozen rootdg copy - detached mirror or snapshot?

I think I'll simply use the vxres_lvmroot / vxcp_lvmroot process. Trying to understand VxVM is becoming very annoying.

Ok, so I want to dissociate plexes rather than detach them, but since the plexes are not in volumes, can the alternate disk be booted? Not likely. But I tried putting the dissociated plex into a volume and could see that the data was still intact, but then when I wanted to remove the test volume to release the plex, being the only one on the volume, VxVM blew away the volume, the plex, and the subdisk. How useful. There also seems to be no way to refresh an associated plex with the data on a dissociated plex, unless its snap stuff, but can you boot a standby disk of snaps? All just a bunch of mess.

And everytime I dissociate a plex of a mounted file system, I get IOFAIL rather than STALE. So I think I'll just forget about trying to accomplish anything with VxVM and fallback to the idea that I still need LVM for a flexible world.

Thanks for the information by the responders.

Thanks,
Scott