- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Replacing vg00`s boot disk
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
тАО04-05-2010 03:30 AM
тАО04-05-2010 03:30 AM
I am writing a standard procedure for replacing vg00's boot disks (mirrored and hot swappable). Based on the HP's doc "When good disks go bad" I have the following (for 11.11):
1┬║ lvreduce -m 0 -A n /dev/vg00/lvol1 /dev/dsk/cXtXdX
2┬║ vgreduce /dev/vg00 /dev/dsk/cXtXdX
3┬║ pvchange -a N /dev/dsk/cXtXdX --> Is it necessary?
4┬║ Replace disk and find it with ioscan
5┬║ vgcfgrestore -n /dev/vg00 /dev/rdsk/cXtXdX
6┬║ pvchange -a y /dev/dsk/cXtXdX or vgchange -a y /dev/vg00 ?
7┬║ mkboot /dev/rdsk/cXtXdX
8┬║ mkboot -a "hpux -lq" /dev/rdsk/cXtXdX
9┬║ lvlnboot -R /dev/vg00
10┬║ Check with lvlnboot тАУv
I have some doubts:
3┬║ pvchange -a N /dev/dsk/cXtXdX --> Is it necessary? I think it is not, because you have stopping LVM access to the disk by reducing its mirror copies and reducing the vg00....
5┬║ vgcfgrestore -n /dev/vg00 /dev/rdsk/cXtXdX --> Will this add the disk to vg00 and recreate the mirror copies? I think so, but need confirmation (i.e. I do not need to do vgextend nor lvextend -m 1 .... again for each logical volume)
6┬║ pvchange -a y /dev/dsk/cXtXdX or vgchange -a y /dev/vg00 ? --> Which I have to use? Have I to wait until mirror copies are synchronized?
And for boot headers and the whole procedure, are all the needed steps in this procedure?
Regards,
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-05-2010 04:42 AM
тАО04-05-2010 04:42 AM
Re: Replacing vg00`s boot disk
N Detach the given path and all other
paths to the physical volume. The
system administrator should always
presume that all the disks that
belong to an active volume group
are attached and may be used by LVM
at any time, unless LVM has been
specifically notified to detach
them. Prior to replacing or
repairing any disk belonging to an
active volume group, the
administrator must first detach the
PV using this command. When a PV
is detached, LVM closes all the
paths to the PV and no longer
directs any I/O operations to it.
If a suitable spare PV is available
in the volume group, LVM will use
it to reconstruct the detached
disk. The given path must be an
attached path to the PV, otherwise,
the command will fail and display
an error message indicating the
problem. If for any reason the use
of the -N N opton fails, the
physical volume can still be
detached from the volume group by
individually detaching each of the
paths to the physical volume using
the -a n option instead.
5├В┬║ vgcfgrestore -n /dev/vg00 /dev/rdsk/cXtXdX --> Will this add the disk to vg00 and recreate the mirror copies? I think so, but need confirmation (i.e. I do not need to do vgextend nor lvextend -m 1 .... again for each logical volume)==> yes it will ,only thing you need to run vgsynch and lvsynch .
pvchange -a y /dev/dsk/cXtXdX or vgchange -a y /dev/vg00 ? --> Which I have to use? Have I to wait until mirror copies are synchronized?
with out changing it you will not be able to resynch it !!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-05-2010 04:52 AM
тАО04-05-2010 04:52 AM
Re: Replacing vg00`s boot disk
You can:
Replace de disk
ioscan the disk
vgcfgrestore -n /dev/vg00 /dev/rdsk/cXtXdX
vgsync /dev/vg00
mkboot...etc.
because in your procedure, you are making a backup of the vg00 here:
vgreduce /dev/vg00 /dev/dsk/cXtXdX
and when you restore it it's going to only have one disk, you need to:
vgreduce -A n /dev/vg00 /dev/dsk/cXtXdX
3├В┬║ pvchange -a N /dev/dsk/cXtXdX --> Is it necessary? If you reduce the mirror, you don't need it.
5├В┬║ vgcfgrestore -n /dev/vg00 /dev/rdsk/cXtXdX --> Will this add the disk to vg00 and recreate the mirror copies?
only if the lvm backup copy had the 2 disks with a mirror
to sync:
vgsync /dev/vg00 just in case
6├В┬║ pvchange -a y /dev/dsk/cXtXdX or vgchange -a y /dev/vg00 ? --> Which I have to use?
If you use pvchange -a N, then you need to use pvchange -a y once the disk has been replaced
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-05-2010 05:47 AM
тАО04-05-2010 05:47 AM
Re: Replacing vg00`s boot disk
I understand what you say about "vgreduce -A n /dev/vg00 /dev/dsk/cXtXdX" but then the document "When good disks go bad" (lots of people point to this docs when questioned about replacing disks) is wrong ! Is it possible ? In this doc they tell you to "vgreduce /dev/vg00 /dev/dsk/cXtXdX" and afterwards, "vgcfgrestore -n /dev/vg00 /dev/rdsk/cXtXdX"
Also, this doc do not say anything about "vgsync" or "lvsync". It only talks about "pvchange -a y" and "vgchange -a y". I am getting a bit confused.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-05-2010 06:12 AM
тАО04-05-2010 06:12 AM
Re: Replacing vg00`s boot disk
Nah, in the doc it can't be wrong, i'll test it out.
Also, this doc do not say anything about "vgsync" or "lvsync". It only talks about "pvchange -a y" and "vgchange -a y". I am getting a bit confused.
pvchange -a y <--- you activate access to the pv, if you previously did a pvchange -a N
vgchange -a y <---- does a backgroung vgsync, so if you do a vgchange -a y vg00 you don't need to also do a vgsync
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-05-2010 06:17 AM
тАО04-05-2010 06:17 AM
Re: Replacing vg00`s boot disk
Nah, in the doc it can't be wrong, i'll test it out."
Ok, I cannot do such test, if you can do it, please, let me know the results. I think it will work...
Thank you very much!
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-05-2010 06:18 AM
тАО04-05-2010 06:18 AM
Re: Replacing vg00`s boot disk
There is no chance of doubt,
You can proceed with the procedure ..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-05-2010 06:29 AM
тАО04-05-2010 06:29 AM
Re: Replacing vg00`s boot disk
Reducing the mirror is required when your disk not completely dead bcz to avoid data corruption.If disk is completely dead then you can directly replace the disk.
Regards
Ankit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-05-2010 06:52 AM
тАО04-05-2010 06:52 AM
Re: Replacing vg00`s boot disk
# pvchange -a N /dev/dsk/cXtXdX
- Replace disk and find it with ioscan
# vgcfgrestore -n /dev/vg00 /dev/rdsk/cXtXdX
# pvchange -a y pvname
or it is better to reduce mirror and vg?
This is my doubt, because there are these two methods and the first one is easier and faster.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-05-2010 07:22 AM
тАО04-05-2010 07:22 AM
SolutionYou can check the case scenarios, case number 1 on the when good di... document.
HP support techs normally just replace the disk,sync,mkboot part. It's much faster this way.