- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Re-mirroring root disk in an emergency onto an...
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-24-2003 11:13 PM
08-24-2003 11:13 PM
Re-mirroring root disk in an emergency onto another disk
I have a mirrored root disk, (c0t0d0 and c1t0d0). If c1t0d0 fails, I want to have a script perform the necessary actions to establish the mirror c1t7d0. After some testing, it's not clear to me how to handle the lvlnboot changes required because normally, root disk deaths are handled by replacing the disk with a new disk on the same place (same device file).
I had assumed (dead disk is PV key 1):
lvreduce -k 1 -m 0 /dev/vg00/lvolX
vgreduce /dev/vg00 /dev/dsk/c1t0d0
(or possibly vgreduce -f /dev/vg00 because the PV isn't queryable)
pvcreate -f -B /dev/rdsk/c1t7d0
mkboot -l /dev/rdsk/c1t7d0
mkboot -a "hpux -lq" /dev/rdsk/c1t7d0
vgextend /dev/vg00 /dev/dsk/c1t7d0
lvextend -m 1 /dev/vg00/lvolX /dev/dsk/c1t7d0
Remember, this is on a disk in a different place, not a replacement of the dead disk (because I might not be able to get on-site quickly). The first time I did this, the lvreduce of the first mirrored LV of the root VG (lvol1, /stand, boot area) hung.
So, the question is, how does lvlnboot interact with this? Do I need to lvrmboot -r, -b -s etc. first because I won't be re-mirroring with the same device?
The second test I did, I took out the dead disk from the root VG, pvcreated, mkbooted etc the new mirror, mirrored the boot LV and lvlnboot would not report the new mirrored boot LV, that is, I expected to see:
Boot: lvol1 on: /dev/dsk/c0t0d0
/dev/dsk/c1t7d0
but only saw
Boot: lvol1 on: /dev/dsk/c0t0d0
Any help appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2003 12:22 AM
08-25-2003 12:22 AM
Re: Re-mirroring root disk in an emergency onto another disk
have you tried with " lvlnboot -R " ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2003 01:06 AM
08-25-2003 01:06 AM
Re: Re-mirroring root disk in an emergency onto another disk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2003 01:45 AM
08-25-2003 01:45 AM
Re: Re-mirroring root disk in an emergency onto another disk
What I know is that new boot disk is automaticaly recognized when added to root VG vg00.
What you've done is correct .. so I think you need lvrmboot -r, -b -s etc.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2003 02:14 AM
08-25-2003 02:14 AM
Re: Re-mirroring root disk in an emergency onto another disk
The lvreduce would hang because you are missing a disk.
Anyway, have you taken the system to maintenance mode and forced the disk out of the vg. Then you should be able to pvcreate -B the new disk, vgextend, and then re-mirror all the lvols again.
Remember that when you reboot from maintenance mode, DO NOT init 3 as you may corrupt your good disk. Reboot the server.
Still not 100% sure of what you are trying to achieve, but maybe the suggestions will help. I know I have managed to reduce a missing mirror disk out of vg00 and I am sure I had to do it maintenance mode.
Tim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2003 02:26 AM
08-25-2003 02:26 AM
Re: Re-mirroring root disk in an emergency onto another disk
All I'm trying to do is re-mirror a dead boot disk on an available spare without rebooting the machine or interrupting the service. Perhaps that's not possible though.
Two-way mirrors are tricky because of lack of disk slots ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2003 02:37 AM
08-25-2003 02:37 AM
Re: Re-mirroring root disk in an emergency onto another disk
If you are short of disk slots, how were you going to add the other disk? And if it is on a SE SCSI, you can't use address 7.
Tim.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2003 03:25 AM
08-25-2003 03:25 AM
Re: Re-mirroring root disk in an emergency onto another disk
If so, this must be something to do with lvlnboot?
I mean, normally, you can lvreduce out the broken mirrored disk extents without a reboot -what would be the point of online mirroring if you couldn't?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2003 04:41 AM
08-25-2003 04:41 AM
Re: Re-mirroring root disk in an emergency onto another disk
after lvextend -m 1 of all the lvols you should:
lvlnboot -b ${ROOTVG}/${BOOTLV}
lvlnboot -r ${ROOTVG}/${ROOTLV}
lvlnboot -s ${ROOTVG}/${SWAPLV}
lvlnboot -R
check with lvlnboot -v
Basically with the -k option the lvreduce works in most cases, but you cannot rely on that....
Additionally, you say you have some sort of extraordinary HW. Then you cannot be sure you can actually boot from your mirror until you tried it.
Finally, with 10.20 I had some bad experience a couple of years ago, because it would let you mirror the boot disk, boot from the mirror, let you take out the original boot disk from the Root VG, and then REFUSE to boot from that same (now unmirrored) disk.
(It just needed an LVM patch, though...).
Bottom line: you should have a reliable backup anyway.
Just my 0.02$
Regards,
Bernhard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2003 12:44 AM
08-27-2003 12:44 AM
Re: Re-mirroring root disk in an emergency onto another disk
We managed to do this with a script after all.
We run this from cron and it will detect dead mirrored disks, recommend where to re-mirror them until you van get on-site to replace the dead disk, and will create a script with the LVM commands to do the re-mirroring.
On 10.20, you have to do this for boot disks:
1: remove the mirrored LVs from the dead mirror using the PK key (using -A n too because vgcfgbackup fails since the dead disk is still in the VG it is trying to backup)
2: remove the disk from the VG
3: run lvlnboot -r, -b, -s and -d to reset these LVM links on the simplex disk
4: pvcreate the new root mirror
5: run mkboot -l and mkboot -a to populate the boot areas on the new root disk
6: vgextend the root VG with the new root disk
7: Mirror the root LVs onto the new root disk
This works well, completely on-line with no reboots. We were able to boot from either root disk after this, even though the new root disk was in a completely different slot to the original mirror. One thing to note is that lvlnboot -R is unecessary since any LVM command that changes the root LVs runs this automatically since HP-UX 10.0
Also, we noticed that lvlnboot -v does not show both root disks in the output for the Boot, Root and Swap areas until all three are mirrored. Strange but true.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2003 12:48 AM
08-27-2003 12:48 AM
Re: Re-mirroring root disk in an emergency onto another disk
Just because lvlnboot -v says its a boot disk does not make it a boot disk. Booting off it makes it a boot disk.
Please consider assigning points to others that were actually helpful to you.
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
08-27-2003 06:05 AM
08-27-2003 06:05 AM
Re: Re-mirroring root disk in an emergency onto another disk
Best regards,
Kent M. Ostby
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2003 06:39 AM
08-27-2003 06:39 AM
Re: Re-mirroring root disk in an emergency onto another disk
Food for thought, Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2003 09:41 PM
08-27-2003 09:41 PM
Re: Re-mirroring root disk in an emergency onto another disk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2003 09:42 PM
08-27-2003 09:42 PM
Re: Re-mirroring root disk in an emergency onto another disk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2003 09:44 PM
08-27-2003 09:44 PM
Re: Re-mirroring root disk in an emergency onto another disk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2003 09:46 PM
08-27-2003 09:46 PM
Re: Re-mirroring root disk in an emergency onto another disk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2003 09:46 PM
08-27-2003 09:46 PM
Re: Re-mirroring root disk in an emergency onto another disk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2003 09:47 PM
08-27-2003 09:47 PM