Operating System - HP-UX
1846839 Members
7404 Online
110256 Solutions
New Discussion

lvtmtab is out date .....

 
SOLVED
Go to solution
AnSi53
Advisor

lvtmtab is out date .....

Hi,
after root-mirror-crash, a new disk was plugged in, but the problem ist now, how to recreate the mirror.
vgfcgbackup: /etc/lvmtab is out date with the running kernel: Kernel indicates 2 disks for /dev/vg00; etc/lvmtab has 1 disk.
So far, so good. How can I tell the kernel to switch to 1 ?? grrrrrrrrrr
Andy
14 REPLIES 14
rariasn
Honored Contributor

Re: lvtmtab is out date .....

AnSi53
Advisor

Re: lvtmtab is out date .....

Yes, I know that, but:
Following Physical Volumes ...
Unable to match these Physical Volumes to...
Use the vgimport command to complete
/dev/dsk/c0t5d0 ....
No no no.
The device is NOT in lvmtab, but in /etc/lvmconf/vg00.conf

rgs
Andy
Geoff Wild
Honored Contributor

Re: lvtmtab is out date .....

Try:

mv /etc/lvmtab /etc/lvmtab.bad

vgscan

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
AnSi53
Advisor

Re: lvtmtab is out date .....

Comeone guys,
standard-procedure does NOT work.
Any better ideas??
Andy
rariasn
Honored Contributor

Re: lvtmtab is out date .....

Hi AnSi53,

vgcfgrestore -n vg00 /dev/dsk/cxtydz

cxtydz of the disk replaced.

vgchange -a y vg00


rgs,

rariasn
Honored Contributor

Re: lvtmtab is out date .....

sorry,

vgcfgrestore .... /dev/rdsk/cxtydz (raw disk)

rgs,

ran
IT_2007
Honored Contributor
Solution

Re: lvtmtab is out date .....

yes. Common procedure doesn't work until you remove ghost disk from kernel. I did once. don't remember exact sequence but try this way.

first remove mirror for all logical volumes for ghost disk using lvreduce with "-k" option.

then vgreduce -f /dev/vg00

now /etc/lvmconf/vg00.conf file doesn't have any ghost disks.

do normal procedure to mirror.
Geoff Wild
Honored Contributor

Re: lvtmtab is out date .....

To re-create the mirror, Either try the vgcfgrestore command or do it from scratch..

Example - assuming c2t6d0 failed:

vgcfgrestore -n /dev/vg00 /dev/rdsk/c2t6d0

mkboot /dev/rdsk/c2t6d0

mkboot -a "hpux -lq (;0) /stand/vmunix" /dev/rdsk/c2t6d0

vgchange -a y /dev/vg00

lvlnboot -Rv /dev/vg00

vgsync /dev/vg00



Scratch:

Say /dev/dsk/c0t6d0 is the root disk and /dev/dsk/c3t6d0 is the disk you want to make a mirror of.

1. Create a bootable LVM disk to be used for the mirror.
pvcreate -B /dev/rdsk/c3t6d0
2. Add this disk to the current root volume group.
vgextend /dev/vg00 /dev/dsk/c3t6d0
3. Make the new disk a boot disk.
mkboot -l /dev/rdsk/c3t6d0
4. Copy the correct AUTO file into the new LIF area.
mkboot -a "hpux -lq (;0)/vmunix" /dev/rdsk/c3t6d0
5. Mirror the boot, root and primary swap logical volumes to the new
bootable disk. Ensure that all devices in vg00, such as /usr, /swap,
etc., are mirrored.
The following is an example of mirroring the boot logical volume:
lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c3t6d0
The following is an example of mirroring the primary swap logical
volume:
lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c3t6d0
The following is an example of mirroring the root logical volume:
lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c3t6d0
6. Update the boot information contained in the BDRA for the mirror
copies of boot, primary swap and root.
/usr/sbin/lvlnboot -b /dev/vg00/lvol1
/usr/sbin/lvlnboot -s /dev/vg00/lvol2
/usr/sbin/lvlnboot -r /dev/vg00/lvol3
7. Check if the BDRA is correct.
/usr/sbin/lvlnboot -R /dev/vg00
8. Verify that the mirrors were properly created.
lvlnboot -v /dev/vg00
The output of this command is shown in a display like the following:
Boot Definitions for Volume Group /dev/vg00:
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
/dev/dsk/c0t6d0 (1/0/0/3/0.6.0) -- Boot Disk
/dev/dsk/c3t6d0 (1/0/1/0/0/1/1.6.0) -- Boot Disk
Boot: lvol1 on: /dev/dsk/c0t6d0
/dev/dsk/c3t6d0
Root: lvol3 on: /dev/dsk/c0t6d0
/dev/dsk/c3t6d0
Swap: lvol2 on: /dev/dsk/c0t6d0
/dev/dsk/c3t6d0
Dump: lvol2 on: /dev/dsk/c0t6d0, 0

vgdisplay -v vg00

Then lvextend for all other lvols:

lvextend -m 1 /dev/vg00/lvol4 /dev/dsk/c3t6d0
lvextend -m 1 /dev/vg00/lvol5 /dev/dsk/c3t6d0
lvextend -m 1 /dev/vg00/lvol6 /dev/dsk/c3t6d0
lvextend -m 1 /dev/vg00/lvol7 /dev/dsk/c3t6d0
lvextend -m 1 /dev/vg00/lvol8 /dev/dsk/c3t6d0
lvextend -m 1 /dev/vg00/lvol9 /dev/dsk/c3t6d0
lvextend -m 1 /dev/vg00/lvol10 /dev/dsk/c3t6d0
lvextend -m 1 /dev/vg00/lvol11 /dev/dsk/c3t6d0

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
AnSi53
Advisor

Re: lvtmtab is out date .....

Sorry, but:
vgcfgrestore -n /dev/vg00 /dev/rdsk/c0t5d0 say:
Couldn't query physical volume /dev/dsk/c0t5d0

But volume is inside and CLAIMED

I can extend vg00, but the counter is then in kernel 3, and in lvmtab 2 .......pfzrltfgzrt
grrrrrrrr
Andy
rariasn
Honored Contributor

Re: lvtmtab is out date .....

# ioscan -fnC disk

rgs
AnSi53
Advisor

Re: lvtmtab is out date .....

Thanks a lot all...

the lvreduce with option -k works.
The ghost is gone!

Happy weekend .... puhhhhh
Andy
AnSi53
Advisor

Re: lvtmtab is out date .....

--- :-))
florin_10
Frequent Advisor

Re: lvtmtab is out date .....

Hi

Your feedback shows 0 out of 7 responses.
If you think that anyone helped you resolving the issue, you can assign points, then close the thread.
By assigning points you show your gratitude and appreaciation towards people's willigness in trying to help you out.

Regards,
flg
AnSi53
Advisor

Re: lvtmtab is out date .....

I gave 10 to IT_2007, cause he had the best idea .....
Rgs
AnSi53