LVM and VxVM

Invalid LVMREC on Physical Volume

 
SOLVED
Go to solution

Invalid LVMREC on Physical Volume

I got this while running this command.
#vgcfgbackup -f /etc/lvmconf/vg01.conf /dev/vg01
vgcfgbackup: Invalid LVMREC on Physical Volume /dev/rdsk/c3t0d0

Please tell me how to rectify this?

History Befor this:
I have 2 N-Class m/c's both are same configuration. On one m/c physical volume group vg01 and vg01.conf were correpted.

So i copyed vg01.conf from other m/c and trying to recreate the physical volume gruop vg01. follwed below steps.

After copying vg01.conf to corrupted m/c
#vgcfgrestore -R -n /dev/vg01 /dev/rdsk/c3t0d0
it was fine. then i given above command.

So my questions
1) Can we copy vg01.conf from some other m/c and , with this can we restore the physical volume group , is it a right way?
2) What actually vg01.conf will contain?
3)I checked both m/c's vg01.conf all the contents are same except "LVMREC lines " these are like "LVMREC01%" in one m/c and "LVMREC01c" in other m/c. Can i chage this values manually, two make both .conf files same?
11 REPLIES 11
Robert-Jan Goossens_1
Honored Contributor

Re: Invalid LVMREC on Physical Volume

vgcfgbackup: Invalid LVMREC on Physical Volume /dev/rdsk/c3t0d0

There is a different LVM information on this device/disk, did you pvcreate -f the disk before you used the vgcfgrestore ?

pvcreate -f will delete all lvm information on the disk !!!!!

Regards,
Robert-Jan

Re: Invalid LVMREC on Physical Volume

Hi Robert-jon,
I did
#pvcreate -f /dev/rdsk/c3t0d0
physical volume "/dev/rdsk/c3t0d0" has been successfully created.

After this i did
#vgscan -av
output contains below lines:
Physical Volume "/dev/dsk/c3tod0" is not part of a Volume Group.
and
The Volume Group /dev/vg01 was not matched with any Physical Volumes.

then i did
#vgcfgrestore -R -n /dev/vg01 /dev/rdsk/c3t0d0
vgcfgrestore: Volume group "/dev/vg01" does not existin the "/etc/lvmtab" file.
Volume Group configuration has been restored ot /dev/rdsk/c3t0d0.

So vg01 is not creating in the /etc/lvmtab
what i have to do now?

I removed lvmtab and i run this got out put
#vgimport -v /dev/vg01 /dev/dsk/c3t0d0
Creating "/etc/lvmtab"
Begining the import process on Volume Group "/dev/vg01"
Volume group "/dev/vg01" is still active

but lvmtab file was not created?
Robert-Jan Goossens_1
Honored Contributor

Re: Invalid LVMREC on Physical Volume

# vgdisplay -v vg01

# ll /dev/*/group

could you post the output of above commands ?

Re: Invalid LVMREC on Physical Volume

#vgdisplay -v /dev/vg01
Information in "/etc/lvmtab" differs from that in "/etc/lvmpvg".
VG "/dev/vg01" is not defined in file "/etc/lvmtab".
vgdisplay: Volume group "/dev/vg01" does not exist in the "/etc/lvmtab" file.
vgdisplay: Cannot display volume group "/dev/vg01".

and

#ll /dev/*/group
crw-r----- 1 root sys 64 0x000000 Feb 21 10:15 /dev/vg00/group
crw-rw-rw- 1 root sys 64 0x010000 Feb 21 11:11 /dev/vg01/group
crw-rw-rw- 1 root sys 64 0x020000 Feb 21 11:11 /dev/vg02/group
shankar_3
Advisor

Re: Invalid LVMREC on Physical Volume

Hi Sreekanth,

Did you renamed the /etc/lvmtab file before running the vgsacn.

then vgscan will recover all vgs from scratch.

With Cheers,

Shankar

Re: Invalid LVMREC on Physical Volume

hi sankar,
I already giveen in last mail, i removed existing /etc/lvmtab then tried vgscan , it was creating /etc/lvmtab but ,it is not showing vg01, see the output below.

#\rm /etc/lvmtab
#vgscan -av
Creating "/etc/lvmtab".
Couldn't stat physical volume "/dev/dsk/c0t1d0":
Invalid argument


/dev/vg00
/dev/dsk/c1t6d0
/dev/dsk/c2t6d0


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/c3t0d0
/dev/dsk/c3t1d0
/dev/dsk/c3t5d0
/dev/dsk/c3t6d0
/dev/dsk/c4t0d0
/dev/dsk/c4t1d0
/dev/dsk/c4t5d0
/dev/dsk/c4t6d0


/dev/vg02
/dev/dsk/c3t2d0
/dev/dsk/c3t3d0
/dev/dsk/c3t7d0
/dev/dsk/c3t8d0
/dev/dsk/c4t2d0
/dev/dsk/c4t3d0
/dev/dsk/c4t7d0
/dev/dsk/c4t8d0


The Volume Group /dev/vg01 was not matched with any Physical Volumes.
Scan of Physical Volumes Complete.
*** LVMTAB has been created successfully.
*** If PV links are configured in the system.
*** Do the following to resync information on disk.
*** #1. vgchange -a y
*** #2. lvlnboot -R

#strings lvmtab
/dev/vg00
/dev/dsk/c1t6d0
/dev/dsk/c2t6d0
/dev/vg02
/dev/dsk/c3t2d0
/dev/dsk/c3t3d0
/dev/dsk/c3t7d0
/dev/dsk/c3t8d0
/dev/dsk/c4t2d0
/dev/dsk/c4t3d0
/dev/dsk/c4t7d0
/dev/dsk/c4t8d0

--sreekanth

Geoff Wild
Honored Contributor
Solution

Re: Invalid LVMREC on Physical Volume

You will have to re-create vg01

Try

vgexport vg01

If that doesn't work, then just rm -rf /dev/vg01

Then:

mkdir vg01
mknod /dev/vg01/group c 64 0x010000

On other m/c - create a map file:

vgexport -v -s -p -m /tmp/vg01.map

ftp that file to this m/c

then,

vgimport -v -s -m /tmp/vg01.map /dev/vg01

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.

Re: Invalid LVMREC on Physical Volume

hi geoff,
Your Answer solved my problem. Thnak a lot.

But,Small Doubt:
I didn't remove /dev/vg01 and didn't do
mkdir vg01
mknod /dev/vg01/group c 64 0x010000

I did:-
vgexport, vgimport and then "vgchange -a y vg01"

Small Doubt: Now vg01 resotred with the data, what it was contained earler? How is it possible , how the earlier data is prasent after all this procedure (did pvcreate,vgexport and vgimport ) ?

Please clarify my doubt..?
Geoff Wild
Honored Contributor

Re: Invalid LVMREC on Physical Volume

Well - the vgexport would have failed with "vg01 not in /etc/lvmtab"...

So, that's why the vgimport worked.

pvcreate - maybe you pvcreated the wrong disk? Is c3t0d0 in /etc/lvmtab?

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.