1833875 Members
1535 Online
110063 Solutions
New Discussion

Re: Disk replacement

 
SOLVED
Go to solution
Rkumar
Frequent Advisor

Disk replacement

Dear Experts,

Recently I have done disk replacement activity. And the activity completed successfully. the disk that need to be replaced was alternate disk of root volume group as well hot swapable.I followed the below mentioned procedure.

1. pvchange -a N /dev/dsk/c#t#d#
2. FE will replace the disk
4. vgcfgrestore -n vg00 /dev/dsk/c#t#d#
5. pvchange -a y /dev/dsk/c#t#d#
6. vgsync vg##
7. shutdown -ry 0
8. mkboot -l /dev/rdsk/c1t0d0
mkboot -a "hpux -lq" /dev/rdsk/dev/rdsk/c1t0d0
mkboot -b /dev/rdsk/c3t0d0 /dev/rdsk/c1t0d0
lifcp /dev/rdsk/c1t0d0:AUTO –
lvlnboot -R

In this procedure I did not use pvcreate -B (this could be 3rd step).please let me know that without creating a physical volume on a disk can it used in a VG.?

Thanks,
Rahul
9 REPLIES 9
Johnson Punniyalingam
Honored Contributor

Re: Disk replacement

Please refer to HP offical document on Disk replacement .. :)

"Good disk Gone Bad".

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

Thanks,
Johnson
Problems are common to all, but attitude makes the difference
Rkumar
Frequent Advisor

Re: Disk replacement

Thanks Johnson

I appreciate u r quick reply however my concern is that in this procedure I did not use pvcreate -B (this could be 3rd step).please let me know that without creating a physical volume on a disk can it used in a VG.?

Regards,
Rahul
johnsonpk
Honored Contributor
Solution

Re: Disk replacement

>>I did not use pvcreate -B (this could be 3rd step).
You should not use the pvcreate comand as the pv is already recorded in lvmtab.(command will fail with error"physical volume is already recorded in lVMTAB)

vgcfgrestrore will take care of creating LVm structure on the replaced disk

>>please let me know that without creating a physical volume on a disk can it used in a VG.

please not that ,At some point of time you did a pvcreate on the same disk device file for adding that to the VG and as a result, that disk is marked as pv and became part of lvmtab.And now your system knew that there was a pv on the replaced disk's device path and for some reason it was not available for some time.
Johnson Punniyalingam
Honored Contributor

Re: Disk replacement

>>>I did not use pvcreate -B (this could be 3rd step).please let me know that without creating a physical volume on a disk can it used in a VG.?<<<

Yes, It can be used in "vg" .. but it will not boot, that's the purpose using (pvcreate -B /dev/rdsk/cxtxdx) -B option will Make a physical volume bootable (i.e. a system disk).

man pvcreate

pvcreate recognizes the following options:

-B Make a physical volume bootable (i.e. a system
disk).

HTH,
Johnson
Problems are common to all, but attitude makes the difference
Rkumar
Frequent Advisor

Re: Disk replacement

thanks johnsonpk but then how can i make that alternate disk bootable as to make the disk bootable i need to run this command pvcreate -B but this will give error that pv is already recorded in lvmtab. Please suggest.



Regards,
Rahul
Rkumar
Frequent Advisor

Re: Disk replacement

Thanks Dear experts at last i got resolved my query. Points have been awarded to all experts.


Regards,
Rahul
johnsonpk
Honored Contributor

Re: Disk replacement

>>how can i make that alternate disk bootable as to make the disk bootable i need to run this command pvcreate -B but this will give error that pv is already recorded in lvmtab. Please suggest.

pvcreate with -B option creates an area on the disk for a LIF volume, boot utilities, and a BDRA (Boot Data Reserved Area).

and mkboot is for placing boot utilities in the boot area:(BDRA)

Here vgcfgrestore will take care of restoring LVM structure includin BDRA,and there for you only need to copy the bootprogram into it by mkboot command.


However you may consider doing mkboot and lvlnboot -R before executing the shutdown command.( i guess shutdown is for test booting the server from replaced disk )

Rkumar
Frequent Advisor

Re: Disk replacement

Tahnks Johnsonpk,

This is what I m waiting for. Points have been awarded for this.

Regards,
Rahul
kashyapi
Frequent Advisor

Re: Disk replacement

Hi Rkumar,

I am confused about rebooting the system as you mentioned the steps.Did you check whether you are able to boot from Alternate disk which you have replaced.Actualy reboot is not required.

Secondly, can you pls check the output of lvlnboot -v and check whether boot,root,swap and dump is configured.You may not see boot lvol configured.In that case you may have to run lvlnboot -b /dev/vg00/lvol1