Operating System - HP-UX
1755700 Members
3404 Online
108837 Solutions
New Discussion юеВ

/etc/lvmtab and kernel do not agree

 
Rick Garland
Honored Contributor

/etc/lvmtab and kernel do not agree

Hi all:

This is one I have not seen before.

Got a K420 with 10.20 HP-UX. In the /etc/lvmtab it shows 4 disks being used. In SAM it shows 6 disks being used. Try to do vgcfgbackup and I get the following message:
/etc/lvmtab is out of date with the running kernel; kernel indicates 6 disks for /dev/vg30; /etc/lvmtab has 4 disks
Not a major problem, haven't seen any issues because of it - yet. It does prevent the addition of addition logical volumes.

What could be the matter and how to fix?

Many thanks!
Rick
29 REPLIES 29
Patrick Wessel
Honored Contributor

Re: /etc/lvmtab and kernel do not agree

try to create a new lvmtab. It should contail all disks

# mv /etc/lvmtab /etc/lvmtab.old
# vgscan -v
There is no good troubleshooting with bad data
Jag_2
Occasional Advisor

Re: /etc/lvmtab and kernel do not agree

try to create a new lvmtab. It should contail all disks

# mv /etc/lvmtab /etc/lvmtab.old
# vgscan -v

After doing the above step's to verify the lvmconf file and lvmtab file contains same info.

strings /etc/lvmtab
vgcfgrestore -n /dev/vg30 -l



Rick Garland
Honored Contributor

Re: /etc/lvmtab and kernel do not agree

It all agreees but the same error shows up:
/etc/lvmtab out of date with the running kernel; kernel indicates 6 disks for /dev/vg30; /etc/lvmtab has 4

The vgscan only sees 4 disks. Doing the list of vgcfgrestore shows 4 disks as well.
Robert Gamble
Respected Contributor

Re: /etc/lvmtab and kernel do not agree

try using 'vgchange'. It reads in the VGRA from the disks, updates /etc/lvmtab, then updates the kernel memory info.

With no users on the system, try:
vgchange -a n vg01
vgchange -a y vg01
strings /etc/lvmtab
vgdisplay -v

They should now match.

Good Luck!
Patrick Wessel
Honored Contributor

Re: /etc/lvmtab and kernel do not agree

Rick,

Looks like we can't go the easy way?
If lvmtab and kernel disagree there is one important question: who is right? Do you how many disks are really part of the VG?
What does vgdisplay display for Cur PV and Act PV?
Use: vgcfgrestore -n /dev/VG_NAME -l to see the list of physical volumes contained within the last good backup.

Maybe the answer on this question get us closer to the cause of your problem
There is no good troubleshooting with bad data
Rick Garland
Honored Contributor

Re: /etc/lvmtab and kernel do not agree

There are four disks installed as part of the VG.
The vg.conf indicates the right number and the right devices.
strings /etc/lvmtab indicate the right number of disks with the correct devices.
vgcfgrestore -n /dev/vg30 -l indicates the right number of disks and the correct devices.

vgdisplay -v /dev/vg30 shows CUR PV = 6 with ACT PV = 4

There were 6. This was before my time at this job. Apparently, somebody just physically removed them with exporting or anything else. This is where I believe the original problem started.

I have checked out the /dev/vg30 directory and am able to match up all the lvols to the correct devices.
Patrick Wessel
Honored Contributor

Re: /etc/lvmtab and kernel do not agree

OK, this is a case for:
# vgreduce -f /dev/vg00

The manual page for vgreduce has a good explanation what it does to your VG...

good luck
There is no good troubleshooting with bad data
Patrick Wessel
Honored Contributor

Re: /etc/lvmtab and kernel do not agree

OK, this is a case for:

# vgreduce -f /dev/vg_name

The manual page for vgreduce has a good explanation what it does to your VG...

good luck
There is no good troubleshooting with bad data
James Lynch
Valued Contributor

Re: /etc/lvmtab and kernel do not agree

You should run vgreduce -f /dev/vg30. This will remove the 2 missing PV's(disks) from your volume group. See the man page for vgreduce for more info

Jim
Wild turkey surprise? I love wild turkey surprise!