Operating System - HP-UX
1835832 Members
2495 Online
110085 Solutions
New Discussion

Re: junk characters in lvmtab!!

 
Sprint Unix Team
Frequent Advisor

junk characters in lvmtab!!

How do i get rid of the junk characters in the lvmtab file...
---------------------------------------------------------
#strings /etc/lvmtab
/dev/vg00
"'!8
/dev/dsk/c2t2d0
/dev/dsk/c1t2d0
/dev/vg01
"'!9
/dev/dsk/c1t0d0
/dev/dsk/c2t0d0
/ >
7 REPLIES 7
Jeff Machols
Esteemed Contributor

Re: junk characters in lvmtab!!

first make a backup of it. Then remove the file and run

#vgscan

This will re-create the lvmtab
nancy rippey
Trusted Contributor

Re: junk characters in lvmtab!!

You can mv /etc/lvmtab and run vgscan -a to recreate the lvmtab. I would suggest reading the man page for vgscan and looking at the warnings associated with vgscan. I have never had any problems recreating the lvmtab though.

Hope this helps
nrip
harry d brown jr
Honored Contributor

Re: junk characters in lvmtab!!

YOU DON'T!!!


It's SUPPOSED to be that way!

To read it, try: strings -a /etc/lvmtab


live free or die
harry
Live Free or Die
A. Clay Stephenson
Acclaimed Contributor

Re: junk characters in lvmtab!!

Hi:

This is almost certainly okay. You have to remember how strings decides that something is a string. If it finds 3 or more consecutive printable ASCII characters, it considers that a string. It appears that you just happened to get lucky and have some binary data that encoded as printable ASCII.

Regards, Clay
If it ain't broke, I can fix that.
T. M. Louah
Esteemed Contributor

Re: junk characters in lvmtab!!

to add to above, I suggest to compare strings command to other machines with checksum:
root:> whence strings
/usr/bin/strings
root:> cksum /usr/bin/strings
411063913 16384 /usr/bin/strings
and root:> what /usr/bin/strings
/usr/bin/strings:
$Revision: B.11.11_LR
Wed Nov 8 20:11:28 PST 2000 $
compare there may be a corruption in strings binaries.
g'd luck
t++
Little learning is dangerous!
Sridhar Bhaskarla
Honored Contributor

Re: junk characters in lvmtab!!

Hi,

It is not an ascii file. So, you don't have to worry about the junk characters. It gives some readable format with strings.

So, you don't need do to vgscans etc., etc.,. You are going to get them back.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Bill McNAMARA_1
Honored Contributor

Re: junk characters in lvmtab!!

As the guys mention it aint junk.
strings /stand/vmunix for lots of junk! (pipe through more or course)

If you vgscan after mv'ing your /etc/lvmtab to /etc/lvmtab.bak for example:

You have:
#strings /etc/lvmtab.bak
/dev/vg00
"'!8
/dev/dsk/c2t2d0
/dev/dsk/c1t2d0
/dev/vg01
"'!9
/dev/dsk/c1t0d0
/dev/dsk/c2t0d0

--------
#strings /etc/lvmtab
/dev/vg00
/dev/dsk/c1t2d0 (OH OH!!)
/dev/dsk/c2t2d0
/dev/vg01
/dev/dsk/c1t0d0
/dev/dsk/c2t0d0

Which you don't want..
To repair I guess it's alt link on some disk array)

vgreduce vg00 /dev/dsk/c1t2d0

#strings /etc/lvmtab
/dev/vg00
/dev/dsk/c2t2d0
/dev/vg01
/dev/dsk/c1t0d0
/dev/dsk/c2t0d0

vgextend vg00 /dev/dsk/c1t2d0

#strings /etc/lvmtab
/dev/vg00
/dev/dsk/c2t2d0
/dev/dsk/c1t2d0
/dev/vg01
/dev/dsk/c1t0d0
/dev/dsk/c2t0d0
It works for me (tm)