<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: /etc/lvmtab file format/structure in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/etc-lvmtab-file-format-structure/m-p/4747192#M549348</link>
    <description>I got this from a customer that was writing it.  Intersting little script&lt;BR /&gt;&lt;BR /&gt;Reemmber with 11iv2 we have LVMv2 which is totally different and has a different LVM header.&lt;BR /&gt;&lt;BR /&gt;cat display_lvmids &lt;BR /&gt;#!/usr/bin/sh &lt;BR /&gt;# &lt;BR /&gt;# $1 should be /dev/rdsk/c_t_d_ or /dev/rdisk/diskxxxx &lt;BR /&gt;# &lt;BR /&gt;typeset RDEV=$1 &lt;BR /&gt;&lt;BR /&gt;KIND=`xd -An -j 8192 -N8 -tc ${RDEV} 2&amp;gt; /dev/null | xargs` &lt;BR /&gt;&lt;BR /&gt;if [ "$KIND" = "L V M R E C 0 1" ]; then &lt;BR /&gt;INFO=`xd -An -j8200 -N16 -tx ${RDEV}` &lt;BR /&gt;PVID=`echo ${INFO} | awk '{print $1 $2}'` &lt;BR /&gt;VGID=`echo ${INFO} | awk '{print $3 $4}'` &lt;BR /&gt;echo "${RDEV} pvid = ${PVID} vgid = ${VGID}" &lt;BR /&gt;elif [ "$KIND" = "L V M R E C 0 2" ]; then &lt;BR /&gt;VGID=`xd -An -j8208 -N84 -tc ${RDEV} | cut -c5- | cut -c 1,5,9,13,17,21,25,29,33,37,41,45,49,53,57,61|tr -d '\n'` &lt;BR /&gt;echo "${RDEV} vgid = ${VGID}" &lt;BR /&gt;else &lt;BR /&gt;echo did not reconize $RDEV as a LVM disk &lt;BR /&gt;fi &lt;BR /&gt;</description>
    <pubDate>Wed, 02 Feb 2011 23:28:50 GMT</pubDate>
    <dc:creator>Emil Velez</dc:creator>
    <dc:date>2011-02-02T23:28:50Z</dc:date>
    <item>
      <title>/etc/lvmtab file format/structure</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/etc-lvmtab-file-format-structure/m-p/4747185#M549341</link>
      <description>Hello All, &lt;BR /&gt;&lt;BR /&gt;I want to read the /etc/lvmtab file programmatically to get the vgid, pvid. Can some body tell me how its structured? Or, if anyone has a sample program/script would help me a lot.&lt;BR /&gt;&lt;BR /&gt;thanks for your time,&lt;BR /&gt;Prince</description>
      <pubDate>Wed, 02 Feb 2011 07:02:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/etc-lvmtab-file-format-structure/m-p/4747185#M549341</guid>
      <dc:creator>Elavarasan Sowrinaidu</dc:creator>
      <dc:date>2011-02-02T07:02:08Z</dc:date>
    </item>
    <item>
      <title>Re: /etc/lvmtab file format/structure</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/etc-lvmtab-file-format-structure/m-p/4747186#M549342</link>
      <description>&lt;P&gt;lvmtab dies not have PVID /VGID ,you may read the file using "strings /etc/lvmtab"&lt;BR /&gt;&lt;BR /&gt;Commnand for VGID /PVID&lt;BR /&gt;&lt;BR /&gt;echo "0x2008?4D" | adb /dev/dsk/c-t-d-&lt;BR /&gt;&lt;BR /&gt;It will report 5 columns starting with&lt;BR /&gt;2008: &amp;lt;5th column=VGID&amp;gt;&lt;BR /&gt;&lt;BR /&gt;You may load a script "lvminfo" to get VGID/PVID&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://h30499.www3.hp.com/t5/System-Administration/HOW-to-know-the-PVID-and-VGID-of-disk/m-p/4620707#M377468" target="_blank"&gt;http://h30499.www3.hp.com/t5/System-Administration/HOW-to-know-the-PVID-and-VGID-of-disk/m-p/4620707#M377468&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2011 21:25:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/etc-lvmtab-file-format-structure/m-p/4747186#M549342</guid>
      <dc:creator>Manix</dc:creator>
      <dc:date>2011-09-29T21:25:14Z</dc:date>
    </item>
    <item>
      <title>Re: /etc/lvmtab file format/structure</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/etc-lvmtab-file-format-structure/m-p/4747187#M549343</link>
      <description>&lt;P&gt;do "strings /etc/lvmtab" -its binary file , i don`t think it has PVID /VGID.&lt;BR /&gt;&lt;BR /&gt;echo "0x2008?4D" | adb /dev/dsk/c-t-d-&lt;BR /&gt;&lt;BR /&gt;It will report 5 columns starting with&lt;BR /&gt;2008: &amp;lt;5th column=VGID&amp;gt;&lt;BR /&gt;&lt;BR /&gt;Load the script "lvminfo" to get the best information&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://h30499.www3.hp.com/t5/System-Administration/HOW-to-know-the-PVID-and-VGID-of-disk/m-p/4620707#M377468" target="_blank"&gt;http://h30499.www3.hp.com/t5/System-Administration/HOW-to-know-the-PVID-and-VGID-of-disk/m-p/4620707#M377468&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2011 21:25:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/etc-lvmtab-file-format-structure/m-p/4747187#M549343</guid>
      <dc:creator>Manix</dc:creator>
      <dc:date>2011-09-29T21:25:33Z</dc:date>
    </item>
    <item>
      <title>Re: /etc/lvmtab file format/structure</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/etc-lvmtab-file-format-structure/m-p/4747188#M549344</link>
      <description>&lt;!--!*#--&gt;Manix, take a hex dump of the lvmtab file and compare it to the output of Bill Hassell's "showLVMinfo" script. You'll find the CPUID and VGID values *are* included in the lvmtab file in binary format. With a quick glance, the PVIDs don't seem to be included.&lt;BR /&gt;&lt;BR /&gt;For example: "od -t x1a /etc/lvmtab". &lt;BR /&gt;&lt;BR /&gt;On one of my systems, the showLVMinfo reports this:&lt;BR /&gt;&lt;BR /&gt;# ./showLVMinfo /dev/rdsk/c2t2d0&lt;BR /&gt;&lt;BR /&gt;Local CPU ID = 580706587, hex value=0x229ce11b&lt;BR /&gt;&lt;BR /&gt;/dev/rdsk/c2t2d0:&lt;BR /&gt;    CPUID=0x229ce11b (580706587), VGID 0x48845169, PVID 0x48845169&lt;BR /&gt;&lt;BR /&gt;The relevant part of the output of the od command:&lt;BR /&gt;&lt;BR /&gt;0002000      0     0     0     0     0     0     0     0     0     0     0     0    22    9c    e1    1b&lt;BR /&gt;           nul   nul   nul   nul   nul   nul   nul   nul   nul   nul   nul   nul     "    fs     a   esc&lt;BR /&gt;0002020     48    84    51    69     0     0     0     0     0     0     0     0     0     2     0     0&lt;BR /&gt;             H   eot     Q     i   nul   nul   nul   nul   nul   nul   nul   nul   nul   stx   nul   nul&lt;BR /&gt;0002040      0     0     0     0     0     0     0     0     0     0    2f    64    65    76    2f    64&lt;BR /&gt;           nul   nul   nul   nul   nul   nul   nul   nul   nul   nul     /     d     e     v     /     d&lt;BR /&gt;0002060     73    6b    2f    63    32    74    32    64    30     0     0     0     0     0     0     0&lt;BR /&gt;             s     k     /     c     2     t     2     d     0   nul   nul   nul   nul   nul   nul   nul&lt;BR /&gt;0002100      0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0&lt;BR /&gt;           nul   nul   nul   nul   nul   nul   nul   nul   nul   nul   nul   nul   nul   nul   nul   nul&lt;BR /&gt;&lt;BR /&gt;MK</description>
      <pubDate>Wed, 02 Feb 2011 14:04:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/etc-lvmtab-file-format-structure/m-p/4747188#M549344</guid>
      <dc:creator>Matti_Kurkela</dc:creator>
      <dc:date>2011-02-02T14:04:51Z</dc:date>
    </item>
    <item>
      <title>Re: /etc/lvmtab file format/structure</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/etc-lvmtab-file-format-structure/m-p/4747189#M549345</link>
      <description>Thanks Mk ,&lt;BR /&gt;I was not sure about it ,so that is another way to get that info apart from Bill`s script.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Manix</description>
      <pubDate>Wed, 02 Feb 2011 14:17:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/etc-lvmtab-file-format-structure/m-p/4747189#M549345</guid>
      <dc:creator>Manix</dc:creator>
      <dc:date>2011-02-02T14:17:57Z</dc:date>
    </item>
    <item>
      <title>Re: /etc/lvmtab file format/structure</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/etc-lvmtab-file-format-structure/m-p/4747190#M549346</link>
      <description>Hi Prince:&lt;BR /&gt;&lt;BR /&gt;The '/etc/lvmtab' is a binary data file.  Hence, the 'stings' command only makes a "best attempt" to produce printable characters from groups of 4-characters.&lt;BR /&gt;&lt;BR /&gt;Aside from the device file and volume group names, a 'strings /etc/lvmtab' will not generally expose much meaningful data.  As Matti noted, an octal (or hex) dump will be more informative.&lt;BR /&gt;&lt;BR /&gt;The file actually contains the physical device paths for each volume group defined to the system. In addition, the VGID (Volume Group Identification) and some other state information about each volume group is recorded.&lt;BR /&gt;&lt;BR /&gt;One way to decode the file is (knowing its internal layout) to use Perl.  I did it some years ago as an exercise but no longer have the script.&lt;BR /&gt;&lt;BR /&gt;The best way, in my opinion, to evaluate PVID and VGID information is to read the physical disk itself as any of the aforementioned links will show.  Remember that a 'vgexport' of a volume group will remove it from '/etc/lvmtab'.  You still might want to assess something more about its origin, though, and the PVID and VGID signatures are there on the disk for the reading.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 02 Feb 2011 14:36:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/etc-lvmtab-file-format-structure/m-p/4747190#M549346</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2011-02-02T14:36:14Z</dc:date>
    </item>
    <item>
      <title>Re: /etc/lvmtab file format/structure</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/etc-lvmtab-file-format-structure/m-p/4747191#M549347</link>
      <description>Its always important to save a mapfile for every VG using the -p -s -m options. The man page says shared (cluster) mode but really should say -s = serial number. It makes no difference whether PVs are shared or not -- you need the VGID in order to reconstruct (vgimport) or simply identify loose LUNs and alternate paths. showLVMinfo has the xd command with offset to find the LVMREC headers on any disk. lvmtab has never been openly documented and really represents just a snapshot of the VGs. Every PV that has been (or is) part of a VG will have the LVMREC at offset 2000 and that's how vgscan and vgimport find all the disks.</description>
      <pubDate>Wed, 02 Feb 2011 14:54:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/etc-lvmtab-file-format-structure/m-p/4747191#M549347</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2011-02-02T14:54:05Z</dc:date>
    </item>
    <item>
      <title>Re: /etc/lvmtab file format/structure</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/etc-lvmtab-file-format-structure/m-p/4747192#M549348</link>
      <description>I got this from a customer that was writing it.  Intersting little script&lt;BR /&gt;&lt;BR /&gt;Reemmber with 11iv2 we have LVMv2 which is totally different and has a different LVM header.&lt;BR /&gt;&lt;BR /&gt;cat display_lvmids &lt;BR /&gt;#!/usr/bin/sh &lt;BR /&gt;# &lt;BR /&gt;# $1 should be /dev/rdsk/c_t_d_ or /dev/rdisk/diskxxxx &lt;BR /&gt;# &lt;BR /&gt;typeset RDEV=$1 &lt;BR /&gt;&lt;BR /&gt;KIND=`xd -An -j 8192 -N8 -tc ${RDEV} 2&amp;gt; /dev/null | xargs` &lt;BR /&gt;&lt;BR /&gt;if [ "$KIND" = "L V M R E C 0 1" ]; then &lt;BR /&gt;INFO=`xd -An -j8200 -N16 -tx ${RDEV}` &lt;BR /&gt;PVID=`echo ${INFO} | awk '{print $1 $2}'` &lt;BR /&gt;VGID=`echo ${INFO} | awk '{print $3 $4}'` &lt;BR /&gt;echo "${RDEV} pvid = ${PVID} vgid = ${VGID}" &lt;BR /&gt;elif [ "$KIND" = "L V M R E C 0 2" ]; then &lt;BR /&gt;VGID=`xd -An -j8208 -N84 -tc ${RDEV} | cut -c5- | cut -c 1,5,9,13,17,21,25,29,33,37,41,45,49,53,57,61|tr -d '\n'` &lt;BR /&gt;echo "${RDEV} vgid = ${VGID}" &lt;BR /&gt;else &lt;BR /&gt;echo did not reconize $RDEV as a LVM disk &lt;BR /&gt;fi &lt;BR /&gt;</description>
      <pubDate>Wed, 02 Feb 2011 23:28:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/etc-lvmtab-file-format-structure/m-p/4747192#M549348</guid>
      <dc:creator>Emil Velez</dc:creator>
      <dc:date>2011-02-02T23:28:50Z</dc:date>
    </item>
    <item>
      <title>Re: /etc/lvmtab file format/structure</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/etc-lvmtab-file-format-structure/m-p/4747193#M549349</link>
      <description>&lt;!--!*#--&gt;You can check also the scripts showlvmids and showlvmid at &lt;A href="http://hpux.ch/index.php/HPUX::Tools" target="_blank"&gt;http://hpux.ch/index.php/HPUX::Tools&lt;/A&gt; .</description>
      <pubDate>Fri, 15 Apr 2011 10:13:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/etc-lvmtab-file-format-structure/m-p/4747193#M549349</guid>
      <dc:creator>davesec</dc:creator>
      <dc:date>2011-04-15T10:13:42Z</dc:date>
    </item>
  </channel>
</rss>

