Operating System - HP-UX
1753519 Members
4852 Online
108795 Solutions
New Discussion юеВ

Re: 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 15
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?

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

I am an HPE Employee
Accept or Kudo