- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- problem about faied disk replace
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2010 01:22 AM
08-13-2010 01:22 AM
I've got a problem when a replace a failed disk of vg00(consisted of c0t0d0 and c1t9d0). here was my steps:
1,replace the failed disk
2,mv /etc/lvmtab /etc/lvmtab.bak
3,pvcreate -B /dev/rdsk/c0t0d0
4,mv /etc/lvmtab.bak
5,vgcfgrestore -n /dev/vg00 /dev/rdsk/c0t0d0
then i got error messages:
vgcfgrestore: Cannot restore Physical Volume "/dev/dsk/c0t0d0",
Detach the PV or detactivate the VG, before restoring the PV.
finally I use lvreduce and vgreduce to complete the replace procedure.
could you please explain why i encountered that error.
thanks a lot
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2010 01:31 AM
08-13-2010 01:31 AM
Re: problem about faied disk replace
Take a look at this document from HP:
http://docs.hp.com/en/5991-1236/When_Good_Disks_Go_Bad_WP.pdf
rgs,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2010 09:32 AM
08-14-2010 09:32 AM
Re: problem about faied disk replace
The error message is because you should have either done a "pvchange -a N" to the disk to detach/deactivate it or a "vgchange -a n" to deactivate the whole volume group.
Regards,
Viktor
Unix operates with beer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-15-2010 08:33 PM
08-15-2010 08:33 PM
SolutionWhy you move lvmtab around???
Better to follow the steps in the when_good_disks ... document.
>> vgcfgrestore: Cannot restore Physical Volume "/dev/dsk/c0t0d0",
Detach the PV or detactivate the VG, before restoring the PV.
You get this because the disk was not disabled for LVM access
# pvchange -a n /dev/...
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!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2010 03:02 AM
08-16-2010 03:02 AM
Re: problem about faied disk replace
If I did not mv lvmtab first and then pvcreate c0t0d0 and then mv vmtab back, I would not able to pvcreate c0t0d0 since lvmtab recognize it as configured at vg00. consider not encounter such situation with vg00, it would not need such steps,right?
is pvchange -a n availalbe at 11.11?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2010 03:08 AM
08-16-2010 03:08 AM
Re: problem about faied disk replace
> is pvchange -a n availalbe at 11.11?
Yes.
/usr/sbin/pvchange [-A autobackup] -a availability pv_path
rgs,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2010 03:09 AM
08-16-2010 03:09 AM
Re: problem about faied disk replace
For 11.11: Patches PHKL_31216 and PHCO_30698 (or superseding patches)
Replacing a Mirrored Disk
In the event you need to replace a nonfunctional mirrored disk, you should perform the following steps to ensure that the data on the replacement disk are both synchronized and valid:
1.
Before replacing the disk, minimize any potential loss of data due to its removal; confirm that any mirrored logical volumes using the disk are mirrored onto a separate disk and that those mirror copies are current. You can find the list of logical volumes using the disk using pvdisplay:
pvdisplay -v /dev/dsk/cntndn
For each of those logical volumes, you can use lvdisplay to check which logical extents are mapped onto the disk, and if thereâ s a current copy of that data on another disk, as discussed in â Synchronizing a Mirrored Logical Volumeâ :
lvdisplay -v /dev/vol_group/lvoln | grep /dev/dsk/cntndn
2.
Run vgcfgbackup to save the volume group configuration information, if necessary:
vgcfgbackup /dev/vol_group
3.pvchange -a N /dev/dsk/cxtxdx
Physically disconnect the bad disk and connect the replacement.
5.
If you are replacing a mirror of the boot disk, set up the boot area on the disk.
1.
If this is an HP Integrity Server, partition the disk using the idisk command, as described in â Mirroring a Boot Disk with LVM on HP-UX 11i for HP Integrity Serversâ . You do not need to run insf or pvcreate, since you are replacing an existing physical volume.
2.
Use the mkboot command to set up the boot area:
mkboot /dev/rdsk/cntndn
On HP Integrity Servers, use the -e and -l options to the mkboot command to copy EFI utilities to the EFI partition:
mkboot -e -l /dev/rdsk/cntndn
3.
Update the root volume group information:
lvlnboot -R /dev/vg00
6.
Run vgcfgrestore to restore LVM configuration information to the added disk:
vgcfgrestore -n /dev/vol_group /dev/rdsk/cntndn
7.
Run vgchange -a y to reactivate the volume group to which the disk belongs. Since the volume group is already currently active, no automatic synchronization occurs:
vgchange -a y /dev/vol_group
8.
If any of the logical volumes on the disk had a nondefault timeout assigned, restore the previous timeout:
lvchange -t value /dev/vol_group/lvoln
9.
Now run vgsync to manually synchronize all the extents in the volume group:
vgsync /dev/vol_group
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2010 07:09 AM
08-17-2010 07:09 AM
Re: problem about faied disk replace
I have tried executing pvchange -a N on my 11.11, but it failed.
Daniel,
in my replacing steps, i move lvmtab so I could execute pvcreate -B, do you mean that I don't need to remove lvmtab to pvcreate -B if I run pvchange -a N?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2010 07:13 AM
08-17-2010 07:13 AM
Re: problem about faied disk replace
There is also no need to pvcreate the new disk, because you have to use vgcfgrestore.
In order to do this, you need to deactivate LVM access (pvchange -a n ...) first.
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!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2010 07:35 AM
08-17-2010 07:35 AM
Re: problem about faied disk replace
> There is never a need to remove lvmtab
> while replacing a bad disk.
>
> There is also no need to pvcreate the new
> disk, because you have to use
> vgcfgrestore.
> In order to do this, you need to
> deactivate LVM access (pvchange -a n ...) > first.
The "pvchange -a n" is only true when the necessary "olr" patches were installed, PHCO_30698, PHKL_30218 and PHKL_31216, which got introduced on hp-ux 11.11.
Probably the above patches have allready been superseeded a number of times by newer patches.
And from stephen reply, these patches, old as they are, doesnt seem to be installed on the system, so then the old and tried procedure of lvreduce and vgreduce is still the only valid one..
Greetz,
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2010 07:46 AM
08-17-2010 07:46 AM
Re: problem about faied disk replace
>> I have tried executing pvchange -a N on my 11.11, but it failed.
... but failed ...
What exactly failed?
Any error message?
What was the command?
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!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2010 08:26 AM
08-17-2010 08:26 AM
Re: problem about faied disk replace
Its occams? razor. ;)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2010 12:27 AM
08-19-2010 12:27 AM
Re: problem about faied disk replace
>>There is never a need to remove lvmtab while replacing a bad disk.
There is also no need to pvcreate the new disk, because you have to use vgcfgrestore
you meant that vgcfgrestore would make the new disk bootable?
regards
stephen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2010 03:33 AM
08-19-2010 03:33 AM
Re: problem about faied disk replace
no, vgcfgrestore only creates the LVM header on the disks. you should manually make it bootable.
Unix operates with beer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2010 08:14 AM
08-19-2010 08:14 AM
Re: problem about faied disk replace
The boot area is still empty, so you need to do the mkboot and lvlnboot commands.
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!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2010 05:35 AM
08-21-2010 05:35 AM