Operating System - HP-UX
1753226 Members
3168 Online
108792 Solutions
New Discussion юеВ

Need to replace a mirrored disk that is going bad.

 
SOLVED
Go to solution
Ray Humpage
Frequent Advisor

Need to replace a mirrored disk that is going bad.

I have a disk that powerfailed a couple of days ago. I wasn't sure if it was the disk itself or old firmware so I brought it back online. When it first happened I was getting a few lbolt errors. I haven't gotten any messages since but the disk is getting slower and slower. I am getting avque times of 889.0 now. So I want to replace it. I have unmirrored all my LV's to that disk so that disk currently has nothing on it. But the system doesn't see it as bad - so should I do a pvremove and add the disk as new? Or just do a swap and do a vgcfgrestore? It's a SCSI disk in an SC10. Because it's SCSI should I power down while swapping? I know that SCSI doesn't like to have any openings in the chain - so I don't know how it will react while I have the disk out. Thanks. Ray.
4 REPLIES 4
Sundar_7
Honored Contributor
Solution

Re: Need to replace a mirrored disk that is going bad.

Since this is just a mirror disk, I would go with vgreduce and add the new disk to the VG.

You dont have to powerdown as long as the enclosure is hot swappable.

Here is how I would do it

1) # lvreduce all the lvs mirror from the failing disk.

# vgreduce /dev/vg01 /dev/dsk/

2) Replace the disk online if hot swappable

3) # pvcreate /dev/rdsk/

# vgextend /dev/vg01 /dev/dsk/

# lvextend -m 1 /dev/vg01 /dev/dsk/

# vgcfgbackup /dev/vg01


Ofcourse, if the disk is part of vg00, you need to execute couple more commands for BDRA and LIF volumes.
Learn What to do ,How to do and more importantly When to do ?
Mel Burslan
Honored Contributor

Re: Need to replace a mirrored disk that is going bad.

It had been a long while I have not touched an sc10 but as far as I can remember, the drives in the sc10 are hot swappable, so you should not need to power down the whole array.

as far as the pvremove vs vgcfgrestore, I always preferred the latter. As a matter of fact, I would have even left the mirrors in place and after vgcfgrestore, I would re-sync the mirrors, to save myself a few less commands to type.
________________________________
UNIX because I majored in cryptology...
Sundar_7
Honored Contributor

Re: Need to replace a mirrored disk that is going bad.

I forgot to mention, now that you have unmirrored all the LVs, by doing vgcfgrestore on the new disk, you are not gaining much for you have to remirror all of those volumes again :-).

So, go with the better option. vgreduce, pvcreate, vgextend and lvextend
Learn What to do ,How to do and more importantly When to do ?
Ray Humpage
Frequent Advisor

Re: Need to replace a mirrored disk that is going bad.

So it looks like I can replace it either way. I can completely remove and readd using the vgreduce, pvcreate, vgextend and lvextend or do a swap and do the vcfgrestore. Either way I know I will have to manually remirror. I was forced to remove the mirrors because the disk was causing the system to drag. All the users were complaining. I know I've replaced disks in the SC10 before - it's just been a couple of years so it must be a hot-swappable device. I'm going to go replace the drive now. I will assign points when I get back. Thanks everyone. I feel a lot better about doing this now.