Operating System - HP-UX
1825689 Members
3562 Online
109686 Solutions
New Discussion

need to replace bad disk in mirror

 
SOLVED
Go to solution
William Capen
Advisor

need to replace bad disk in mirror

Hi,

I'm running on a rx4640 at 11.23 with all patches installed.

I've been giving a setup that I've not worked with before and it has a bad disk. This is not a system disk.

I have a scsi shelf containing the max of 14 disks. 7 of those disks are mirrored to the other 7. One of the disks is bad. LV status shows available/stale. Thirteen of the disks show up in the Physical volumes list but not the bad one. A listing of Logical extents gives me 2168 lines of
"23868 ??? 02168 stale /dev/dsk/c5t4d0 02168 current"
where the rest of the 25000 lines are currenet/current. So my question is, do I have to remove the mirror before I can replace the one disk or is the disk hot swappable? Or is there anything else I can do? I do not have any slots in which to place another disk prior to the replacement. I also get no response from the bad disk at all.

Thanks,

Bill
19 REPLIES 19
TTr
Honored Contributor

Re: need to replace bad disk in mirror

Take a look at
http://docs.hp.com/en/5991-1236/When_Good_Disks_Go_Bad.pdf
It will tell you how to do it.
Prashanth Waugh
Esteemed Contributor

Re: need to replace bad disk in mirror

Hi William,

before inserting a new disk take the o/p of

#ioscan -fnC disk
Also look in to /etc/lvmtab

That will easy to u after replacing the disk whether its detected or not

Regards
Atul
For success, attitude is equally as important as ability
Vihang.
Trusted Contributor

Re: need to replace bad disk in mirror

Hi William,

You can replace the disk & do a vgcfgrestore. But go through the document which TTR has pointed to. Its a very good document & will give you pretty good insights on how to go about it.


Regards,
Vihang.
Steven E. Protter
Exalted Contributor

Re: need to replace bad disk in mirror

Shalom,

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

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
William Capen
Advisor

Re: need to replace bad disk in mirror

I had looked at the PDF which got me to the question of removing the mirror or is the disk hot swappable. ioscan doesn't show the disk but lvmtab does. Doing diskinfo gets me no such device. At this point I can assume that there are no extents on the disk. If I need to remove the mirror, that's a bit of an over kill I think.
Deepak Kr
Respected Contributor

Re: need to replace bad disk in mirror

William,

Can you confirm if disk (14) are mirrored at storage box level or at OS level.

IF at storage box level then procedure will differ here!!

If at OS level then we will use different steps!!

provide vgdisplay -v vg_name
#lvdisplay /dev/vg_name/lv_name |grep mirror
#lvdisplay -v /dev/vg_name/any_lv_name |tail -9

"There is always some scope for improvement"
TTr
Honored Contributor

Re: need to replace bad disk in mirror

> "23868 ??? 02168 stale /dev/dsk/c5t4d0 02168 current

This shows that there is a missing disk that was part of LVM mirroring. The 3 questionmarks above are in place of the missing disk device. The c5t4d0 is the good disk remaining in the mirror setup.
The disk should be hot pluggable. You did not say what kind of enclosure it is but everything nowadays is hot pluggable at least.
William Capen
Advisor

Re: need to replace bad disk in mirror

The enclosure is a 14 disk scsi box filled to capacity. The mirroring is done with LVM. As you can see by the attached there are 24999 lines when doing a lvdisplay. 2168 are telling me that one of the 7 disks in the mirror is no longer with us.

If I understand you correctly, I can just remove the dead disk and insert a new one. At that point I'll need to determine if OLR is installed or not on the system.
Torsten.
Acclaimed Contributor

Re: need to replace bad disk in mirror

>>At that point I'll need to determine if OLR is installed or not on the system

Because you are running 11.23 I assume you have.

man pvchange

if the "-a" option is listed, OLR is available.

You *must* use

pvchange -a n ...

in order to replace the disk, otherwise the vgcfgrestore will not work!

Just follow the well known manual...

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Deepak Kr
Respected Contributor

Re: need to replace bad disk in mirror

William,

Once you replace the faulty disk successfully, follow these steps:

#ioscan -funC disk|more
new disk should recognised here!!

#pvcreate -f -B /dev/rdsk/c_t_d0

#vgcfgrestore -n vgname /dev/rdsk/c_t_d0

# vgchange -a y /dev/vgname

# vgsync vgname

check mirror status after vgsync is completed!!
"There is always some scope for improvement"
Torsten.
Acclaimed Contributor

Re: need to replace bad disk in mirror

@Kumar Deepak

why using "pvcreate -B ..." on a non-boot disk?

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
William Capen
Advisor

Re: need to replace bad disk in mirror

Are we using the same device name? The dead device is c4t4d0 so the restore should be done to the same device or should I look for a new one?
Patrick Wallek
Honored Contributor
Solution

Re: need to replace bad disk in mirror

The device file name should be the same.

If it is not currently showing up in ioscan, then what you should do is:

1) Replace the disk
2) ioscan -fnC disk
to make sure you see it. If the device file names are not showing up, then do
2a) insf -eC disk
to create the device files
2b) ioscan -fnC disk
to make sure the device files are now showing up in ioscan
3) pvcreate
4) vgcfgrestore
5) vgchange -a y vg??
6) vgsync
Torsten.
Acclaimed Contributor

Re: need to replace bad disk in mirror

With hp-ux 11.23 and a plain SCSI controller the device file will remain the same.

This could be different with 11.31 or SAS controllers, but you don't have this.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Deepak Kr
Respected Contributor

Re: need to replace bad disk in mirror

sorry for typo:

why using "pvcreate -B ..." on a non-boot disk?

pvcreate -f disk
"There is always some scope for improvement"
Torsten.
Acclaimed Contributor

Re: need to replace bad disk in mirror

Even this is not needed.

The "-f" is dangerous, if you use a wrong disk device file by accident.

The vgcfgrestore will do the same and more as the pvcreate - so pvcreate is not needed.

;-)

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
William Capen
Advisor

Re: need to replace bad disk in mirror

so once I run

ioscan -fnC disk
and
insf -eC disk

and the new device is seen by the system, I only need to do

vgcfgrestore -n vg01 /dev/rdsk/c4_t4_d0

vgchange -a y /dev/vg01

vgsync vg01

That's it?
Patrick Wallek
Honored Contributor

Re: need to replace bad disk in mirror

Yep, that should work.
William Capen
Advisor

Re: need to replace bad disk in mirror

YEA!!!!! I'm back! That was very scary due to the extreme importance of the file system but it worked! Thanks to ALL of you for your help!

Bill