<?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: mirroring multiple disks quickly in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/mirroring-multiple-disks-quickly/m-p/2777371#M76310</link>
    <description>Hiya,&lt;BR /&gt;&lt;BR /&gt;Here's a script I use to just mirror the entire root volume group:&lt;BR /&gt;&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;DISK=c2t2d0&lt;BR /&gt;pvcreate -B /dev/rdsk/$DISK&lt;BR /&gt;mkboot /dev/rdsk/$DISK&lt;BR /&gt;vgextend /dev/vg00 /dev/dsk/$DISK&lt;BR /&gt;&lt;BR /&gt;ls /dev/vg00/lv* | while read LVOL&lt;BR /&gt;do&lt;BR /&gt;        lvextend -m 1 $LVOL /dev/dsk/$DISK&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;You'll have to modify it to meet your requirements though. &lt;BR /&gt;&lt;BR /&gt;Cheers!&lt;BR /&gt;James</description>
    <pubDate>Thu, 01 Aug 2002 07:34:53 GMT</pubDate>
    <dc:creator>James Beamish-White</dc:creator>
    <dc:date>2002-08-01T07:34:53Z</dc:date>
    <item>
      <title>mirroring multiple disks quickly</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/mirroring-multiple-disks-quickly/m-p/2777370#M76309</link>
      <description>I have got six disks, a,b,c,d,e and f.  I want to create a new volume group that contains a single logical volume which uses three of these disks with a mirror copy on the other three disks.  I want a mirrored to d, b to e and c to f.&lt;BR /&gt;I realise that I can create my LV on three disks then lvextend -m it onto the other three disks but that will take a long time.  What is the fastest way to achieve this?</description>
      <pubDate>Thu, 01 Aug 2002 07:22:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/mirroring-multiple-disks-quickly/m-p/2777370#M76309</guid>
      <dc:creator>Ian Lochray</dc:creator>
      <dc:date>2002-08-01T07:22:13Z</dc:date>
    </item>
    <item>
      <title>Re: mirroring multiple disks quickly</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/mirroring-multiple-disks-quickly/m-p/2777371#M76310</link>
      <description>Hiya,&lt;BR /&gt;&lt;BR /&gt;Here's a script I use to just mirror the entire root volume group:&lt;BR /&gt;&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;DISK=c2t2d0&lt;BR /&gt;pvcreate -B /dev/rdsk/$DISK&lt;BR /&gt;mkboot /dev/rdsk/$DISK&lt;BR /&gt;vgextend /dev/vg00 /dev/dsk/$DISK&lt;BR /&gt;&lt;BR /&gt;ls /dev/vg00/lv* | while read LVOL&lt;BR /&gt;do&lt;BR /&gt;        lvextend -m 1 $LVOL /dev/dsk/$DISK&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;You'll have to modify it to meet your requirements though. &lt;BR /&gt;&lt;BR /&gt;Cheers!&lt;BR /&gt;James</description>
      <pubDate>Thu, 01 Aug 2002 07:34:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/mirroring-multiple-disks-quickly/m-p/2777371#M76310</guid>
      <dc:creator>James Beamish-White</dc:creator>
      <dc:date>2002-08-01T07:34:53Z</dc:date>
    </item>
    <item>
      <title>Re: mirroring multiple disks quickly</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/mirroring-multiple-disks-quickly/m-p/2777372#M76311</link>
      <description>First create the LV &lt;BR /&gt;&lt;BR /&gt;lvcreate vgxx&lt;BR /&gt;&lt;BR /&gt;Then extend to the three "source" disks&lt;BR /&gt;&lt;BR /&gt;lvextend -L &lt;SIZE_IN_MB&gt; /dev/vgxx/lvolyy /dev/dsk/a ../b ../c&lt;BR /&gt;&lt;BR /&gt;Create the Filesystem&lt;BR /&gt;&lt;BR /&gt;newfs -F vxfs -o largefiles /dev/vgxx/rlvolyy&lt;BR /&gt;&lt;BR /&gt;mount it (directly or by editing /etc/fstab)&lt;BR /&gt;&lt;BR /&gt;And then make the mirror (with the disks in appropiate order)&lt;BR /&gt;&lt;BR /&gt;lvextend -m 1 /dev/vgxx/lvolyy /dev/dsk/d ../e ../f&lt;BR /&gt;&lt;BR /&gt;The time depends on the type of disk you use... but now you can work normally&lt;BR /&gt;&lt;BR /&gt;&lt;/SIZE_IN_MB&gt;</description>
      <pubDate>Thu, 01 Aug 2002 07:45:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/mirroring-multiple-disks-quickly/m-p/2777372#M76311</guid>
      <dc:creator>Joaquin Gil de Vergara</dc:creator>
      <dc:date>2002-08-01T07:45:35Z</dc:date>
    </item>
    <item>
      <title>Re: mirroring multiple disks quickly</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/mirroring-multiple-disks-quickly/m-p/2777373#M76312</link>
      <description>Sorry..&lt;BR /&gt;&lt;BR /&gt;First of all create de vgxx!!!&lt;BR /&gt;&lt;BR /&gt;pvcreate /dev/rdsk/...a&lt;BR /&gt;pvcreate /dev/rdsk/...b&lt;BR /&gt;pvcreate /dev/rdsk/...c&lt;BR /&gt;pvcreate /dev/rdsk/...d&lt;BR /&gt;pvcreate /dev/rdsk/...e&lt;BR /&gt;pvcreate /dev/rdsk/...f&lt;BR /&gt;&lt;BR /&gt;mkdir /dev/vgxx&lt;BR /&gt;mknod /dev/vgxx/group c 64 0x050000&lt;BR /&gt;(the major number must be unique! Check it with ll /dev/*/group)&lt;BR /&gt;&lt;BR /&gt;vgcreate vgxx /dev/dsk/...a&lt;BR /&gt;vgextend vgxx /dev/dsk...b /dev/dsk...c /dev/dsk...d /dev/dsk...e /dev/dsk...f&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 01 Aug 2002 07:48:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/mirroring-multiple-disks-quickly/m-p/2777373#M76312</guid>
      <dc:creator>Joaquin Gil de Vergara</dc:creator>
      <dc:date>2002-08-01T07:48:40Z</dc:date>
    </item>
    <item>
      <title>Re: mirroring multiple disks quickly</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/mirroring-multiple-disks-quickly/m-p/2777374#M76313</link>
      <description>I appreciate that I can create the LV on three disks and then mirror it but I do not believe that this is the fastest way to do it.&lt;BR /&gt;If I was doing this on a single disk then I would create a 0 size LV on one disk, lvextend -m it onto the second disk then lvextend -L the LV which automatically extends the Lv and the mirror.  My understanding is that this is faster than creating the LV at its full size and then mirroring it.&lt;BR /&gt;How do I do this with six disks rather than two?</description>
      <pubDate>Thu, 01 Aug 2002 08:03:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/mirroring-multiple-disks-quickly/m-p/2777374#M76313</guid>
      <dc:creator>Ian Lochray</dc:creator>
      <dc:date>2002-08-01T08:03:55Z</dc:date>
    </item>
    <item>
      <title>Re: mirroring multiple disks quickly</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/mirroring-multiple-disks-quickly/m-p/2777375#M76314</link>
      <description>With the lvextend command, you can specify the physical disks where you want your lvol extended to.  If for example you have the six disks that you have mentioned and they are 8GB disks, then:&lt;BR /&gt;lvcreate -L 4 /dev/vg01 a&lt;BR /&gt;lvextend -L 8 /dev/vg01/lvol1 b&lt;BR /&gt;lvextend -L 12 /dev/vg01/lvol1 c&lt;BR /&gt;So now, you have created a 12MB volume which uses 4MB on disks a, b and c.  Now, create your mirror with&lt;BR /&gt;lvextend -m 1 /dev/vg01/lvol1 d e f&lt;BR /&gt;and now you can extend as much as you can and it will extend as a mirrored volume on the 6 disks.  If you would like to see how the logical extends are actually mapped to the physical extends (LV PE to PV PE), then do lvdisplay -v /dev/vg00/lvol1 | more&lt;BR /&gt;Hope this helps,&lt;BR /&gt;George</description>
      <pubDate>Thu, 01 Aug 2002 08:16:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/mirroring-multiple-disks-quickly/m-p/2777375#M76314</guid>
      <dc:creator>George Petrides_1</dc:creator>
      <dc:date>2002-08-01T08:16:54Z</dc:date>
    </item>
    <item>
      <title>Re: mirroring multiple disks quickly</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/mirroring-multiple-disks-quickly/m-p/2777376#M76315</link>
      <description>OK&lt;BR /&gt;&lt;BR /&gt;you must use two PVGs&lt;BR /&gt;&lt;BR /&gt;When you create the VG with the vgextend command create teo PVG&lt;BR /&gt;&lt;BR /&gt;vgextend -g PVG1 /dev/dsk/...a ...b ...c&lt;BR /&gt;vgextend -g PVG2 /dev/dsk/...d ...e ...f&lt;BR /&gt;&lt;BR /&gt;create the LV with strict policy &lt;BR /&gt;lvcreate -s g vgxx&lt;BR /&gt;&lt;BR /&gt;and then extend the LV in 1 PE&lt;BR /&gt;&lt;BR /&gt;lvextend -l 1 /dev/vgxx/lvyy /dev/dsk/...a&lt;BR /&gt;lvextend -m 1 /dev/vgxx/lvyy PVG2&lt;BR /&gt;&lt;BR /&gt;Now assign all the extensions... the mirror will be instant&lt;BR /&gt;&lt;BR /&gt;lvextend -l &lt;TOTAL_SIZE&gt; /dev/vgxx/lvolyy&lt;BR /&gt;&lt;BR /&gt;Be carefull in the order you first assign PV to the VG and the PVG. This order be used to assign the extends&lt;BR /&gt;&lt;BR /&gt;Hope that this help you!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/TOTAL_SIZE&gt;</description>
      <pubDate>Thu, 01 Aug 2002 08:33:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/mirroring-multiple-disks-quickly/m-p/2777376#M76315</guid>
      <dc:creator>Joaquin Gil de Vergara</dc:creator>
      <dc:date>2002-08-01T08:33:25Z</dc:date>
    </item>
    <item>
      <title>Re: mirroring multiple disks quickly</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/mirroring-multiple-disks-quickly/m-p/2777377#M76316</link>
      <description>That is almost what I want but not quite.  In that scenario, the first 12Mb would be on three disks in the LV but on a single disk in the mirror.  I want a strict one-to-one disk relationship.&lt;BR /&gt;Can I lvcreate a zero byte LV on the first disk then do an lvextend -m1 and specify three disks and then lvextend the LV onto the first three disks?</description>
      <pubDate>Thu, 01 Aug 2002 08:33:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/mirroring-multiple-disks-quickly/m-p/2777377#M76316</guid>
      <dc:creator>Ian Lochray</dc:creator>
      <dc:date>2002-08-01T08:33:49Z</dc:date>
    </item>
    <item>
      <title>Re: mirroring multiple disks quickly</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/mirroring-multiple-disks-quickly/m-p/2777378#M76317</link>
      <description>Joachin,&lt;BR /&gt;  that is perfect.  Thanks to all who replied.</description>
      <pubDate>Thu, 01 Aug 2002 08:38:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/mirroring-multiple-disks-quickly/m-p/2777378#M76317</guid>
      <dc:creator>Ian Lochray</dc:creator>
      <dc:date>2002-08-01T08:38:01Z</dc:date>
    </item>
    <item>
      <title>Re: mirroring multiple disks quickly</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/mirroring-multiple-disks-quickly/m-p/2777379#M76318</link>
      <description>As far as I remember, you can create a zero MB volume with just lvcreate.  However, since you want your disks to be mirrored one-to-one, why don't you create mirrored lvol on disks a and d (use all disk space), then extend to b and e, use all disk space and finally extend on c and f.  It's easy to do that if you add two disks at a time to the group and use the vgdisplay command to give you the free space that you will have to divide by 2 since you are using mirroring.  However, be warned that you might run to performance issues with this type of allocation since there is no striping (manual striping not HP-UX) and if for example each disk is 18GB therefore the file system will be 54GB, if you have 16GB of data, only two disks will be used to serve your data since the rest of the disks have no data and are not being used.  The disks are mechanical devices and the more disks being used to serve your data the better. &lt;BR /&gt;George</description>
      <pubDate>Thu, 01 Aug 2002 08:45:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/mirroring-multiple-disks-quickly/m-p/2777379#M76318</guid>
      <dc:creator>George Petrides_1</dc:creator>
      <dc:date>2002-08-01T08:45:02Z</dc:date>
    </item>
  </channel>
</rss>

