cancel
Showing results for 
Search instead for 
Did you mean: 

Question on LVMTAB file

Mike_305
Super Advisor

Question on LVMTAB file

Hello All,

When I created the file system I am getting this strange character in LVMTAB file, last time I has this issue I re-created the file system and the character was gone. Any idea on what causes this.

Appreciate your help and thanks in advance for everyone’s help.

Thanks,

MP
If there is problem then don't think as problem, think as opportunity.
15 REPLIES
Viney Kumar
Regular Advisor

Re: Question on LVMTAB file

can u provide that character
Matti_Kurkela
Honored Contributor

Re: Question on LVMTAB file

The /etc/lvmtab file is not really a text file. It contains a mixture of text strings and binary data: this is why you normally use the "strings" command to view it.

The "strings" command is a generic tool for viewing the ASCII text strings inside binary files: it is not specially designed for /etc/lvmtab. Read "man strings" if you're interested.

If the binary data parts of the lvmtab file (e.g. Volume Group ID values) happen to contain sequences of bytes that look like printable ASCII character strings, the "strings" command will mindlessly display them too.

If you recreated your VG, the VGID was changed: by chance, the new VGID did not have any printable ASCII byte sequences, so the "strings" command won't display the extra characters any more.

In short, the extra characters are a harmless side effect of viewing the lvmtab file with a simple generic tool that is "good enough" for that purpose, as opposed to a perfect, custom-designed tool. Just ignore the extra characters.

MK
MK
cnb
Honored Contributor

Re: Question on LVMTAB file


As you can see there are quite a few strange chararcters if viewed incorrectly:

# strings /etc/lvmtab
/dev/vg00
/dev/dsk/c7t2d0
/dev/vg01
/dev/dsk/c3t1d0
/dev/vg02
/dev/dsk/c7t0d0
/dev/vg03
/dev/dsk/c3t3d0
# more /etc/lvmtab
^CM-h^D/dev/vg00
aM-GM-^_GH:^A/dev/dsk/c7t2d0
/dev/vg01
aM-GM-^_GHM-^GM-4M-D^A/dev/dsk/c3t1d0
/dev/vg02
aM-GM-^_GHM-X^GI^A/dev/dsk/c7t0d0
/dev/vg03
aM-GM-^_GHM-kM->c^A/dev/dsk/c3t3d0

HTH,
cnb
Honored Contributor

Re: Question on LVMTAB file

That s/b *characters* :-)
Dennis Handly
Acclaimed Contributor

Re: Question on LVMTAB file

The thing that I never understood was why I keep seeing strings(1) being used on /etc/lvmtab instead of the proper command
vgdisplay -v or vgdisplay -v | grep Name.

>MK: as opposed to a perfect, custom-designed tool

Isn't that vgdisplay(1m)?
Torsten.
Acclaimed Contributor

Re: Question on LVMTAB file

@Dennis:
Imagine this: you have a bad disk and the server is rebootet. vgdisplay will complain about a missing disk, but not show the status.
Or a VG cannot be activated - how to get an idea what disks belong to this vg?



MP:
Try

# strings -n 10 /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! thumb below!   
Torsten.
Acclaimed Contributor

Re: Question on LVMTAB file

see also

http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1183100

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! thumb below!   
Dennis Handly
Acclaimed Contributor

Re: Question on LVMTAB file

>Torsten: you have a bad disk ... how to get an idea what disks belong to this vg?

Add an option to vgdisplay to just format /etc/lvmtab?
Duncan Edmonstone
Honored Contributor

Re: Question on LVMTAB file

For 11iv3 (11.31) at least, there is an option to no longer use the "strings" command:

lvmadm -l

produces a similar output to "strings /etc/lvmtab", but won't contain unprintable chars and will also look at /etc/lvmtab_p for v2.0 and 2.1 volume groups.

HTH

Duncan

HTH

Duncan
Mike_305
Super Advisor

Re: Question on LVMTAB file

Hello,

Sorry about the late reply. But this is what I have in my file. I was worried about Im9K and Im9n.

/dev/uni-data
I9K
/dev/dsk/c8t7d4
/dev/dsk/c8t7d5
/dev/dsk/c8t7d6
/dev/uni-app
I9n
/dev/dsk/c10t7d7
/dev/dsk/c10t8d0

Thanks for your help in advance.



If there is problem then don't think as problem, think as opportunity.
Mike_305
Super Advisor

Re: Question on LVMTAB file

Hello,

I am using "strings" not "more"

THX - MP
If there is problem then don't think as problem, think as opportunity.
Duncan Edmonstone
Honored Contributor

Re: Question on LVMTAB file

As already indicated - they are nothing to worry about - they are merely bits of binary data that "looks like a string" to the strings command. Just ignore them.

HTH

Duncan

HTH

Duncan
James R. Ferguson
Acclaimed Contributor

Re: Question on LVMTAB file

Hi:

The manpages for 'strings' will offer you a bit more insight: "A string is any sequence of four or more printing characters ending with a newline or null character."

In fact, you can amuse yourself by doing:

# strings /etc/lvmtab
# strings -n 2 /etc/lvmtab

...and/or other values for '-n'.

Regards!

...JRF...
Mike_305
Super Advisor

Re: Question on LVMTAB file

Hello,

Thanks for the reply and that to everyone who contributed to my question. Enjoy the points.

Once again appreciate everyoneâ s help.

THX
If there is problem then don't think as problem, think as opportunity.
Mike_305
Super Advisor

Re: Question on LVMTAB file

Thanks for your help.
If there is problem then don't think as problem, think as opportunity.