Operating System - HP-UX
1748027 Members
4288 Online
108757 Solutions
New Discussion юеВ

what is your best experienced way to replace a failed disk in vg00?

 
SOLVED
Go to solution
Subentu
Frequent Advisor

Re: what is your best experienced way to replace a failed disk in vg00?

1. Remove the failed disk and Replace with new one (Can be Done Online)

2. Recreate device files and ensure the new disk is getting detected in ioscan.
# insf -e
# ioscan -fnC disk

3. Create partitions on the new disk
# vi /tmp/idf
3
EFI 500MB
HPUX 100%
HPSP 400MB
:wq!

4. Verify the Partition table on new disk.
# idisk /dev/rdsk/c3t6d0

5. Run "insf and ioscan " again and verify device files for partitions are created properly.
# insf -e
# ioscan -fnC disk

6. Populate the /efi/hpux directory in the EFI partition
# mkboot -e -l /dev/rdsk/c3t6d0

7. Update the AUTO file contents on disks.
# vi /tmp/auto
boot vmunix ├в lq
:wq!

# efi_cp ├в d /dev/rdsk/cXtXdXs1 /tmp/auto /efi/hpux/auto >>>> Replace cXtXdX with device file of Primary disk.

# efi_cp ├в d /dev/rdsk/c3t6d0s1 /tmp/auto /efi/hpux/auto >>>> New disk

8. Verify the contents of the system partition.
# efi_ls ├в d /dev/rdsk/c3t6d0s1

9. Verify the contents of the auto file in the system partition.
# efi_cp ├в d /dev/rdsk/c3t6d0s1 ├в u /efi/hpux/auto /tmp/auto

10. Restore LVM headers to the new disk.
# vgcfgrestore ├в n /dev/vg00 /dev/rdsk/c3t6d0s2

11. Reactivate the volume group to recognize the recovered disk.
# vgchange ├в a y /dev/vg00

12. Resynchronize mirrors.
# vgsync vg00


stephen peng
Valued Contributor

Re: what is your best experienced way to replace a failed disk in vg00?

Chris,
I agree with your opinion, and just like you, all the time I used "lvreduce -m 0" then "lvreduce -m 0 -k" to replace a failed disk in vg00, and I do feel confident about this way. but, frankly, it cause me more than one hour to finish the whole lvreduce procedure, not liked you said, "two minutes", especially when the failed disk appeared to be "unavailable" in vgdisplay.
maybe I am just looking for some "confident" way from other experts.

regards
stephen
Shibin_2
Honored Contributor

Re: what is your best experienced way to replace a failed disk in vg00?

I faced a similar situation in a critical production environment. Some requested to do the lvreduce, but I was confident over the pvchange command. System was running with HP-UX 11.11.

Here is the step, I took to replace the failed disk of rootvg.

==================

Detach LVM and all information from the disk to LVM
#pvchange -a N

# pvcreate -f -B /dev/rdsk/
# mkboot -l /dev/rdsk/
# mkboot -a "hpux -lq" /dev/rdsk/
# vgcfgrestore -n vg00 /dev/rdsk/
=> recovers LVM info to disk
# pvchange -a y /dev/dsk/
=> enables new root disk
# vgsync vg00
=> Synchronize the VG and LVs, this will take awhile
Both disks are now in sync.
# lvlnboot -Rv
=> Update the boot information on mirror disk.
#mkboot -b /usr/sbin/diag/lif/updatediaglif2 -p ISL -p HPUX -p LABEL -p AUTO
=> Update the LIF details to the mirrored disk.
Regards
Shibin
stephen peng
Valued Contributor

Re: what is your best experienced way to replace a failed disk in vg00?

Shibin├п┬╝
Not every 11.11 version support pvchange . another issue, was pvcreate -f -B necessary?

regards
stephen
chris huys_4
Honored Contributor

Re: what is your best experienced way to replace a failed disk in vg00?

Hi Stephen,

Ah its that system. You should have mentioned that the system never gets patched up and still doesnt have the 3 OLR patches installed as one of the conditions to come up with another procedure. ;)

Indeed in that case, lvreduce is still the safest method, although slow in some cases.

In all other cases, shibin's procedure(s) looks like a good replacement procedure for the "lvreduce" procedure.

Greetz,
Chris
vishnu.khandare
Respected Contributor

Re: what is your best experienced way to replace a failed disk in vg00?

Hi Stephen,

==>Not every 11.11 version support pvchange . another issue, was pvcreate -f -B necessary?

Answer==> -f option with pvcreate is force the disk to pvcreate, -B option is to make disk bootable.
Some time pvcreate -B does not work, it gives error, that time we need to use -f option.

Regards
Vishnu Khandare

You should deserve before U desire!!!!
stephen peng
Valued Contributor

Re: what is your best experienced way to replace a failed disk in vg00?

Chris,
maybe lvreduce is our safest method, maybe others get their own safest method,maybe I am anticipating that some one telling me "go! it is OK!"

regards
stephen
Shibin_2
Honored Contributor

Re: what is your best experienced way to replace a failed disk in vg00?

Hi Stephen,

Yes, you are right. Not all HP-UX 11.11 support pvchange command. You need to have necessary patch levels for this.

The machine I was working on it was MCOE.

Btw, that is your root disk mirror. So, you need to make it as bootable with -f -B option ( Vishnu explained it well ).
Regards
Shibin