1855422 Members
18446 Online
104110 Solutions
New Discussion

Re: Mirror hdd

 
Cifs 9000
Advisor

Mirror hdd

My one hdd is going but it mirror. i am going to install new hdd how can i get data from mirror hdd to new drive.

volume group -- vg01
volume name --- lvol3
6 REPLIES 6
Patrick Wallek
Honored Contributor

Re: Mirror hdd

Say the drive that is going bad is c1t1d0 (substitute your device number for c1t1d0 everywhere).

1) Replace the drive
2) Run vgcfgrestore to put the configuration on the new drive.

# vgcfgrestore -n /dev/vg01 /dev/rdsk/c1t1d0

3) (Re)Activate the VG so the new drive becomes active

# vgchange -a y /dev/vg01

4) Synchronize your mirrors

# vgsync /dev/vg01

Matti_Kurkela
Honored Contributor

Re: Mirror hdd

Here is a document that covers exactly what you'll need to know in your situation:

http://docs.hp.com/en/5991-1236/When_Good_Disks_Go_Bad.pdf

MK
MK
A. Clay Stephenson
Acclaimed Contributor

Re: Mirror hdd

It's rather simple:

I'll assume your bad disk is /dev/dsk/c1t5d0. If this is a hot-plug disk, you don't need to shutdown.

1) Pull the failed disk out a few centimeters and allow it to spin down. Wait about a minute and then remove it completely from its slot.

2) Insert the replacement disk.

3) vgcfgrestore -n /dev/vg01 /dev/rdsk/c1t5d0

4) vgchange -a y /dev/vg01

5) vgsync /dev/vg01 # this make take a few tens of minutes.

NOTE: LVM Disks are not mirrored; LVOL's are mirrored.
If it ain't broke, I can fix that.
skt_skt
Honored Contributor

Re: Mirror hdd

This had worked for me multiple times.
To list and verify the config file

adedd11n:root [/root] vgcfgrestore -n /dev/vg00 -l
Volume Group Configuration information in "/etc/lvmconf/vg00.conf"
VG Name /dev/vg00
---- Physical volumes : 2 ----
/dev/rdsk/c0t0d0 (Bootable)
/dev/rdsk/c3t0d0 (Bootable)

mkboot /dev/rdsk/c0t0d0

mkboot -b /usr/lib/uxbootlf /dev/dsk/c0t0d0
Pvchange -a n /dev/dsk/c0t0d0
vgcfgrestore -F -n vg00 /dev/rdsk/c0t0d0
Pvchange -a y /dev/dsk/c0t0d0
vgchange -a y vg00
vgsync vg00

lvlnboot -R

for lif_comp in `lifls /dev/dsk/c3t0d0`
do
/usr/bin/lifcp /dev/dsk/c3t0d0:${lif_comp} /dev/dsk/c0t0d0:${lif_comp}
A. Clay Stephenson
Acclaimed Contributor

Re: Mirror hdd

... and if this were a boot disk, your instructions mibgt be applicable but this is /dev/vg01.
If it ain't broke, I can fix that.
Cifs 9000
Advisor

Re: Mirror hdd

Ioscan output
disk 6 0/10/0/0.2.0 sdisk CLAIMED DEVICE HP 73.4GST373307LC
/dev/dsk/c4t2d0 /dev/rdsk/c4t2d0


I am going to replace this hdd. and i have mirrored hdd.

PV Name /dev/dsk/c4t2d0
PV Name /dev/dsk/c5t2d0 Alternate Link
PV Status available
Total PE 17499
Free PE 0
Autoswitch On

I think /dev/dsk/c5t2d0 this is mirrored hdd.

according to suggestion
1. i have 20 hdd in disk array hp 2300. how can i find which hdd. let me know

2. then remove Bad hdd
3. installed new hdd
4.vgcfgrestore -n /dev/vg01 /dev/rdsk/c4t2d0
5.(Re)Activate the VG so the new drive becomes active

# vgchange -a y /dev/vg01

6) Synchronize mirrors

# vgsync /dev/vg01

then i can access.


I have data base on that hdd. should i shutdown database also.

let me know today onword.

Thanks in advance.