Operating System - HP-UX
1833875 Members
1832 Online
110063 Solutions
New Discussion

incorrect VG entry in the /etc/lvmtab file

 
GNOM
Frequent Advisor

incorrect VG entry in the /etc/lvmtab file

Hi !

There is an strange VG in my /etc/lmvtab file named /dev/
I don't now how this this volume Group has been added! I unsuccessfull tried to delete it
Then vgdisplay -v returs the following message :vgdisplay:
Volume group "/dev" does not exist in the "/etc/lvmtab" file.
vgdisplay: Cannot display volume group "/dev/".

Here are output of some commands :
server2 / >strings /etc/lvmtab
/dev/vg00
/dev/dsk/c1t2d0
/dev/dsk/c2t2d0
/dev/
/dev/dsk/c1t2d0

server2 / >vgscan -v
vgscan: Couldn't access the list of physical volumes for volume group "/dev".
vgscan: The physical volume "/dev/dsk/c1t2d0" is already recorded in the "/etc/l
vmtab" file.
vgscan: The physical volume "/dev/dsk/c2t2d0" is already recorded in the "/etc/l
vmtab" file.
Couldn't stat physical volume "/dev/dsk/c0t1d0":
Invalid argument


/dev/
/dev/dsk/c1t2d0
/dev/dsk/c2t2d0


Following Physical Volumes belong to one Volume Group.
Unable to match these Physical Volumes to a Volume Group.
Use the vgimport command to complete the process.
/dev/dsk/c4t0d0
/dev/dsk/c5t1d0

Scan of Physical Volumes Complete.
/dev/dsk/c2t2d0

NB: SAM cannot detect the volume groupe /dev/

Please help me solving this problem
12 REPLIES 12
Massimo Bianchi
Honored Contributor

Re: incorrect VG entry in the /etc/lvmtab file

try removing the corrupted /etc/lvmtab.

mv /etc/lvmtab -> /etc/lvmtab.corrupted


then issue the

vgscan -v


BEFORE doing this, apart from a valid backup, check if you have any file under /dev/ with minor "64". I remember an old bug, where a cmcluster could create such a file in /dev/ corrupting all.


HTH,
Massimo

Patrick Wallek
Honored Contributor

Re: incorrect VG entry in the /etc/lvmtab file

What happens if you do:

# mv /etc/lvmtab /etc/lvmtab.bad
# vgscan -a
Bharat Katkar
Honored Contributor

Re: incorrect VG entry in the /etc/lvmtab file

Hi,
# mv /etv/lvmtab /etc/lvmtab.old
# vgscan -a

This should help.
Regards,
You need to know a lot to actually know how little you know
Steve Steel
Honored Contributor

Re: incorrect VG entry in the /etc/lvmtab file

HI

solution in

http://storage.ittoolbox.com/groups/groups.asp?v=HP-UX-L&i=433433

using vgreduce -f

should be ok


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
GNOM
Frequent Advisor

Re: incorrect VG entry in the /etc/lvmtab file

hi !

After moving the /etc/lvmtab file and exceute the #vgscan -a command

Only this /dev/ Volume Groupe is recored in the /etc/lvmtab file
Dietmar Konermann
Honored Contributor

Re: incorrect VG entry in the /etc/lvmtab file

Have you really double-checked Massimo's suggestion? Watch out for weird device special files with major 64 under /dev. Check especially for the existence of "/dev/slvmvg". If it's there, remove it, move away lvmtab again and re-run vgscan. (And finally install a recent LVM commanfs patch to get this fixed.)

Best regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)

Re: incorrect VG entry in the /etc/lvmtab file

i think it's a volume group with a name composed with special character.
Try to find the name of the vg with this script and to display its status

for i in $(ls /dev/*/group)
do
export VGNAME=$echo $i|awk -F/ '{ print "/"$2"/"$3 }')
vgdisplay $VGNAME
done

if you can see the skills of you vg it seems that my theory is okay then
replace vgdisplay by vgchange -a n

it desactivate all your vgs ( be carefull all the vgs)

if you have a normalisation for your vg name
replace the first line with a line like this

for i in $(ls /dev/*/group|grep -v VG)

VG is the normalised name you choose



The beaver

Re: incorrect VG entry in the /etc/lvmtab file

a better script :

for i in $(ls /dev/*/group|grep -v vg.*)
do
export VGNAME=$(echo $i| awk -F/ '{ print "/"$2"/"$3 }')
vgdisplay $VGNAME > ./vg_info.txt
vgchange -a n $VGNAME
rm -R $VGNAME
echo $VGNAME
done
The beaver
Dietmar Konermann
Honored Contributor

Re: incorrect VG entry in the /etc/lvmtab file

To be honest... it's pretty brave to post that destructive script here. It potentially removes VG directories of all VGs whose names don't start with "vg". Sorry, but this is a bad idea.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
Massimo Bianchi
Honored Contributor

Re: incorrect VG entry in the /etc/lvmtab file

try a simple check:

cd /dev
ls -b * | more

HTH,
Massimo

Re: incorrect VG entry in the /etc/lvmtab file

excuse me,
i explain in the post before to replace "vg" by a synonym of the normalized name of our vg.

excuse me i m not fluent english and i forgot to repeat the instructions of the previous post .

I also forgot to specify that you must do a vgexport before doing the rm ( if you want the potential vg.

if you only want to see the name of vg you can do

ls /dev/*/group
or
ls /dev/*/group | od -c

i m really sorry for the previous post

The beaver
GNOM
Frequent Advisor

Re: incorrect VG entry in the /etc/lvmtab file

Thanks Dietmar !

It's true , there is a file named slvmvg in /dev/ directory causing this problem ; I deleted it , delete the /etc/lvmtab
And execute the vgscan command , and that's OK now !!

Thanks their Dietmar for your help !!!!