Operating System - HP-UX
1846627 Members
1962 Online
110256 Solutions
New Discussion

replacing a H.D in a mirror enviroment

 
SOLVED
Go to solution
radi_1
Frequent Advisor

replacing a H.D in a mirror enviroment

Hi,
Supposing 2 hard disks in e.g vg05 where:
/dev/dsk/c1t4d0 is primary
/dev/dsk/c2t4d0 is mirror
If one of them has gone bad,what is the procedure to follow for reconfiguring a new hard disk.
If it is a long procedure,please give me a link to an online cookbook(or document) where the above case is disccused.
Thanks.
never take simple maters for granted
8 REPLIES 8
Rita C Workman
Honored Contributor

Re: replacing a H.D in a mirror enviroment

Radi,

All you have to do is enter " replace mirrored hard drive " in the Search box above...and you will get a plethora of links to and great tips on doing this to pick from !

Rgrds,
Rita
Chris Wilshaw
Honored Contributor
Solution

Re: replacing a H.D in a mirror enviroment

The steps are (assuming c1t4d0 has failed)

1) Remove the failed disk
2) Insert new disk
3) restore volume group config details
vgcfgrestore -n /dev/vg05 /dev/dsk/c1t4d0
4) activate volume group
vgchange -a y /dev/vg05
5) synchronize disks
vgsync /dev/vg05

While the vgsync is running, you can check the progress using

lvdisplay -v /dev/vg05/lvol* | grep -ic stale

This will give you a count of the stale extents in the VG.

Chris.
Pete Randall
Outstanding Contributor

Re: replacing a H.D in a mirror enviroment

Cookbook attached.


Pete

Pete
Jose Mosquera
Honored Contributor

Re: replacing a H.D in a mirror enviroment

Hi,

Pls ensure that at least one of the LV into ivolved VG have a "stale" status,
#vgdisplay -v vg[nn]

LV Name /dev/vg[nn]/lvol_name
LV Status available/stale
LV Size (Mbytes) 300
Current LE 75
Allocated PE 150
Used PV 2

To force this situation pull out the disk and refresh the VG info,
#vgchange â a y vg[nn]

The you can see that LV's begining to appear in "stale" status, and "NO HARDWARE" status will be displayed fro the involver device with the command:
#ioscan â fnC disk

After this you can nsert the new disk an wait few seconds to will be reconigzed by the system, to ensure this the status "CLAIMED" will be displayed at the involved device.

Then, we need rebuild the mirror:
#vgcfgrestore -n vg[nn] /dev/rdsk/c[n]t[n]d[n] (must be "rdsk")

Refresh VG info:
#vgchange -a y vg[nn]

Synchronize the VG:
#vgsync vg[nn] &

And check the synchronization progress with:
#pvdisplay -v /dev/dsk/c[n]t[n]d[n]|grep -c stale

Every time that this command is executed it returns an I number that should go descending until arriving to zero.
Jose Mosquera
Honored Contributor

Re: replacing a H.D in a mirror enviroment

Hi again,

Pls find attached above procedure without rare chars.

Rgds.
radi_1
Frequent Advisor

Re: replacing a H.D in a mirror enviroment

Thanks to u all for quick reply,but an other question if u do not mind,
suppose I want to replace both disks with larger ones,how do i go about it?
regards
never take simple maters for granted
Pete Randall
Outstanding Contributor

Re: replacing a H.D in a mirror enviroment

If you allowed Max PEs and PE Size to default, you won't be able to expand onto larger disks without re-creating the Volume Group. Check your vgdisplay output for Max PE per PV and PE Size - if they calculate out to close to the physical size of your disk, you're going to have to backup the data, re-create the VG, and restore the data.


Pete

Pete
Chris Wilshaw
Honored Contributor

Re: replacing a H.D in a mirror enviroment

The best thing to do is to take an Ignite image of the system, then to re-install on the new disks.

This will allow you to make full use of the larger disks. The default values of a volume group (maximum extents etc) are only set when the VG is created, and are often too low for most modern disks.