- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Replacing a failed mirrored root disk online
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
Discussions
Discussions
Forums
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
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
тАО06-22-2007 08:58 PM
тАО06-22-2007 08:58 PM
I had gone through the steps for
"replacing a failed mirrored root disk" posted by different members of this forum.
I would like to clarify the below :
1) Someone says after replacing the disk, do a "pvcreate" on the new disk and then "vgcfgrestore" and next steps (vgchange,vgsync etc )
2)Others say replace the disk, do a vgcfgrestore ( NO pvcreate) and next steps (vgchange,vgsync etc )
So which one is correct ? ( OR both are correct ? )
Will LVM allow to do a pvcreate as the disk entry is already there in /etc/lvmtab under vg00 ?( I am using a disk with same target number)
If the answer is NO, then I am again confused as the man page for pvcreate says "Disks cannot be added to a volume group until they are properly initialized by pvcreate "
All responses are appreciated
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-22-2007 10:17 PM
тАО06-22-2007 10:17 PM
Solutionhttp://docs.hp.com/en/5991-1236/When_Good_Disks_Go_Bad.pdf
(Chapter 6 is about replacing a failed disk. Note that chapter 5 is about removing a failed disk when you *don't* intend to replace it.)
The essential question is, did you use lvreduce and/or vgreduce before removing the failed disk or not?
(If your OS version and patchlevel is such that you have the LVM OLR functionality available, you can prevent the LVM from accessing the disk while you're replacing it with "pvchange -a N". If your OS is so old it does not have this facility, you should lvreduce & vgreduce the failed disk out of its volume group before hot-unplugging the actual disk.)
If you did lvreduce & vgreduce the disk out of VG configuration before replacing the disk, "vgcfgrestore" is not going to do anything useful, as the saved configuration will not include this disk anymore. You must proceed just like when mirroring a root disk for the first time:
- "pvcreate" to make the new disk a LVM disk (don't forget the -B option for PA-RISC root disks!)
- "mkboot" to install the bootloader (the boot area is outside the LVM area, so it is not mirrored automatically)
You might install the off-line diagnostics to the boot area too, if you use them.
- "vgextend" to join the disk to the volume group
- "lvextend -m 1" to mirror each logical volume
- "lvlnboot" to update the LVM boot configuration
If you did not lvreduce & vgreduce before replacing the disk, you can use vgcfgrestore.
In this case, vgcfgrestore will make the new disk configured exactly the same as the original was (from the LVM viewpoint): the VG membership and the mirror configuration of each LV will be restored to the new disk. However, the actual data will still be (extremely) out of sync: vgcfgrestore will restore just the LVM configuration, not the data.
After the vgcfgrestore, you must enable LVM access to the disk with "pvchange -a y" (if it was disabled either manually or automatically because of the disk failure).
After that, the LVM should automatically start synchronizing the LVs. If that does not happen, you can use "vgsync" or "lvsync" to force the synchronization.
The boot area must also be restored independently of LVM, just as above.
You should be able to run "mkboot" at any time after the vgcfgrestore, but the "lvlnboot" should be run only after the three boot-critical LVs (lvols 1-3: /stand, swap and root) have completed synchronization.
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-24-2007 12:16 AM
тАО06-24-2007 12:16 AM
Re: Replacing a failed mirrored root disk online
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-24-2007 06:21 AM
тАО06-24-2007 06:21 AM
Re: Replacing a failed mirrored root disk online
Note that many newer Itanium systems offer hardware raid cards. If your system is configured with hardware raid, you need to merely replace the disk.
I believe that which of your two steps in a software raid scenario are correct depends on what your response was when the disk went bad.
If you caught it before it died and split the mirrors then you start with pvcreate and don't do vgcfgrestore at all.
More commonly the pvcreate/vgcfgrestore path is what needs to be done because the disk was totally dead before any action was taken.
pvcreate is needed to prepare the disk for any use t all. Option 2 will fail if pvcreate is required. Then go with option 1. I always go for some version of option 1. preparing the disk never hurts even if technically not needed.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-24-2007 07:28 AM
тАО06-24-2007 07:28 AM
Re: Replacing a failed mirrored root disk online
To list and verify the config file
root [/root] vgcfgrestore -n /dev/vg00 -l
Volume Group Configuration information in "/etc/lvmconf/vg00.conf"
VG Name /dev/vg00
---- Physical volumes : 2 ----
/dev/rdsk/c0t0d0 (Bootable)
/dev/rdsk/c3t0d0 (Bootable)
mkboot /dev/rdsk/c0t0d0
mkboot -b /usr/lib/uxbootlf /dev/dsk/c0t0d0
Pvchange -a n /dev/dsk/c0t0d0
vgcfgrestore -F -n vg00 /dev/rdsk/c0t0d0
Pvchange -a y /dev/dsk/c0t0d0
vgchange -a y vg00
vgsync vg00
lvlnboot -R
for lif_comp in `lifls /dev/dsk/c3t0d0`
do
/usr/bin/lifcp /dev/dsk/c3t0d0:${lif_comp} /dev/dsk/c0t0d0:${lif_comp}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-24-2007 07:52 AM
тАО06-24-2007 07:52 AM
Re: Replacing a failed mirrored root disk online
I am aware of the official procedure to replace the disk (lvreduce,vgreduce,pvcreate......) and also about the "idisk" partitioning on itanium servers
But I am confused about the procedures suggested by different forum members as I said first
The situation is that Disk is completely dead and hot swappable and no OLR is installed
Someone in this forum said to unplug the disk and straight away do a "vgcfgrestore" followed by next steps
While others said to do a "pvcreate -fB" first and then "vgcfgrestore" followed by next steps
So my question is, in the above situation a pvcreate is possible or NOT as the disk entry is already there in /etc/lvmtab ?
and if pvcreate is not required, is it going to work ?