Operating System - HP-UX
1837117 Members
2313 Online
110112 Solutions
New Discussion

Re: Hot spare for mirror disk array

 
SOLVED
Go to solution
JUP
Regular Advisor

Hot spare for mirror disk array

Hi

I have a 4 disk array - disks are in slots 1, 2, 3, 4. As MirrorUX only allows a maximum of 2 mirrors, I have mirrored Disk 1 onto 2 and 3. The first 3 disks belong to Volume Group vg01.


I have left the 4th disk as a spare so if one of the first 3 fail I want to be able to remove it from its slot (slot 4) and place it in the appropriate slot of the failed disk (ie. slot 1 - 3).

To test, I removed Disk 2 and inserted Disk 4 in its place. No activity seemed to happen on the spare disk.

How do I initialise this spare disk (Disk 4) prior to use so that it will be automatically used by the mirror ? While its in Slot 4 do I make it part of vg01 so the mirror gets rebuilt automatically if placed in slot 1 - 3.

I tried the above without any luck.

Can someone please advise ?

I'm running HP 11.23 on Itanium 2

Thanks in advance
JUP

9 REPLIES 9
Patrick Wallek
Honored Contributor

Re: Hot spare for mirror disk array

As far as I know, there is not a way to make this automatic. There are manual steps that are required.

Once the disk is replaced you do:

# vgcfgrestore -n vg01 /dev/rdsk/c?t?d?
# vgchange -a y vg01
# vgsync vg01

These steps do not take long. The vgsync is the longest running process.
JUP
Regular Advisor

Re: Hot spare for mirror disk array

Thanks for your prompt reply Patrick.

However when I run "vgcfgrestore -n vg01 /dev/rdsk/c4t2d0" I get:


Cannot restore Physical Volume "/dev/rdsk/c4t2d0".
Detach the PV or de-activate the VG before restoring the PV.

I have replaces the third disk in the disk array (ie. /dev/dsk/c4t2d0) with a new identical disk.
This new identical disk at one stage had VG02 on it but I removed this volume group from it before I inserted it into the mirrored disk array.

Could someone please help

Thanks
JUP

Hoang Chi Cong_1
Honored Contributor

Re: Hot spare for mirror disk array

Hallo JUP

As you said:"I have a 4 disk array - disks are in slots 1, 2, 3, 4. As MirrorUX only allows a maximum of 2 mirrors, I have mirrored Disk 1 onto 2 and 3. The first 3 disks belong to Volume Group vg01."
You can not automaticaly mirror to the 4th disk event you unplug the broken disk and replace the 4 disk to slot 2 in your test.
Why?
Because your storage is Disk array and it does support for this function! (You can do it if the storage is Vitual Array, for example!).
So that, first you have to remove the disk's device file from the VG01, then extend the VG01 to the 4th disk(no need to plug it to the slot 02) then mirror it by manual.

Hope this helps
Regard,
HoangChiCong
Looking for a special chance.......
JUP
Regular Advisor

Re: Hot spare for mirror disk array

I am inserting the 4th disk into the slot that was occupied by the disk that crashed.

Its like replacing a bad disk with a new disk - so why can't I do that ???

The new disk (was in slot 4) is not being used, and is uninitialised. Surely I can just put it in slot 2 and vgcrestore it - although this did not work.

Your thoughts ?
Paul
Artyom Voronchihin
Respected Contributor

Re: Hot spare for mirror disk array

Hello!
Why don't you de-activete vg01 before vgcfgerestore?
You can try to use -R option of vgcfgrestore for force restoring the active VG.

vgcfgrestore -R -n vg01 /dev/rdsk/c4t2d0
"Intel inside" is not a label, it's a warning.
Mohanasundaram_1
Honored Contributor

Re: Hot spare for mirror disk array

Hi JUP,

How did you remove the vg02 information from disk4?

Do as below,

1) Move /etc/lvmtab to /etc/lvmtab.JUP
2) pvcreate -f /
3) move /etc/lvmtab.JUP to /etc/lvmtab
4) vgcfgrestore (as indicated in previous posts).
5) vgchange -a y vg01
6) vgsync (if required)


Try it and revert.

With Regards,
Mohan.
Attitude, Not aptitude, determines your altitude
Mohanasundaram_1
Honored Contributor
Solution

Re: Hot spare for mirror disk array

correction.......

2) pvcreate -f /

should read as
2) pvcreate -f /

As the disk4 is now plugged in the disk2 slot.
Attitude, Not aptitude, determines your altitude
Stuart Urquhart
Frequent Advisor

Re: Hot spare for mirror disk array

I think you can configure the fourth disk as a hot standby by adding it to your volume group and pvchange -z y /dev/dsk/?????. Now when you pull disk 2 lvm should detect a drive failure and start mirroring to the standby disk.
JUP
Regular Advisor

Re: Hot spare for mirror disk array

Thanks everyone.

I got it working by unmounting the disk array and then running vgcfgrestore.

JUP