lvmtab includes some unidentified characters (179 Views)
Reply
Super Advisor
simon_164
Posts: 303
Registered: ‎12-10-2004
Message 1 of 10 (179 Views)

lvmtab includes some unidentified characters

my /etc/lvmtab has some unidentified characters, I have a vg00 which has one disk in it. whatever i do i still have the output of lvmtab:
/dev/vg00
DF%s
/dev/dsk/c2t1d0s2

if i try to delicatelly remove these characters using vi, it will be fine but after a vgscan i get that the lvmtab file is wrong and should be replaced.
the system came out of the box this way, how to fix this?
Please use plain text.
Frequent Advisor
Miguel Hernández
Posts: 47
Registered: ‎06-25-2006
Message 2 of 10 (179 Views)

Re: lvmtab includes some unidentified characters

lvmtab is not a text file. You can see it with strings:

sapap1:root> strings /etc/lvmtab
/dev/vg00
/dev/dsk/c0t6d0s2
/dev/dsk/c2t6d0s2
/dev/vg_EPC_D01
/dev/dsk/c13t0d1


Dont modify lvmtab!!!
Please use plain text.
Honored Contributor
spex
Posts: 1,367
Registered: ‎05-14-1996
Message 3 of 10 (179 Views)

Re: lvmtab includes some unidentified characters

simon,

DO NOT edit /etc/lvmtab with vi. You will corrupt the file. lvmtab is a BINARY file. Those unidentifiable characters are binary data.

To edit lvmtab, use lv/pv/vg commands, such as lvcreate, lvreduce, etc.

The proper way to view the contents of lvmtab is:

# strings /etc/lvmtab

PCS
Please use plain text.
Super Advisor
simon_164
Posts: 303
Registered: ‎12-10-2004
Message 4 of 10 (179 Views)

Re: lvmtab includes some unidentified characters

I was not clear enough, I am getting the unidentified characters from lvmtab using the strings command so:
strings /etc/lvmtab -->
/dev/vg00
DF%s
/dev/dsk/c2t1d0s2

what does the DF%s means, how to get rid of it.
Please use plain text.
Honored Contributor
spex
Posts: 1,367
Registered: ‎05-14-1996
Message 5 of 10 (179 Views)

Re: lvmtab includes some unidentified characters

simon,

# man strings

The 'strings' command returns what it believes to be printable, or ASCII, strings in a file. The junk you see is just 'strings' giving you a false positive. It is just making an educated guess, after all.

You can exclude this unwanted output by increasing the minimum string length like this (just make sure you're not excluding lines you do want):

# strings -n 8 /etc/lvmtab

or with grep:

# strings /etc/lvmtab | grep -v 'DF%s'

PCS

Please use plain text.
Acclaimed Contributor
James R. Ferguson
Posts: 21,184
Registered: ‎07-06-2000
Message 6 of 10 (179 Views)

Re: lvmtab includes some unidentified characters

Hi Simon:

As already stated, the '/etc/lvmtab' file is a binary file. The 'strings' command attempts to produce readable output by examining groups of four characters at a time.

In reality, the '/etc/lvmtab' contains not only the volume group names and their associated device files, but the LVM VGID (Volume Group ID) that uniquely identifies each volume group.

You file is *not* corrupt!

Regards!

...JRF...
Please use plain text.
Honored Contributor
Patrick Wallek
Posts: 13,752
Registered: ‎06-21-2000
Message 7 of 10 (179 Views)

Re: lvmtab includes some unidentified characters

That is ABSOLUTELY NORMAL for the /etc/lvmtab file. You DO NOT have a problem. Quit trying to fix a problem that doesn't exist.

Please use plain text.
Honored Contributor
Geoff Wild
Posts: 7,168
Registered: ‎06-04-2001
Message 8 of 10 (179 Views)

Re: lvmtab includes some unidentified characters

Nothing wrong with that - unless you did a vi and saved it.

If so:

mv /etc/lvmtab /etc/lvmtab.bad
vgscan

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.
Please use plain text.
Super Advisor
simon_164
Posts: 303
Registered: ‎12-10-2004
Message 9 of 10 (179 Views)

Re: lvmtab includes some unidentified characters

Thx a lot,
Ok, i will not touch it.
However i would have liked it to be without those character :).
Please use plain text.
Acclaimed Contributor
Torsten.
Posts: 23,253
Registered: ‎10-02-2001
Message 10 of 10 (179 Views)

Re: lvmtab includes some unidentified characters

Consider to accept the strings output or try

strings -n 6 /etc/lvmtab

Hope this helps!
Regards
Torsten.

__________________________________________________

There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________

No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! star in the left column!   
Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation