Operating System - HP-UX
1846689 Members
2999 Online
110256 Solutions
New Discussion

Re: root mirror disk failure

 
SOLVED
Go to solution
Ionut Grigorescu_2
Super Advisor

root mirror disk failure

Hi,

I have had the mirror of the root disk with some PE in stale state in all lvol's on vg00. The disks are enclosed in a Jamaica, the system is a D320 running HPUX11.00.
I have received the new disk from HP and even the disks are hot-plugable I wanted a clean replacement.
When tried
#lvreduce -m 0 /dev/vg00/lvolx
First reeive the message that lvolx was succesfully reduced - than
Cannot lock "/etc/lvmconf/lvm_lock" still trying...

vgcfgbackup:Unable to read the physical volume:No such device or address
vgcfgbackup: Invalid LVMREC on Physical Volume device /dev/rdsk/c1t6d0 (i.e. the faulty disk)
Even with this errors the lvols are reduced but that take a very long time. I intend further to perform vgreduce than rebuild the mirroring. I don't know if I'm doing the right thing but I don't know if the guy who was before me administrator on this system has performed a vgcfgbackup.
Is that OK to make lvreduce -m 0 /dev/vg00/lvolx
and the vgreduce /dev/vg00 /dev/dsk/c1t6d0 or not
If it weren't for STRESS I'd have no energy at all
4 REPLIES 4
Thayanidhi
Honored Contributor

Re: root mirror disk failure

If you are not able to lvreduce/vgreduce the disk may be totally faulty and unreadable. The procedure you are trying in correct. In your case you may simply replace (be sure of unpluging defective disk) the disk and do vgcfgrestore on the PV. If you are getting the error cannot lock "/etc/lvmconf/lvm_lock" then it could be the system is trying to sync the bad disk.

In 11 when ever there was a change in the VG the configuration will be backed up automatically(unless specified not to do so), So possibly you may be having VG configuration backup. You can verify this with "strings /etc/lvmconf/vg00.conf" and check whether your PV is listed.

TT
Attitude (not aptitude) determines altitude.
Rajeev  Shukla
Honored Contributor
Solution

Re: root mirror disk failure

Thats right if it says cannot lock...means its still trying to sync the stale lvols.
The best way to replace a mirrored root disk is to remove that disk. If hotplugable remove it online or else stutdown and replace the disk on the same hardware address(ID) and then do a vgcfgrestore. Reactivate volume group with vgchange -a y /dev/vg00
this will start resync or else do
vgsync /dev/vg00


there is no need to do lvreduce etc..that will take long time and then u'll have to do pvcreate and remirror. So follow the above method which is fail proof.

Cheers
Rajeev
steven Burgess_2
Honored Contributor

Re: root mirror disk failure

Hi

Have you managed to reduce your mirror and PV ?

Here's an explanantion into the lvm_lock

DocId: KBRC00002639 Updated: 3/6/02 5:47:00 AM

PROBLEM
Cannot lock /etc/lvmconf//lvm_lock still trying.The error appears everytime some lvm command are issued. What is the cause and how to clear the error.

RESOLUTION
When the lvm commands run and need to access the lvmtab file there need to be a mechanism so that they do not update/access the file when it is being updated/accessed by other lvm commands. This is the purpose of the lvm_lock file. If you get the message 'Cannot lock "/etc/lvmconf//lvm_lock" still trying ... this indicates the system has attempted to lock the lvm_lock file 5 times using lockf() and failed since another command already has it locked. Every 10 attempts the command sleeps for 1 second before trying again. So, this message indicates another lvm command is running and has the lvm_lock file locked.

By deleting the lvm_lock file you could have one lvm command update or access the lvmtab file while another command is already doing this. This could cause the system to behave incorrectly or even corrupt the lvmtab file or worst case cause it to be lost completely.

Sometimes it might be necessary to delete the lvm_lock file to release the lvmtab file for lvm commands. If the process holding the lvm_lock can be killed gracefully it should remove the lock. A reboot may be needed afterward to free the lvmtab file. Afterward the lvm command should work fine.

HTH

Steve
take your time and think things through
Ionut Grigorescu_2
Super Advisor

Re: root mirror disk failure

Hi, I have already replaced the disk, rebuilded the mirror and rebooted from the mirror.
Everything is OK. Case closed.
If it weren't for STRESS I'd have no energy at all