Operating System - HP-UX
1834788 Members
2624 Online
110070 Solutions
New Discussion

Migrate and Mirror root VG

 
SOLVED
Go to solution
Roger Walton
New Member

Migrate and Mirror root VG

Hello,
I have a K570 running 11.00 with MirrorDisk/UX and OnLineJFS. It had no internal drives and two 12H AutoRaids. vg00 is on a 8GB LUN on a 12H (also boot device) and is not mirrored.

I have now installed two 9GB internal drives and want to move the OS from the
12H LUN to the two new drives (mirrored). I have already made them bootable.

My question is if I use "lvextend" to migrate, can I copy to both new drives at the same time:
lvextend -m 2 /dev/vg00/lvolx /dev/dsk/ /dev/dsk/
lvreduce -m 1 /dev/vg00/lvolx /dev/dsk/<12H LUN>

...or do I have to do it one at a time:
lvextend -m 1 /dev/vg00/lvolx /dev/dsk/
lvreduce -m 0 /dev/vg00/lvolx /dev/dsk/<12H LUN>
lvextend -m 1 /dev/vg00/lvolx /dev/dsk/

What would be a guess-timate of the time needed to complete the mirror of 7.2GB (give or take half a day)?

Thank you.
9 REPLIES 9
A. Clay Stephenson
Acclaimed Contributor

Re: Migrate and Mirror root VG

Well, if it were me (and being extra paranoid), I would mirror to both new drives before doing the lvreduce from the 12H. That way. This entire operation should require at most two hours and possibly less.
If it ain't broke, I can fix that.
S.K. Chan
Honored Contributor

Re: Migrate and Mirror root VG

I am confident this would work... (in that particular order), lvreduce it last.

lvextend -m 1 /dev/vg00/lvolx /dev/dsk/
lvextend -m 1 /dev/vg00/lvolx /dev/dsk/
lvreduce -m 0 /dev/vg00/lvolx /dev/dsk/<12H LUN>

I've mirrored an 8GB before and it takes less than 1 hour to complete.
Patrick Wallek
Honored Contributor
Solution

Re: Migrate and Mirror root VG

First thing:

HAve you added the 9GB drives to VG00? Unless you modified the 'max pe per pv' variable when vg00 was created, you are not going to get full use of your 9GB drives, since your vg00 is currently only 8GB. See 'man vgcreate' and specifically the '-e' option of the command.

If you did take the default value, then the easiest thing for you to do is to use Ignite/UX, create a couple of make_tape_recovery tapes, and then reload the OS on to one of the new disks from tape, and then mirror them.

On the other hand, if you do see all 9GB of your new drives, then I would vote for your second option, where you lvextend to one disk at a time. You could possibly modify your steps though so that you are not unmirrored at any time. Something like:

# lvextend -m 1 /dev/vg00/lvol? /dev/dsk/c?t?d? (first disk)
# lvextend -m 2 /dev/vg00/lvol? /dev/dsk/c?t?d? (second disk)
# lvreduce -m 1 /dev/vg00/lvol? /dev/dsk/c?t?d? (12H lun)


Anyhow, that's just my 2 cents worth.
Sanjay_6
Honored Contributor

Re: Migrate and Mirror root VG

Hi Roger,

What i would have done is do the mirror on the first internal disk first, then do the mirror on the 2nd disk. Do a reboot of the box using the internal disk with the external disk disconnected if possible. If successful boot with all the disks connected and then reduce the mirror from the external disk.

I would have taken a full day downtime to do this if that is possible. Just for info, the mirroring of the disk can be done online.

Hope this helps.

Regds
Jeff Schussele
Honored Contributor

Re: Migrate and Mirror root VG

Hi Roger,

I agree with Clay that you should have both mirrors complete before reducing the original.
Yes you can create both mirrors at the same time
lvextend -m 2 /dev/vg00/lvolx /dev/rdsk/disk1 /dev/rdsk/disk2

One thing to consider is that even though you'll be mirrored - you'll still have a SPOF in the controller. Is there a reason you cannot leave a mirror copy on the 12H?
I always prefer to have my VG00 mirrors on diff paths for this reason.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
A. Clay Stephenson
Acclaimed Contributor

Re: Migrate and Mirror root VG

Hi again:

Patrick does make a good point about losing 1GB; that may or may not be significant to you. I do not like the idea of using the K's internal drive bay. I NEVER use them because they are not hot-plug. If it were me, I would install the drives in a Jamaica (A3312) and connect each drive to a separate controller - possibly those already in use with your AutoRAID so that you could easilyt tolerate drive/controller/cable failures.
If it ain't broke, I can fix that.
Tom Danzig
Honored Contributor

Re: Migrate and Mirror root VG

I vote for using an Ignite tape to load the OS onto the new internal drives. This will allow you the opportunity to resize the LV sizes to your liking as well.

You will, however, need to manually re-mirror the root vg. Ignite will not do this for you. Not a big deal though.

If anything goes wrong, you have the OS on the 12H to fall back on.

My $0.02
Roger Walton
New Member

Re: Migrate and Mirror root VG

Patrick,
Max PE per PV is set to 2500 (X 4MB) - not a problem.

Jeff and Clay,
I would agree about having mirrored volumes on separate paths and in hot-pluggable bays. However, I need to stripe database LVs between 12Hs for performance, so I need to get the OS off. I wouldn't mirror between dis-similar devices anyway. Also, I have no more rack space in the leased data center cabinet.

Jeff,
I didn't understand your comment: "you'll still have a SPOF in the controller". could you explain please?

Thanks Y'all for your comments.

Roger
Tom Danzig
Honored Contributor

Re: Migrate and Mirror root VG

SPOF=Single Point of Failure.
If the controller dies your SOL!