1849476 Members
5850 Online
104044 Solutions
New Discussion

BAD JAMAICA DISK

 
SOLVED
Go to solution
Nobody's Hero
Valued Contributor

BAD JAMAICA DISK

Ok here I go again. Last time I replaced this type of disk I encountered corruption. I have a jamaica disk c2t5d0 (primary) mirrored to c3t5d0 (secondary). c2t5d0 has errors and needs to be replaced. But I want this to still be the primary disk. How do I go about this. vgreduce? lvreduce, then sync? Help please
UNIX IS GOOD
9 REPLIES 9
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: BAD JAMAICA DISK

lvreduce followed by vgreduce but you are doing this the hard way. You can simply pull the bad disk 'on the fly' and replace it. You then do a vgcfgrestore followed by a vgchange -a y and then a vgsync. After the syncing operation is complete (which may take a few tens of minutes), you are done. You should obtain Document KBAN00000347 from the TKB and it outlines the replacement of all disks. My above list assumes this is a mirrored non-boot disk.


If it ain't broke, I can fix that.
Jeff Schussele
Honored Contributor

Re: BAD JAMAICA DISK

Hi Robert,

If it's failed you will not be able to do either reduce command. You'll just get errors
You'll just have to physically replace the disk & then pvcreate -f it & add it back to the VG w/vgextend & then sync it with vgsync.
Of course if this is the boot/root disk there are other steps as well.

If/when the lvdisplay shows all extents current on all LVs then you could vgreduce out the other & vgextend it back in, but I think that's really not needed. Both disks are treated as peers & it doesn't make any difference which is *primary*...unless you're talkin root/boot again. In that case you can use
setboot -p hw_path OR
setboot -a hw_path
to define primary & alternate boot disks.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
John Poff
Honored Contributor

Re: BAD JAMAICA DISK

Hi,

If it isn't a boot disk, you can just replace the bad disk, do a vgcfgrestore to it, and then a vgsync/vgchange -a y on your volume group to get it resyncing to the new disk. You shouldn't have to mess around with vgreduce/vgextend.

JP
John Palmer
Honored Contributor

Re: BAD JAMAICA DISK

Hi,

Be VERY careful if you want to proceed with the 'pull disk, vgcfgrestore' option. Only do this if ALL extents in all LV's on the disk are marked as 'stale'.

If they are not then when you do the vgsync, only stale pe's will be resynced, the system assumes that those marked 'current' are correct but they're not, corruption ensues when data is subsequently read from the replaced disk.

The vgcfgrestore is fine if you've done a reboot (required in the days before hot pull disks because you'd have had to switch off to replace the disk) because all the pe's on the failed disk would have been marked stale when the VG was activated.

The easiest way to mark all pe's stale is to deactivate and reactivate the VG but if it's a production box then it's unlikely that you can do it.

The alternative that I use is to lvreduce -A n and vgreduce -A n . Then swap the disk, pvcreate, vgextend and finally lvextend each volume.

This will mean that the new c2t5d0 will be the secondary but that shouldn't matter as they are equal as far as LVM is concerned. If you REALLY want c2t5 to be the primary then having sync'd all volumes, lvreduce them from c3t5 then lvextend them onto c3t5. That's twice the amount of syncing though.

Regards,
John
MANOJ SRIVASTAVA
Honored Contributor

Re: BAD JAMAICA DISK

Hi Robert


all you need to do is to 1.identify the disk physically.

2. replace the new disk.

3. vgcfgrestore -n /dev/vgxx/dev/rdsk/cxtydz ( new disk path)

4. vgsync /dev/vgxx


this will restore the mirror back and also the primary path.



Manoj Srivastava
Ian Kidd_1
Trusted Contributor

Re: BAD JAMAICA DISK

take a look at document KBRC00009115
( http://support1.itrc.hp.com/service/cki/search.do?category=c0&mode=text&searchString=KBRC00009115&searchCrit=allwords&docType=EngineerNotes )

it covers several scenarios for replacing bad mirrored disks. Interestingly enough, it indicates that trying to hot-swap without addtional steps "could" lead to corrupt data.
If at first you don't succeed, go to the ITRC
Nobody's Hero
Valued Contributor

Re: BAD JAMAICA DISK

Thanks everyone,
this is just a data disk, not root. I have done this a few times before. Im not a firm believer in the hot swap theory with jamaica drives. It burned me twice. Mail was down for 30 hours during a restore process after corruption. Thanks for the responses, good to hear different opinions. Im still not sure what I am going to do. probably shut mail down.
break the mirror, replace and resync.

thanks,
UNIX IS GOOD
Nobody's Hero
Valued Contributor

Re: BAD JAMAICA DISK

If anyone is interested. We avoided corruption this time by,

Shutting down all openmail services using the disks,
vhchange
vgcfgrestore
vgchange
and the a lvsync instead of a vgsync. Since the lv was one 9gb physical disk.

All was ok, thanks everyone.
UNIX IS GOOD
A. Clay Stephenson
Acclaimed Contributor

Re: BAD JAMAICA DISK

If I were you, I would get very comfortable with hot disk replacement. Very few boxes these days can be downed for routine tasks like disk replacement. I always avoid any intenal drives which can't be hot-swapped (like the old K-boxes). In that case, I simply don't use the internal drive slots.

I routinely replace several disk drives per month and have never had a data corruptionm problem. The only time that there is a potential for corruption is when you have stale extents on more than one drive. That very seldom happens. Unless a drive is completely dead, you should do an lvdisplay to see that all of the extents are current on the remaining 'good' drive before proceeding.

If it ain't broke, I can fix that.