Operating System - HP-UX
1753823 Members
8624 Online
108805 Solutions
New Discussion юеВ

Can I replace a mirror disk with a new HD w/o having to break the mirror?

 
Kenneth_42
Advisor

Can I replace a mirror disk with a new HD w/o having to break the mirror?

Hi,

I have an RP4640 server with the two internal HDDs mirrored.

I wish to replace the 10K RPMs HDDs with a higher speed 15K RPMs HDDs so I just unplugged one disk.

After I lugged the new HDD, when I do a "ioscan -fnC disk", the old entry of the original disk is still there (including all the partitions).

If I do a "strings /etc/lvmtab", the new harddisk is already included. How do I proceed with mirroring the new HDD without necessarily inserting the old harddisk and breaking the mirror.

Thanks in advance!

Regards,
Ken
3 REPLIES 3
Kenneth_42
Advisor

Re: Can I replace a mirror disk with a new HD w/o having to break the mirror?

Hi,

Nevermind this post. I just had to lvreduce all the logical volumes and vgreduce the volume group for the the new diskdrive just to change the existing configuration of /etc/lvmtab although the actual physical config may have changed.

Kenneth_42
Advisor

Re: Can I replace a mirror disk with a new HD w/o having to break the mirror?

closing the thread
A. Clay Stephenson
Acclaimed Contributor

Re: Can I replace a mirror disk with a new HD w/o having to break the mirror?

You have a very interesting appoach: Do something THEN ask how to do it. What you need to do is let the system think it has a dead disk. Pull out the NEW drive that you just installed a few centimeters and let it spin down. Let it sit there 2 minutes or so -- the system will think it has a dead disk. You now proceed with the normal disk replacement. We do need to make sure that all the extents on the remaining intact disk are "current". NOTE: There are new LVM patches that let you remove a drive but I'll assume that you haven't installed them --- and the following will work in any case.


1) Do a series of lvdisplay -v commands for each lvol on the physical disk and make sure that all the extents on the remaining "good" drive are current. (I actually have a script for this --- checkextents.sh -- you'll do this manually or write a small script)

2) "Yank" the new drive out. Pull it out just 2 cm or so and leave it resting in the slot. This lets the drive spin down gradually w/o damage.

3) Wait 120 seconds or so and then run checkextents.sh agian making sure that the remaining drive has all "current" extents.

4) Now insert the drive fully. Allow it to spin up. Think happy thoughts.

Let's assume the replacement drive is c0t6d0:
5) vgcfgrestore -n /dev/vg00 /dev/rdsk/c0t6d0
6) vgchange -a y /dev/vg00
7) mkboot /dev/rdsk/c0t6d0
8) mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/c0t6d0
9) lvlnboot -R
10) vgsync /dev/vg00 --- this could take a few tens on minutes

11) Do lvdisplays to make certain that all extents are current.

You can now repeat the process to replace the other drive.
If it ain't broke, I can fix that.