- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Mirrored disk replacement - refresher
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
12-16-2010 08:49 AM
12-16-2010 08:49 AM
I havent done this in a while so i am a bit rusty. One of my HDDs crashed and it was replaced. Now this disk is in a HP DS2120 and mirrors to the secondary on a different HP DS2120.
The new disk is /dev/rdsk/c4t8d0 and the disk that i need to mirror data from is /dev/rdsk/c5t8d0.
Going through my notes i have a section named: "replacing Mirrored Disk" and says to do the following:
1.- Remove old disk and insert new disk
2.- Run "vgcfgrestore" to restore LVM config info to the new disk
3.- Run "vgchange -a y vg01" to reactivate the volume to which the disk belongs. No automatic sync occurs since the volume group is currently active.
4.- Run "vgsync /dev/vg01" to manually sync all the extents in the volume.
Now this vg01 is a clustered volume group (Service Guard) and it is where all our ERP data resides.
Reading the man page for vgcfgrestore it says that the restore cannot be done when the volume is activate in shared mode. So i assume that before i can do the restore to /dev/dsk/c4t8d0 i need to deactivate vg01 once done i reactive vg01 and run vgsync, correct??
Now, will the data be offline while the sync occurs?
Also, on the man page says:
vgcfgrestore cannot be performed on devices attached to activated
volume groups. Prior to restoring a backup configuration to a disk,
detach the PV from the volume group using the pvchange(1M) command, or
deactivate the volume group using the vgchange(1M) command.
So since it is a new disk and it hasnt been attached to any VG, could i simply run vgcfgrestore without deactivating the entire VG? Once done i would simply add the disk to the VG and finally run vgsync, correct??
I am just really rusty and havent done this in a while.
Please advise.
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2010 09:17 AM
12-16-2010 09:17 AM
Re: Mirrored disk replacement - refresher
Refer http://bizsupport2.austin.hp.com/bc/docs/support/SupportManual/c01911837/c01911837.pdf
Page 29
else go with lvreduce,vgreduce,pvcreate,vgextend and finally lvextend
Rgds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2010 09:50 AM
12-16-2010 09:50 AM
Re: Mirrored disk replacement - refresher
I didnt halt LVM access to the disk prior to removing it. Node 1 cannot see the new disk and Node 2 can see the new disk:
Node 1:
Class I H/W Path Driver S/W State H/W Type Description
=========================================================================
disk 0 0/0/2/0.0.0.0 sdisk CLAIMED DEVICE TEAC DV-28E-N
/dev/dsk/c0t0d0 /dev/rdsk/c0t0d0
disk 1 0/1/1/0.0.0 sdisk CLAIMED DEVICE HP 73.4GST373454LC
/dev/dsk/c2t0d0 /dev/rdsk/c2t0d0
disk 3 0/1/1/1.2.0 sdisk CLAIMED DEVICE HP 73.4GST373454LC
/dev/dsk/c3t2d0 /dev/rdsk/c3t2d0
disk 5 0/3/1/1.8.0 sdisk CLAIMED DEVICE HP 73.4GMAT3073NC
/dev/dsk/c5t8d0 /dev/rdsk/c5t8d0
Node 2:
Class I H/W Path Driver S/W State H/W Type Description
=========================================================================
disk 0 0/0/2/0.0.0.0 sdisk CLAIMED DEVICE TEAC DV-28E-N
/dev/dsk/c0t0d0 /dev/rdsk/c0t0d0
disk 1 0/1/1/0.0.0 sdisk CLAIMED DEVICE HP 73.4GST373454LC
/dev/dsk/c2t0d0 /dev/rdsk/c2t0d0
disk 5 0/1/1/1.2.0 sdisk CLAIMED DEVICE HP 73.4GST373454LC
/dev/dsk/c3t2d0 /dev/rdsk/c3t2d0
disk 4 0/3/1/0.8.0 sdisk CLAIMED DEVICE HP 73.4GST373207LC
/dev/dsk/c4t8d0 /dev/rdsk/c4t8d0
disk 3 0/3/1/1.8.0 sdisk CLAIMED DEVICE HP 73.4GMAT3073NC
/dev/dsk/c5t8d0 /dev/rdsk/c5t8d0
The VG is not shared, so it is only active on Node 1.
What can i do for Node 1 to see the disk?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2010 10:00 AM
12-16-2010 10:00 AM
Re: Mirrored disk replacement - refresher
ioscan
insf -eCdisk in First Node
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2010 10:41 AM
12-16-2010 10:41 AM
Re: Mirrored disk replacement - refresher
# ioscan -fnC disk
Class I H/W Path Driver S/W State H/W Type Description
=========================================================================
disk 0 0/0/2/0.0.0.0 sdisk CLAIMED DEVICE TEAC DV-28E-N
/dev/dsk/c0t0d0 /dev/rdsk/c0t0d0
disk 1 0/1/1/0.0.0 sdisk CLAIMED DEVICE HP 73.4GST373454LC
/dev/dsk/c2t0d0 /dev/rdsk/c2t0d0
disk 3 0/1/1/1.2.0 sdisk CLAIMED DEVICE HP 73.4GST373454LC
/dev/dsk/c3t2d0 /dev/rdsk/c3t2d0
disk 5 0/3/1/1.8.0 sdisk CLAIMED DEVICE HP 73.4GMAT3073NC
/dev/dsk/c5t8d0 /dev/rdsk/c5t8d0
[root@unix-1]/roi.backup/roi.12132010
# insf -veC disk
insf: Installing special files for sdisk instance 0 address 0/0/2/0.0.0.0
insf: Installing special files for sdisk instance 1 address 0/1/1/0.0.0
insf: Installing special files for sdisk instance 3 address 0/1/1/1.2.0
insf: Installing special files for sdisk instance 5 address 0/3/1/1.8.0
[root@unix-1]/roi.backup/roi.12132010
# ioscan -fnC disk
Class I H/W Path Driver S/W State H/W Type Description
=========================================================================
disk 0 0/0/2/0.0.0.0 sdisk CLAIMED DEVICE TEAC DV-28E-N
/dev/dsk/c0t0d0 /dev/rdsk/c0t0d0
disk 1 0/1/1/0.0.0 sdisk CLAIMED DEVICE HP 73.4GST373454LC
/dev/dsk/c2t0d0 /dev/rdsk/c2t0d0
disk 3 0/1/1/1.2.0 sdisk CLAIMED DEVICE HP 73.4GST373454LC
/dev/dsk/c3t2d0 /dev/rdsk/c3t2d0
disk 5 0/3/1/1.8.0 sdisk CLAIMED DEVICE HP 73.4GMAT3073NC
/dev/dsk/c5t8d0 /dev/rdsk/c5t8d0
Everytime i do vgdisplay it complaints about the disk, so i know i have a ghost disk. Could this be the reason or should i just ensure that ioscan shows the disk before fixing the ghost disk??
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2010 01:34 PM
12-16-2010 01:34 PM
Re: Mirrored disk replacement - refresher
# vgreduce -f /dev/vg01
vgreduce: Couldn't query physical volume "/dev/dsk/c4t8d0":
The specified path does not correspond to physical volume attached to
this volume group
Not all extents are free. i.e. Out of 17499 PEs, only 17474 are free.
You must free all PEs using lvreduce/lvremove before the PV can be removed.
Example: lvreduce -A n -m 0 /dev/vg01/lvol1.
lvremove -A n /dev/vg01/lvol1
Here's the map of used PEs
--- Logical extents ---
LE LV PE Status 1
0000 lvol5 8525 ???
0001 lvol5 8526 ???
0002 lvol5 8527 ???
I tried to:
# lvdisplay -v -k /dev/vg01/lvol5 | pg
lvdisplay: "/dev/vg01/lvol5": No such file or directory
# lvreduce -m 0 -A n -k /dev/vg01/lvol5 0
lvreduce: "/dev/vg01/lvol5": No such file or directory
vgdiplay -v vg01 only shows 4 LVs...
# mount | grep vg01
/roi on /dev/vg01/lvol1 log,nodatainlog on Tue Dec 14 12:36:42 2010
/usr/ud60 on /dev/vg01/lvol2 log,nodatainlog on Tue Dec 14 12:36:42 2010
/usr/redback on /dev/vg01/lvol3 log,nodatainlog on Tue Dec 14 12:36:42 2010
/roi/HST.TRAIN on /dev/vg01/lvol4 log,nodatainlog on Tue Dec 14 12:36:43 2010
Where is this LV coming from??
Any ideas? Force remove??
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2010 05:00 PM
12-16-2010 05:00 PM
Re: Mirrored disk replacement - refresher
So i got the disk to show up on node 1, but every time i try to do vgcfgrestore -n /dev/vg01 /dev/dsk/c4t8d0 i get a message about not being able to query the physical volume. However, after that it takes a few seconds and then says: "Volume Group cfg restored to disk"
I then try to do pvchange -a y /dev/dsk/c4t8d0 and it complaints about "-a" being an illegal option...
Any thoughts..?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2010 10:49 PM
12-16-2010 10:49 PM
Re: Mirrored disk replacement - refresher
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2010 10:53 PM
12-16-2010 10:53 PM
Re: Mirrored disk replacement - refresher
â ¢ For HP-UX 11i version 1, install patches PHKL_31216 and PHCO_30698 or their superseding patches.
â ¢ For HP-UX 11i version 2, install patches PHKL_32095 and PHCO_31709 or their superseding patches.
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2010 02:39 PM
12-17-2010 02:39 PM
Re: Mirrored disk replacement - refresher
I checked the LVs and no mirrors are present.
The VG is still active and cant take it off line till Sunday. I am gonna try to deactivate it and reactivate it and see if i can get the drive added to the VG.
/etc/lvmtab shows both disks under the vg01 entry.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2010 09:56 AM
12-18-2010 09:56 AM
Re: Mirrored disk replacement - refresher
How times have I heard that.
Do you mind answer a few quick questions?
What did the disks look like before the crash?
What do the disks look like now after the crash?
What does the system say the disks look like? - (Now and before)
What does the disk application say the disks look like? - (Now and before)
Without stating the obvious but can you remind me what versions of firmware, hardware, operating systems, applications, are we talking about exactly?
A quick pencile diagram of your two disk config, would be greatly appreciated. - (Now and before, as it is and as it should be.)
If you understand what I mean.
Firmware, Hardware, SAN, Operating system, Application or Database.
Its like looking for a needle, in a Gaint Hay stack.
Its fun when you find it.
Terry Giblin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2010 07:04 AM
12-20-2010 07:04 AM
Re: Mirrored disk replacement - refresher
Ok, before the crash both disks were shown as physical drives for VG01:
# vgdisplay -v vg01
--- Volume groups ---
VG Name /dev/vg01
VG Write Access read/write
VG Status available, exclusive
Max LV 255
Cur LV 5
Open LV 4
Max PV 16
Cur PV 2
Act PV 1
Max PE per PV 17501
VGDA 2
PE Size (Mbytes) 4
Total PE 17499
Alloc PE 9650
Free PE 7849
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0
--- Logical volumes ---
LV Name /dev/vg01/lvol1
LV Status available/syncd
LV Name /dev/vg01/lvol2
LV Status available/syncd
LV Name /dev/vg01/lvol3
LV Status available/syncd
LV Name /dev/vg01/lvol4
LV Status available/syncd
--- Physical volumes ---
PV Name /dev/dsk/c4t8d0
PV Status available
Total PE 17499
Free PE 7849
Autoswitch On
PV Name /dev/dsk/c5t8d0
PV Status available
Total PE 17499
Free PE 7849
Autoswitch On
After the crash the c4t8d0 disk was still listed, however, i physically removed the disk before i stopped LVM from writing to it. After reading some HP docs, i found out it is called ghost disk and followed their instruction on how to remove it, however, when the docs say to add it to the VG it fails. The after looks like:
# vgdisplay -v vg01
--- Volume groups ---
VG Name /dev/vg01
VG Write Access read/write
VG Status available, exclusive
Max LV 255
Cur LV 5
Open LV 4
Max PV 16
Cur PV 2
Act PV 1
Max PE per PV 17501
VGDA 2
PE Size (Mbytes) 4
Total PE 17499
Alloc PE 9650
Free PE 7849
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0
--- Logical volumes ---
LV Name /dev/vg01/lvol1
LV Status available/syncd
LV Name /dev/vg01/lvol2
LV Status available/syncd
LV Name /dev/vg01/lvol3
LV Status available/syncd
LV Name /dev/vg01/lvol4
LV Status available/syncd
--- Physical volumes ---
PV Name /dev/dsk/c5t8d0
PV Status available
Total PE 17499
Free PE 7849
Autoswitch On
The before and after is the same:
disk 4 0/3/1/0.8.0 sdisk CLAIMED DEVICE HP 73.4GST373207LC
/dev/dsk/c4t8d0 /dev/rdsk/c4t8d0
disk 3 0/3/1/1.8.0 sdisk CLAIMED DEVICE HP 73.4GMAT3073NC
/dev/dsk/c5t8d0 /dev/rdsk/c5t8d0
At the moment, the system sees the disk just like before the crash, with the only difference being that the replacement disk is not in VG01 anymore.
# pvdisplay /dev/dsk/c4t8d0
pvdisplay: Couldn't find the volume group to which
physical volume "/dev/dsk/c4t8d0" belongs.
pvdisplay: Cannot display physical volume "/dev/dsk/c4t8d0".
Then when i try to do vgcfgrestore -n /dev/vg01 /dev/dsk/c4t8d0 i get a message about not being able to query the physical volume. However, after that it takes a few seconds and then says: "Volume Group cfg restored to disk"
# uname -a
HP-UX unix-2 B.11.11 U 9000/800 1807302088 unlimited-user license
VG01 is a mirrored VG running under Service Guard.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2010 01:18 PM
12-20-2010 01:18 PM
Re: Mirrored disk replacement - refresher
Can you post lvdisplay output of one logical volume ?. I want to verify if it is really a mirror.
Regards,
Kaps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2010 01:27 PM
12-20-2010 01:27 PM
Re: Mirrored disk replacement - refresher
c4 is in DS2120 tray 1 and c5 is in DS2120 tray 2 they are both mirrored, they were mirrored.
# lvdisplay -v /dev/vg01/lvol1 | pg
--- Logical volumes ---
LV Name /dev/vg01/lvol1
VG Name /dev/vg01
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 25000
Current LE 6250
Allocated PE 6250
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation strict
IO Timeout (Seconds) default
--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c5t8d0 6250 6250
--- Logical extents ---
LE PV1 PE1 Status 1
00000 /dev/dsk/c5t8d0 00000 current
00001 /dev/dsk/c5t8d0 00001 current
00002 /dev/dsk/c5t8d0 00002 current
00003 /dev/dsk/c5t8d0 00003 current
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2010 01:27 PM
12-20-2010 01:27 PM
Re: Mirrored disk replacement - refresher
Post lvdisplay -v
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2010 01:30 PM
12-20-2010 01:30 PM
SolutionSo vgcfgrestore if not going to fix.
pvcreate /dev/rdsk/c4t8d0 # Prepare for LVM
vgextend
Now setup the mirrors
lvextend -m 1 /dev/
do it for all the LVs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2010 01:31 PM
12-20-2010 01:31 PM
Re: Mirrored disk replacement - refresher
Look at this
"Mirror copies 0 "
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2010 01:32 PM
12-20-2010 01:32 PM
Re: Mirrored disk replacement - refresher
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2010 01:35 PM
12-20-2010 01:35 PM
Re: Mirrored disk replacement - refresher
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2010 01:46 PM
12-20-2010 01:46 PM
Re: Mirrored disk replacement - refresher
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2010 07:27 PM
12-20-2010 07:27 PM
Re: Mirrored disk replacement - refresher
The problem is and from what you have described the you, the system and now everyone else is a little bit confused on the problem.
So can we start from first principles;
You said you tried to fix a ghost disk??
Can you tell me what that means and what exactly you did?
But to be honest, it sounds to me that the kernel has got out of step with LVM.
I would take one step back before doing anything else and refresh your special disk files.
strings /etc/lvmtab
lssf /dev/rdsk/c4t8d0
rmsf -H 0/3/1/0.8.0
rm /dev/dsk/c4t8d0
rm /dev/rdsk/c4t8d0
insf -e
Now we know the special device files are what they should be.
If you do the above commands at least we will have deleted all reference to the old disk and its special files and created new ones with the new disk info.
Now you should try to proceed as normal adding or deleting disks to the volume group.
Under extreme caution.
If this does not fix the problem, the next time the system is 'offline' and you can do some major maintance.
cp /etc/lvmtab to /etc/lvmtab.old
rm /etc/lvmtab
vgscan -av
It works for me everytime.
Terry Giblin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2010 08:13 AM
12-21-2010 08:13 AM
Re: Mirrored disk replacement - refresher
Thanks for all the great help. I have one more thing:
will removing the lvmtab and doing vgscan -av fix the issue i am now having:
# lvextend -m 1 /dev/vg01/lvol3 /dev/dsk/c4t8d0
The newly allocated mirrors are now being synchronized. This operation will
take some time. Please wait ....
Logical volume "/dev/vg01/lvol3" has been successfully extended.
vgcfgbackup: /etc/lvmtab is out of date with the running kernel:Kernel indicates 3 disks for "/dev/vg01"; /etc/lvmtab has 2 disks.
Cannot proceed with backup.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2010 11:00 AM
12-21-2010 11:00 AM
Re: Mirrored disk replacement - refresher
As I said,
"But to be honest, it sounds to me that the kernel has got out of step with LVM. "
"Under extreme caution.
If this does not fix the problem, the next time the system is 'offline' and you can do some major maintance.
cp /etc/lvmtab to /etc/lvmtab.old
rm /etc/lvmtab
vgscan -av
It works for me everytime.
Terry giblin"
Now lvm has been refreshed the only way I know how to refresh the kernel is with a reboot.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2010 05:00 PM
12-21-2010 05:00 PM
Re: Mirrored disk replacement - refresher
You ran
"vgscan -av
or
vgscan -v"?
"vgcfgbackup: /etc/lvmtab is out of date with the running kernel:Kernel indicates 3"
That's why everyone is confused?
"Some things you just have to do by looking."
Can you do me a big favour, can you go check how many cables are plugged in (connected) to each of your disk array's, please?
And add one more, for good luck.
Then run,
vgscan -v.
Problem solved for good and everyone is happy.
Terry Giblin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2010 06:48 PM
12-21-2010 06:48 PM
Re: Mirrored disk replacement - refresher
Until it happens again, no one ever knowns.
Also long as we have tried and did our best.
Terry Giblin