- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Replace root mirror disk,are these steps all r...
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
тАО01-20-2004 12:40 PM
тАО01-20-2004 12:40 PM
1)first replace the bad disk online with hot pulling and pluging action.
2)ioscan -fnCdisk
3├п┬╝ mv /etc/lvmtab /etc/lvmtab.bak
4├п┬╝ pvcreate /dev/rdsk/c2t#d0
5├п┬╝ cp /etc/lvmtab.bak /etc/lvmtab
6├п┬╝ strings /etc/lvmtab
7├п┬╝ mkboot /dev/rdsk/c2t#d0
8├п┬╝ mkboot -a "hpux -lq (;0) /stand/vmunix" /dev/rdsk/c2t10d0
9├п┬╝ vgcfgrestore -n /dev/vg00 /dev/rdsk/c2t10d0
10├п┬╝ vgsync /dev/vg00
11├п┬╝ lvlnboot -r /dev/vg00/lvol1
12├п┬╝
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-20-2004 12:44 PM
тАО01-20-2004 12:44 PM
Re: Replace root mirror disk,are these steps all right?
1)first replace the bad disk online with hot pulling and pluging action.
2)ioscan -fnCdisk
3)mv /etc/lvmtab /etc/lvmtab.bak
4)pvcreate /dev/rdsk/c2t#d0
5)cp /etc/lvmtab.bak /etc/lvmtab
6)strings /etc/lvmtab
7)mkboot /dev/rdsk/c2t#d0
8)
mkboot -a "hpux -lq (;0) /stand/vmunix" /dev/rdsk/c2t#d0
9)vgcfgrestore -n /dev/vg00 /dev/rdsk/c2t10d0
10)vgsync /dev/vg00
11)lvlnboot -r /dev/vg00/lvol1
12)lvlnboot -s /dev/vg00/lvol2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-20-2004 01:29 PM
тАО01-20-2004 01:29 PM
Re: Replace root mirror disk,are these steps all right?
>1)first replace the bad disk online with >hot pulling and pluging action.
Before pulling out the "bad" disk, make sure it's dead and no IO could be going to it. Easy way is to test with dd, or diskinfo. On a completely dead disk, diskinfo would show the size as 0 bytes.
>2)ioscan -fnCdisk
>3)mv /etc/lvmtab /etc/lvmtab.bak
>4)pvcreate /dev/rdsk/c2t#d0
>5)cp /etc/lvmtab.bak /etc/lvmtab
>6)strings /etc/lvmtab
Not sure why you'd need to do all of this. after replacing it I'd probably take a look at ioscan to confirm we see the new disk. but moving the lvmtab and a pvcreate aren't making any sense.
>7)mkboot /dev/rdsk/c2t#d0
>8) mkboot -a "hpux -lq(;0) /stand/vmunix" /dev/rdsk/c2t#d0
Fine, if this was a bootable mirror for root vg.
>9)vgcfgrestore ->n /dev/vg00 /dev/rdsk/c2t10d0
>10)vgsync /dev/vg00
>11)lvlnboot -r /dev/vg00/lvol1
>12)lvlnboot -s /dev/vg00/lvol2
This is ok, after the disk is replaced you don't need to pvcreate it. Simply vgcfgrestore to put the lvm data back on the disk, then vgchange -a y, then you could check run vgsync if mirror shows stale extents.
The only thing that would worry me is pulling out a live disk that could possibly have IO. If the disk was not completely dead, you'd reduce the mirrors then replace disk.
There's also a good doc on the itrc re: lvm process for replacing failed lvm disk. I'm too lazy to look up the doc right now :) but search for "replace failed lvm mirror" and you should see come across it.
Hope this helps,
-denver
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-20-2004 01:38 PM
тАО01-20-2004 01:38 PM
Re: Replace root mirror disk,are these steps all right?
http://www2.itrc.hp.com/service/cki/search.do?category=c0&docType=Security&docType=Patch&docType=EngineerNotes&docType=BugReports&docType=Hardware&docType=ReferenceMaterials&docType=ThirdParty&searchString=KBAN00000347&search.y=3&search.x=21&mode=id&admit=-1335382922+1074652549821+28353475&searchCrit=allwords
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-20-2004 04:46 PM
тАО01-20-2004 04:46 PM
Re: Replace root mirror disk,are these steps all right?
You should not need it, but its good to have.
pvcreate -B /dev/rdsk/c1t0d0 #use real disk
mkboot -l /dev/rdsk/c1t0d0
mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/c1t0d0 # use real disk
# mkboot -b /usr/sbin/diag/lif/updatediaglif -p ISL -p AUTO -p HPUX -p PAD -p LABEL /dev/rdsk/c?t?d?
If you are running 64-bit OS:
# mkboot -b /usr/sbin/diag/lif/updatediaglif2 -p ISL -p AUTO -p HPUX -p PAD -p LABEL /dev/rdsk/c?t?d?
vgextend /dev/vg00 /dev/dsk/c1t0d0 # same thing
lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c1t0d0
# real disk. repeat for other lvols
lvlnboot -r /dev/vg00/lvol3 # root fs /
lvlnboot -s /dev/vg00/lvol2 #swap
lvlnboot -d /dev/vg00/lvol2 #swap/dump
lvlnboot -b /dev/vg00/lvol1
lvlnboot -R
lvlnboot -v
setboot
setboot -a 52.1.0 # second disk
Thanks to all that made this doc right.
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
тАО01-21-2004 11:28 AM
тАО01-21-2004 11:28 AM
Re: Replace root mirror disk,are these steps all right?
Note this should be set for BOTH the primary and secondary disk.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-21-2004 04:01 PM
тАО01-21-2004 04:01 PM
Re: Replace root mirror disk,are these steps all right?
YOu got the mirroring steps. Make sure you follow those links/steps to mirror your disks correctly. Do not reboot your system until "lvlnboot" is fixed correctly.
lvlnboot -r /dev/vg00/lvol1 is a blunder unless you really made your root logical volume as lvol1. Usually it is stand and he should be giving 'lvlnboot -b /dev/vg00/lvol1', 'lvlnboot -s /dev/vg00/lvol2', 'lvlnboot -r /dev/vg00/lvol3' and 'lvlnboot -d /dev/vg00/lvol2'.
You didn't have to move lvmtab file.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-21-2004 06:17 PM
тАО01-21-2004 06:17 PM
Re: Replace root mirror disk,are these steps all right?
Sending this to you and I hope it will also be of some use. It contains other stuff which might also be of use. Unfortunately not to me any more as our company scraped all unix systems and moved to NT and VMS !!
Please dont take it as bible...I am only human !!
kyris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-22-2004 01:17 AM
тАО01-22-2004 01:17 AM
Re: Replace root mirror disk,are these steps all right?
Hot-plug does not necessarily equate with hot-swap. Hot-plug means that the hardware device can support removal and insertion of the device with out having to remove power from that device, in this case a disk and it's enclosure. Hot-swap refers more to the OS's ability to support device removal and insertion of a device while I/Os are still active. HP's LVM does not support this hot swap capability and was never designed with this capability in mind.
If you are going to attempt to hot-plug a disk, then you must make sure that all I/Os to the lvols on that disk have stopped. There are three ways to do that, none of which were the method your engineer used:
1) Shutdown the system and relpace the disk.
or
2) Unmount all filesystems that are contained in the lvols on the affected disk. Also stop any application that is using the lvols in RAW mode, i.e. Database.
or
3) lvreduce the failed disk's mirrors and then vgreduce the failed disk from the VG. Depending upon the version of the OS and how the disk has failed, this may or may not be possible.
I have successfully used all three of the mthods above. I also have tried testing replacing a disk with the method that you used, and I was able to introduce corruption in my mirrored filesystems.
Thinking that you can replace LVM mirrored disk while the filesystems are mounted and the failed disk is still active in the volume group seems to be a common misperception. I have run into several people have tried to do this and ended up with corrpted filesystems.
JL
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-22-2004 02:30 AM
тАО01-22-2004 02:30 AM
Re: Replace root mirror disk,are these steps all right?
1) Do a series of lvdisplay -v commands for each lvol on the physical disk and make sure that all the extents on the remaining "good" drive are current. (I actually have a script for this --- checkextents.sh)
2) "Yank" the bad or flakey drive out. Pull it out just 2 cm or so and leave it resting in the slot. This lets the drive spin down gradually and who knows you might need it again.
3) Wait 30 seconds or so and then run checkextents.sh agian making sure that the remaining drive has all "current" extents.
4) Now remove the bad drive completely from the slot and insert the replacement drive. Allow it to spin up. Think happy thoughts.
Let's assume the replacement drive is c0t6d0:
5) vgcfgrestore -n /dev/vg00 /dev/rdsk/c0t6d0
6) vgchange -a y /dev/vg00
7) mkboot /dev/rdsk/c0t6d0
8) mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/c0t6d0
9) lvlnboot -R
10) vgsync /dev/vg00 --- this could take a few tens on minutes
11) Do lvdisplays to make certain that all extents are current.
I have yet to have the above procedure fail but maybe I've just been lucky.