<?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: Copying logical volume information in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/copying-logical-volume-information/m-p/2587557#M647524</link>
    <description>Subbu,&lt;BR /&gt;&lt;BR /&gt;YOu need to write scripts to do this for you.&lt;BR /&gt;An example is to do something like this.&lt;BR /&gt;&lt;BR /&gt;on system A, write a script to generate a map file something like this&lt;BR /&gt;&lt;BR /&gt;lvol1:30&lt;BR /&gt;lvol2:200&lt;BR /&gt;lvol3:1000&lt;BR /&gt;&lt;BR /&gt;You can write a script say 'vgshow vg_name' as below&lt;BR /&gt;&lt;BR /&gt;for LV in `vgdisplay $1|grep "LV Name" |awk '{print $3}'`&lt;BR /&gt;do&lt;BR /&gt;SZ=`lvdisplay $LV |grep "LV Size" |awk '{print $4}'`&lt;BR /&gt;LVNAME=$LV&lt;BR /&gt;echo $LVNAME:$SZ &amp;gt;&amp;gt; $1.map&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Now take this map onto system B and then write another script to create lvols for you.&lt;BR /&gt;&lt;BR /&gt;for i in `cat vg01.map`&lt;BR /&gt;do&lt;BR /&gt;LV=`echo $i |awk '{FS=":";print $1}'|sed 's/\/dev\/vg01\///' `&lt;BR /&gt;SZ=`echo $i |awk '{FS=":";print $2}'`&lt;BR /&gt;lvcreate -n $LV -L $SZ vg01&lt;BR /&gt;&lt;BR /&gt;YOu can do this for other volume groups. This script may not work straight. But you can use this logic.&lt;BR /&gt;&lt;BR /&gt;-Sri</description>
    <pubDate>Mon, 01 Oct 2001 15:51:20 GMT</pubDate>
    <dc:creator>Sridhar Bhaskarla</dc:creator>
    <dc:date>2001-10-01T15:51:20Z</dc:date>
    <item>
      <title>Copying logical volume information</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/copying-logical-volume-information/m-p/2587550#M647517</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I have two systems both of them are N4000s &lt;BR /&gt;connected to a storage array. These systems &lt;BR /&gt;are in a different location.&lt;BR /&gt;&lt;BR /&gt;System A &lt;BR /&gt;========&lt;BR /&gt;vg01 &amp;lt;100 Lvs&amp;gt;&lt;BR /&gt;vg02 &amp;lt;100 Lvs&amp;gt;&lt;BR /&gt;&lt;BR /&gt;We are trying to migrate data from System A to System B. I need to re-create logical volumes on system B to what I have on system B. &lt;BR /&gt;&lt;BR /&gt;Is there a better way of doing this without having to manually create the logical volumes on System B. &lt;BR /&gt;&lt;BR /&gt;In effect System A will need to be like System B. I will not be able to mirror across WAN.&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;BR /&gt;&lt;BR /&gt;Subbu</description>
      <pubDate>Mon, 01 Oct 2001 15:21:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/copying-logical-volume-information/m-p/2587550#M647517</guid>
      <dc:creator>Subbu Krishna</dc:creator>
      <dc:date>2001-10-01T15:21:52Z</dc:date>
    </item>
    <item>
      <title>Re: Copying logical volume information</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/copying-logical-volume-information/m-p/2587551#M647518</link>
      <description>Are both systems connected to the same storage array?</description>
      <pubDate>Mon, 01 Oct 2001 15:31:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/copying-logical-volume-information/m-p/2587551#M647518</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2001-10-01T15:31:01Z</dc:date>
    </item>
    <item>
      <title>Re: Copying logical volume information</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/copying-logical-volume-information/m-p/2587552#M647519</link>
      <description>Hi Krishna,&lt;BR /&gt;I don't think so. How does os will know that that physical disk has valid file sytem until you will create it.&lt;BR /&gt;You might know the sequence to create filesystem but I am typing it anyway&lt;BR /&gt;&lt;BR /&gt;#pvcreate /dev/rdsk/c?t?d?&lt;BR /&gt;#mkdir /dev/vg??&lt;BR /&gt;#mknod /dev/vg??/group c 64 0x0n0000&lt;BR /&gt;#chmod 644 /dev/vg??/group&lt;BR /&gt;#vgcreate vg?? /dev/dsk/c?t?d?&lt;BR /&gt;#lvcreate -l numberofPV -n name /dev/vg?? (and more)&lt;BR /&gt;#newfs options (do man newfs for options)&lt;BR /&gt;&lt;BR /&gt;Sachin</description>
      <pubDate>Mon, 01 Oct 2001 15:38:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/copying-logical-volume-information/m-p/2587552#M647519</guid>
      <dc:creator>Sachin Patel</dc:creator>
      <dc:date>2001-10-01T15:38:08Z</dc:date>
    </item>
    <item>
      <title>Re: Copying logical volume information</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/copying-logical-volume-information/m-p/2587553#M647520</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;If it were me and I had to recreate 100+ Lvols on another system, I would write a script which&lt;BR /&gt;does a strings /etc/lvmtab | grep vg to get each volume group. I would then do a vgdisplay -v for each volume group and use awk or perl to parse for disks and logical volumes.&lt;BR /&gt;&lt;BR /&gt;This does assume that you have the same physical devices. My other approach would be to explore using Ignite.&lt;BR /&gt;</description>
      <pubDate>Mon, 01 Oct 2001 15:41:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/copying-logical-volume-information/m-p/2587553#M647520</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2001-10-01T15:41:26Z</dc:date>
    </item>
    <item>
      <title>Re: Copying logical volume information</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/copying-logical-volume-information/m-p/2587554#M647521</link>
      <description>Hi Subbu:&lt;BR /&gt;&lt;BR /&gt;If by "migrate", you mean move the data one-time, I'd do a 'vgexport' from system-A with mapfiles and a 'vgimport' on system-B.&lt;BR /&gt;&lt;BR /&gt;See the man pages for 'vgexport' and 'vgimport'.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;</description>
      <pubDate>Mon, 01 Oct 2001 15:46:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/copying-logical-volume-information/m-p/2587554#M647521</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2001-10-01T15:46:10Z</dc:date>
    </item>
    <item>
      <title>Re: Copying logical volume information</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/copying-logical-volume-information/m-p/2587555#M647522</link>
      <description>Hi Subbu,&lt;BR /&gt;&lt;BR /&gt;Looking at what you have said so far, machines are in different locations and not sharing the disk devices, the only option is to create new LVs on the new machine and then copy the data.&lt;BR /&gt;&lt;BR /&gt;As far as creating the new LVs is concerned, you are better of writing a small script to get the configuration of the LVs from node 1 and then creating them on the new node.&lt;BR /&gt;&lt;BR /&gt;-Regards&lt;BR /&gt;Ramesh</description>
      <pubDate>Mon, 01 Oct 2001 15:47:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/copying-logical-volume-information/m-p/2587555#M647522</guid>
      <dc:creator>linuxfan</dc:creator>
      <dc:date>2001-10-01T15:47:19Z</dc:date>
    </item>
    <item>
      <title>Re: Copying logical volume information</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/copying-logical-volume-information/m-p/2587556#M647523</link>
      <description>Unfortunately, unless the two systems share the same array or unless you're planning on moving the array from systemA to systemB, you have little choice but to re-create the LVs on systemB.  Probably your best bet would be write a script as Clay suggested...I have something I started on some time ago...may be useful(?).  I can't verify its correctness as I haven't played around with this script in a long time.  &lt;BR /&gt;&lt;BR /&gt;-Santosh</description>
      <pubDate>Mon, 01 Oct 2001 15:48:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/copying-logical-volume-information/m-p/2587556#M647523</guid>
      <dc:creator>Santosh Nair_1</dc:creator>
      <dc:date>2001-10-01T15:48:35Z</dc:date>
    </item>
    <item>
      <title>Re: Copying logical volume information</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/copying-logical-volume-information/m-p/2587557#M647524</link>
      <description>Subbu,&lt;BR /&gt;&lt;BR /&gt;YOu need to write scripts to do this for you.&lt;BR /&gt;An example is to do something like this.&lt;BR /&gt;&lt;BR /&gt;on system A, write a script to generate a map file something like this&lt;BR /&gt;&lt;BR /&gt;lvol1:30&lt;BR /&gt;lvol2:200&lt;BR /&gt;lvol3:1000&lt;BR /&gt;&lt;BR /&gt;You can write a script say 'vgshow vg_name' as below&lt;BR /&gt;&lt;BR /&gt;for LV in `vgdisplay $1|grep "LV Name" |awk '{print $3}'`&lt;BR /&gt;do&lt;BR /&gt;SZ=`lvdisplay $LV |grep "LV Size" |awk '{print $4}'`&lt;BR /&gt;LVNAME=$LV&lt;BR /&gt;echo $LVNAME:$SZ &amp;gt;&amp;gt; $1.map&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Now take this map onto system B and then write another script to create lvols for you.&lt;BR /&gt;&lt;BR /&gt;for i in `cat vg01.map`&lt;BR /&gt;do&lt;BR /&gt;LV=`echo $i |awk '{FS=":";print $1}'|sed 's/\/dev\/vg01\///' `&lt;BR /&gt;SZ=`echo $i |awk '{FS=":";print $2}'`&lt;BR /&gt;lvcreate -n $LV -L $SZ vg01&lt;BR /&gt;&lt;BR /&gt;YOu can do this for other volume groups. This script may not work straight. But you can use this logic.&lt;BR /&gt;&lt;BR /&gt;-Sri</description>
      <pubDate>Mon, 01 Oct 2001 15:51:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/copying-logical-volume-information/m-p/2587557#M647524</guid>
      <dc:creator>Sridhar Bhaskarla</dc:creator>
      <dc:date>2001-10-01T15:51:20Z</dc:date>
    </item>
    <item>
      <title>Re: Copying logical volume information</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/copying-logical-volume-information/m-p/2587558#M647525</link>
      <description>As the others have mentioned, a script approach with normal LVM commands is probably best.&lt;BR /&gt;&lt;BR /&gt;Only if the LVM configuration of System B will be exactly the *same*, i.e. not just similar, as that of System A, then you could use vgcfgbackup and vgcfgrestore (and vgexport (-m -p) and vgimport). &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 02 Oct 2001 08:09:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/copying-logical-volume-information/m-p/2587558#M647525</guid>
      <dc:creator>Frank Slootweg</dc:creator>
      <dc:date>2001-10-02T08:09:22Z</dc:date>
    </item>
    <item>
      <title>Re: Copying logical volume information</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/copying-logical-volume-information/m-p/2587559#M647526</link>
      <description>Couple of ideas spring to mind.&lt;BR /&gt;&lt;BR /&gt;Ignite could do this for you. Just re-ignite the system.&lt;BR /&gt;&lt;BR /&gt;The other option that immeditately springs to mind is to do a vgcfgbackup for vg01 and vg02 - then do a vgcfgrestore for vg01 and vg02:&lt;BR /&gt;&lt;BR /&gt;#vgcfgbackup vg01&lt;BR /&gt;#vgcfgbackup vg02&lt;BR /&gt;&lt;BR /&gt;then restore to other system using &lt;BR /&gt;#vgcfgbackup -f &lt;FILE&gt; &lt;DISKS&gt;&lt;BR /&gt;&lt;BR /&gt;if you want data as well, do this and then run restore/vxrestore as needed.&lt;BR /&gt;&lt;BR /&gt;I'd do it via ignite though because it's automagical.&lt;BR /&gt;&lt;BR /&gt;I'm guessing this is for a DR site?&lt;/DISKS&gt;&lt;/FILE&gt;</description>
      <pubDate>Tue, 02 Oct 2001 21:20:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/copying-logical-volume-information/m-p/2587559#M647526</guid>
      <dc:creator>Scott Van Kalken</dc:creator>
      <dc:date>2001-10-02T21:20:06Z</dc:date>
    </item>
  </channel>
</rss>

