Operating System - HP-UX
1833860 Members
2275 Online
110063 Solutions
New Discussion

Why does lvmtab have "DZ+%" ?

 
SOLVED
Go to solution
Jerry_109
Super Advisor

Why does lvmtab have "DZ+%" ?

HP-UX B.11.11 U 9000/800/rp4440
#################################

root[/etc]
# strings /etc/lvmtab
/dev/vg00
DZ+%
/dev/dsk/c2t0d0
/dev/dsk/c2t1d0
7 REPLIES 7
Sameer_Nirmal
Honored Contributor

Re: Why does lvmtab have "DZ+%" ?

Hi Jerry,

the "lvmtab" file is binary file. When you use "strings" command to see a binary file, it will show you ASCII strings encountered in the file.

In your case , the "strings" did find the
"DZ+%" ascii string and it is displayed besides the VG00 information.
Nothing to worry about that string.
Bill Hassell
Honored Contributor
Solution

Re: Why does lvmtab have "DZ+%" ?

lvmtab is a binary file so most of the file is nothing but gibberish if you cat the file. That's why the common way to look at the file is to use the strings command. Here is what the file looks like:

cat -v /etc/lvmtab

But buried in this binary file are strings of displayable ASCII characters which the strings command will find and display. The test for displayable characters is somewhat complex but since many of the binary codes look like displayable characters, you'll see a few meaningless strngs. lvmtab is decoded with the vgdisplay command but since it provides more details than needed, the strings command is often used as a shorcut. Only the device files and volume groups strings are valid.


Bill Hassell, sysadmin
Jerry_109
Super Advisor

Re: Why does lvmtab have "DZ+%" ?

It's just that sometimes I see this on some systems, and not on others ?
Bill Hassell
Honored Contributor

Re: Why does lvmtab have "DZ+%" ?

The characters are random and whether you see them depends on binary data concerning the volume groups, the VG ID numbers, the size of the disks and lvols, etc. So on some systems, a 32bit number representing the size of an lvol or the number of extents just happens to look like an ASCII string. There is no way for the strings command to tell where the numbers are and where the displayable strings are. Every system will be different, some will have several garbage character strings while other have none. Even two system with the same exact VG and lvol layout will be different due to VG serial numbers.


Bill Hassell, sysadmin
Jerry_109
Super Advisor

Re: Why does lvmtab have "DZ+%" ?

Yes, Bill I see what you mean. I even moved my lvmtab file to a different name, and ran vgscan -pv, then vgscan -v, and it created the same binary characters.

Thanks
Jerry Sims
CAS_2
Valued Contributor

Re: Why does lvmtab have "DZ+%" ?

I wrote down a script to get disk files and VG names. For removing wrong names I use '-n 6' option in order to show strings larger than or equal 6 chars.

As any volume group name starts with /dev/ 6 chars is the minimum length.
Ganesan R
Honored Contributor

Re: Why does lvmtab have "DZ+%" ?


Hi,

Since it is a binary file, strings command only looking for the ascii characters in that file and occassionaly strange character will appear. nothing to worry about that.

strings is not a command that suppose to tell all vg configuration, instead vgdisplay on individual vg will do.The strings command is just a way to "cheat" and see info on all the vg's at once. It depends how strings pulls ascii characters
out of unformated files and so if any strings of ascii characters exist other than the vg info then they will be displayed.


Best wishes,

Ganesh.