<?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: LVM Script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/lvm-script/m-p/4060259#M600718</link>
    <description>I figured out. It was a typo in the script. Instead of -n I typed -l so it was failing and I didn't notice the message carefully. Thanks a lot</description>
    <pubDate>Sat, 25 Aug 2007 05:00:49 GMT</pubDate>
    <dc:creator>Siddhartha Sinha</dc:creator>
    <dc:date>2007-08-25T05:00:49Z</dc:date>
    <item>
      <title>LVM Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lvm-script/m-p/4060256#M600715</link>
      <description>I have a unique situation. I am in a test environment and I need to test all the disks in a Server before I release. Now I am trying to create a file system using all the available disks (leaving any disks which are being used by any volume groups). To do this I wrote a simple script which run pvcreate on all unused disks and create a vg and then it should create the LV and run newfs and mount it. But it fails while trying to create the LV. Can anyone please help me. With many thanks. Here is the script attached.&lt;BR /&gt;&lt;BR /&gt;Siddhartha</description>
      <pubDate>Sat, 25 Aug 2007 04:18:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lvm-script/m-p/4060256#M600715</guid>
      <dc:creator>Siddhartha Sinha</dc:creator>
      <dc:date>2007-08-25T04:18:14Z</dc:date>
    </item>
    <item>
      <title>Re: LVM Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lvm-script/m-p/4060257#M600716</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Could you attach the script?&lt;BR /&gt;&lt;BR /&gt;Robert-Jan</description>
      <pubDate>Sat, 25 Aug 2007 04:30:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lvm-script/m-p/4060257#M600716</guid>
      <dc:creator>Robert-Jan Goossens</dc:creator>
      <dc:date>2007-08-25T04:30:24Z</dc:date>
    </item>
    <item>
      <title>Re: LVM Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lvm-script/m-p/4060258#M600717</link>
      <description>Sorry, I clicked the attachment but it didn't upload for some reason&lt;BR /&gt;&lt;BR /&gt;I am pasting here. lvcreate is not taking the variable after -L $DISKSZ.&lt;BR /&gt;&lt;BR /&gt;With thanks&lt;BR /&gt;&lt;BR /&gt;Siddhartha&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;echo "Author - Siddhartha Sinha,"&lt;BR /&gt;echo " Here is the list of disks you have here!!"&lt;BR /&gt;ioscan -funCdisk|grep -i dsk |awk '{print $1}'|sort|tee total_disks&lt;BR /&gt;echo " This the disks used by different Volume Groups"&lt;BR /&gt;vgdisplay -v|grep -i dsk|awk '{print $3}'|sort|tee used_disks&lt;BR /&gt;echo "Now you are going to create a Volume Group named vg-test"&lt;BR /&gt;echo "Keep patience, it may take longer time depending on the amount"&lt;BR /&gt;echo "of the Disks you have in this System"&lt;BR /&gt;vgchange -a n /dev/vg-test&lt;BR /&gt;vgexport /dev/vg-test&lt;BR /&gt;comm -23 total_disks used_disks|sed -e s/dsk/rdsk/g|while read DISK&lt;BR /&gt;do&lt;BR /&gt;dd if=/dev/zero of=$DISK bs=4096 count=1000&lt;BR /&gt;pvcreate -f $DISK&lt;BR /&gt;done&lt;BR /&gt;rm -r /dev/vg-test&lt;BR /&gt;mkdir /dev/vg-test&lt;BR /&gt;mknod /dev/vg-test/group c 64 0x080000&lt;BR /&gt;comm -23 total_disks used_disks|sort|sed -e 's/^/vgextend \/dev\/vg\-test /' -e '1s/vgextend/vgcreate \-s 64 \-p 32 /'| tee free_disks&lt;BR /&gt;chmod +x free_disks&lt;BR /&gt;./free_disks&lt;BR /&gt;PE_SZ=`vgdisplay /dev/vg-test|egrep -i 'PE Size'|awk '{print $4}'`&lt;BR /&gt;TOT_PE=`vgdisplay /dev/vg-test|egrep -i 'Total PE'|awk '{print $3}'`&lt;BR /&gt;DISKSZ=`expr $PE_SZ \* $TOT_PE`&lt;BR /&gt;lvcreate -L $DISKSZ -l lv-test /dev/vg-test&lt;BR /&gt;newfs -F vxfs -o largefiles /dev/vg-test/rlv-test&lt;BR /&gt;mkdir /test&lt;BR /&gt;mount /dev/vg-test/lv-test /test</description>
      <pubDate>Sat, 25 Aug 2007 04:39:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lvm-script/m-p/4060258#M600717</guid>
      <dc:creator>Siddhartha Sinha</dc:creator>
      <dc:date>2007-08-25T04:39:39Z</dc:date>
    </item>
    <item>
      <title>Re: LVM Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lvm-script/m-p/4060259#M600718</link>
      <description>I figured out. It was a typo in the script. Instead of -n I typed -l so it was failing and I didn't notice the message carefully. Thanks a lot</description>
      <pubDate>Sat, 25 Aug 2007 05:00:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lvm-script/m-p/4060259#M600718</guid>
      <dc:creator>Siddhartha Sinha</dc:creator>
      <dc:date>2007-08-25T05:00:49Z</dc:date>
    </item>
    <item>
      <title>Re: LVM Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lvm-script/m-p/4060260#M600719</link>
      <description>&amp;gt;lvcreate is not taking the variable after -L $DISKSZ.&lt;BR /&gt;&lt;BR /&gt;What was the lvcreate error?&lt;BR /&gt;&lt;BR /&gt;You might want to print out $DISKSZ, $PE_SZ and&lt;BR /&gt;$TOT_PE.&lt;BR /&gt;&lt;BR /&gt;(Any reason you use egrep when just grep (or even fgrep) will do?)</description>
      <pubDate>Sat, 25 Aug 2007 05:00:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lvm-script/m-p/4060260#M600719</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-08-25T05:00:58Z</dc:date>
    </item>
  </channel>
</rss>

