Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Replacing disks question

Status
Not open for further replies.

Mag0007

MIS
Feb 15, 2005
829
US
I have a VG with 2 disks (not rootvg). The LVs are mirrored. It seems one of the disks failed in the VG. I was thinking of something like this:

reducevg to remove the bad hdisk
replace the disk
cfgmgr
extendvg to add the add disk into vg

My problem is, there was a quorum set on this VG. How do I remove that? I want to get my data back. Is there a way to just mount filesystem/lv from only the good disk (I already did an exportvg, and when trying to importvg it tries to get both disks in).

TIA

 
Every VG has a "quorum". What that means is you can only activate (varyonvg) a VG if there are at least a (quorum) number of PVs available. If you turn the quorum off, that means that the quorum value is set to 1, so you can *attempt* to activate the VG with half of the disks missing. This rule was created so that if you have two mirrors on two disks, the VG can be started with either of the two disks. On a two-disk VG, one PV has 1 VGDA and the other has 2 VGDAs (3 VGDAs, quorum=2), so in *normal* circumstances you could end up with just one disk with the 1 VGDA and you weren't able to start that VG because of the quorum rule, even if that remaining disk contains a mirror for all LVs.

When you have a VG with a failed disk and you take that disk out of the VG, the quorum rule values (number of VGDAs on disk) are modified if necessary.

Take care when removing/adding disks in a VG. There is a problem on AIX5300-02 where extendvg "forgets" to write a VGDA to the newly added disk. This may get you into trouble if you reducevg the first disk of a VG and then add a disk that already has a VGDA from previous usage. See if you have fix IY71108 on your system if it is at AIX ML5300-02. If not at that level you should be OK.

HTH,

p5wizard
 

First, identify which disk failed,

#unmirrorvg -c 1 <vg_name> <failed_disk_name>
#reducevg <vg_name> <failed_disk_name>
#rmdev -dl <failed_disk_name>.
Replace disk
run cfgmgr. ( am assuming that system is not having HACMP)
#extendvg <vg_name> <new_disk_name>
#mirrorvg -c 2 <vg_name> <new_disk_name>


Hope this helps.

aixnag
IBM Certified Specialist - P-series AIX 5L Administration
IBM Certified Specialist - AIX V4 HACMP
IBM eServer Certified Specialist – p690 Technical Support
IBM Certified Solutions Expert - DB2 UDB V7.1 Database Administration for Unix, Linux, Windows and OS/2
 
1. Select a new disk drive that has a capacity at least as large as the failed disk.

2. With root authority, run the Configuration Manager to configure the new disk. Type the following on the command line:

cfgmgr -l hdisk10

The -l flag allows you to configure only the specified device and any "child" devices. Without this flag, the cfgmgr command runs Configuration Manager against the entire system.

3. Replace the physical volume so it can begin using the new disk, using the following command:

Note:
If the mirror for the logical volume is stale, the replacepv command does not work correctly.

replacepv hdisk02 hdisk10

4. When the associated mirrored volume group is the rootvg, you must also run the following commands to clear the failed disk from and add the new disk to the boot image:

chpv -c hdisk02
bootlist hdisk10
bosboot -a

The chpv -c command clears hdisk02 from the boot image. The bootlist command adds hdisk10 to the list of possible boot devices from which the system can be booted. The bosboot -a command creates a complete boot image on the default boot logical volume.

At this point, the physical volume hdisk02 now maps to the newly configured hdisk10.



Mike

"A foolproof method for sculpting an elephant: first, get a huge block of marble, then you chip away everything that doesn't look like an elephant."

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top