System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Corruption in /etc/lvmtab file

SOLVED
Go to solution
dictum9
Super Advisor

Corruption in /etc/lvmtab file


the system is 11.23 4640, connected to SAN.

I see the /etc/lvmtab file has these strange chars in it, possible to delete it and run vgscan -a?

where did the garbage chars come from?

#strings /etc/lvmtab


/dev/dsk/c15t0d6
/dev/dsk/c14t1d0
/dev/dsk/c14t1d6
/dev/vgP60Oracle
/dev/dsk/c14t1d1
/dev/vgJPPData
/dev/dsk/c14t1d3
/dev/vgJPPLogs
/dev/dsk/c14t1d4
/dev/vgJPPArch
/dev/dsk/c14t1d5
/dev/BCVvgp60logs
J~K{
/dev/dsk/c16t0d6
/dev/BCVvgp60arch
J~K}
/dev/dsk/c16t0d7
/dev/dsk/c16t2d0
/dev/dsk/c16t2d6
/dev/BCVvgp60data
J~K~
/dev/dsk/c16t0d1
/dev/dsk/c16t0d2
/dev/dsk/c16t0d3
/dev/dsk/c16t0d4
/dev/dsk/c16t0d5
/dev/dsk/c16t1d7
/dev/dsk/c16t2d7
/dev/dsk/c16t3d0

18 REPLIES
Duncan Edmonstone
Honored Contributor
Solution

Re: Corruption in /etc/lvmtab file

/etc/lvmtab isn't an ASCII file - if it was you wouldn't need to run the "strings" command on it. It's a binary file that happens to contain some ASCII sequences in it.

strings just looks for a sequence of 4 or more printable characters followed by a newline or null character - it's possible for that sort of sequence to pop up in the binary parts of the file as well - which is what you are seeing here. It does not mean you have a corrupt file - this is perfectly normal.

HTH

Duncan

HTH

Duncan
Michael Steele_2
Honored Contributor

Re: Corruption in /etc/lvmtab file

Hi

As Duncan pointed out those odd characters are perfectly normal. They are certainly apart of the lvm header but I've forgotten their exact purpose.

J~K{ for example, is normal.
Support Fatherhood - Stop Family Law
Mel Burslan
Honored Contributor

Re: Corruption in /etc/lvmtab file

yes you can delete it and run vgscan again but most probably you will end up with the some sort of a strange sequence of characters again. It is not the lvmtab's fault they are there. after all lvmtab is a binary file, hence the use of strings command. The strings command scans the file, /etc/lvmtab in this case, and tries to find printable sequences of 3 or 4 characters if I am not mistaken and prints them out. In your particular case, these J~K{ and similar sequences of characters happened to fall next to each other, causing strings program to print them out. It is simple and no need to worry
________________________________
UNIX because I majored in cryptology...
Lijeesh N G_1
Respected Contributor

Re: Corruption in /etc/lvmtab file

Hi,

It is normal, I think you no need to recreate it.

Regards,
LIJEESH N G
James R. Ferguson
Acclaimed Contributor

Re: Corruption in /etc/lvmtab file

Hi:

To add to the understanding you now already have, the '/etc/lvmtab' also contains the VGIDs for the various volume groups. This information is "packed" into a binary format and hence isn't readable by filters that assume ASCII encoding.

The file is intended to be maintained and manipulated only the standard LVM tools --- and that's one reason it is kept in a binary format.

Regards!

...JRF...
VK2COT
Honored Contributor

Re: Corruption in /etc/lvmtab file

Hello,

As a learning exercise, it is worth saying
that strings(1M) command is obsolete in
HP-UX 11i v3 as far as LVM is concerned.

a) There are actually two LVM files:

/etc/lvmtab (for LVM L1)
/etc/lvmtab_p (for LVM L2)

b) New command to check them in much nicer
way is:

# lvmadm -l

And yes, those extra characters in
/etc/lvmtab are normal (the others already
confired it for you).

Cheers,

VK2COT
VK2COT - Dusan Baljevic
Dennis Handly
Acclaimed Contributor

Re: Corruption in /etc/lvmtab file

>VK2COT: # lvmadm -l

My B.11.31.0803_LR lvmadm(1m) doesn't have that -l option.
James R. Ferguson
Acclaimed Contributor

Re: Corruption in /etc/lvmtab file

Hi:

>Dennis: My B.11.31.0803_LR lvmadm(1m) doesn't have that -l option.

I think VK2COT meant 'lvmadm -t' :

http://www.docs.hp.com/en/lvm-v2/L2_whitepaper_8.pdf

Regards!

...JRF...
Dennis Handly
Acclaimed Contributor

Re: Corruption in /etc/lvmtab file

>JRF: I think VK2COT meant 'lvmadm -t'

Of course I tried that too. Except -t just gives max numbers and no names.
(They've given you a number and taken away your name ... ;-)
VK2COT
Honored Contributor

Re: Corruption in /etc/lvmtab file

Hello,

lvmadm(1M) does have flag "-l". Depends on how old your version is.

a) Here is the result of "lvmadm -l":

--- Version 1.0 volume groups ---
VG Name /dev/vg00
PV Name /dev/disk/disk3_p2

VG Name /dev/vg02
PV Name /dev/disk/disk5

VG Name /dev/vgvm
PV Name /dev/disk/disk8

VG Name /dev/vgvm2
PV Name /dev/disk/disk17

VG Name /dev/vg01
PV Name /dev/disk/disk9

b) And here is the result of
"strings /etc/lvmtab":

/dev/vg00
/dev/disk/disk3_p2
/dev/vg02
/dev/disk/disk5
/dev/vgvm
/dev/disk/disk8
/dev/vgvm2
/dev/disk/disk17
/dev/vg01
/dev/disk/disk9

Cheers,

VK2COT
VK2COT - Dusan Baljevic
VK2COT
Honored Contributor

Re: Corruption in /etc/lvmtab file

You need newver version of patches for lvmadm(1M).

When I teach HP-UX courses, the labs in USA
have HP-UX 11.31 0803 and lvmadm flag "-l"
is missing.

On our HP Education servers in Australia we actually run HP-UX 11.31 0903 and flag "-l"
is there :)

VK2COT

VK2COT - Dusan Baljevic
melvyn burnard
Honored Contributor

Re: Corruption in /etc/lvmtab file

The -l option for lvmadm was added in the 0809 (Update 3) of HP-UX 11iv3
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Steven E. Protter
Exalted Contributor

Re: Corruption in /etc/lvmtab file

Shalom,

For the rest of us that don't have 11.31 hardware yet.

strings /etc/lvmtab

The funny characters are merely binary characters that form printable characters that the strings command picks up.

No biggie, don't do anything.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Patrick Wallek
Honored Contributor

Re: Corruption in /etc/lvmtab file

Yeah, Steven, I think that was said plenty of times in previous responses! I doubt that it needed to be said yet again!
James R. Ferguson
Acclaimed Contributor

Re: Corruption in /etc/lvmtab file

Hi:

>SEP: For the rest of us that don't have 11.31 hardware yet.

That would be 11.31 _SOFTWARE_ .

...JRF...
VK2COT
Honored Contributor

Re: Corruption in /etc/lvmtab file

Hello,

Would a kind person assign points to the
last group of responses if they are useful?

I am trying to earn the ITRC Royalty status
(I need 40-odd points to reach it). For
some odd reason many of my postings are
forgotten to be given any points :(

Cheers,

VK2COT
VK2COT - Dusan Baljevic
raka721
Occasional Visitor

Re: Corruption in /etc/lvmtab file

I have run vgscan -av command & it recreated /etc/lvmtab & contineously running coomand but still not generated /etc/lvmtab_p file ...please help

Matti_Kurkela
Honored Contributor

Re: Corruption in /etc/lvmtab file


raka721 wrote:

I have run vgscan -av command & it recreated /etc/lvmtab & contineously running coomand but still not generated /etc/lvmtab_p file ...please help


Only HP-UX 11.31 may have the /etc/lvmtab_p file. Older HP-UX versions will have /etc/lvmtab only.

Do you even have any LVM v2.x volume groups in the system? If you only have LVM v1.0 volume groups, the command might not have any reason to create the /etc/lvmtab_p file.

MK