Operating System - HP-UX
1748019 Members
4366 Online
108757 Solutions
New Discussion юеВ

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 18
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

I am an HPE Employee
Accept or Kudo
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 ... ;-)