<?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: VG Script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/vg-script/m-p/5213916#M465411</link>
    <description>Too many open threads?&lt;BR /&gt;&lt;BR /&gt;;-)&lt;BR /&gt;&lt;BR /&gt;But yes, you can.</description>
    <pubDate>Fri, 11 Dec 2009 13:17:55 GMT</pubDate>
    <dc:creator>Torsten.</dc:creator>
    <dc:date>2009-12-11T13:17:55Z</dc:date>
    <item>
      <title>VG Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/vg-script/m-p/5213909#M465404</link>
      <description>How do I use the above script please&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/ksh&lt;BR /&gt;#&lt;BR /&gt;# 7/5/2007  JML&lt;BR /&gt;#&lt;BR /&gt;#This script reads the filesystem.txt file and collects all the&lt;BR /&gt;#required paramters to create volumegroup and filesystems&lt;BR /&gt;#&lt;BR /&gt;# VG label to indicate Volume group settings&lt;BR /&gt;# FS Lable to indicate Filesystem settings&lt;BR /&gt;TABLE=filesystem.txt&lt;BR /&gt;LOGS=/tmp/create-vg-lv.$$.log&lt;BR /&gt;&lt;BR /&gt;if [ ! -r $TABLE ]&lt;BR /&gt;then &lt;BR /&gt;&lt;BR /&gt; echo "File table does not exist, please check and re-run the script .... "&lt;BR /&gt; exit 9&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;READ_VG()&lt;BR /&gt;{&lt;BR /&gt;ALLVG=`awk -F: '/^VG/ {print $2}' $TABLE`&lt;BR /&gt;echo "The following Volume groups will be created : \n${ALLVG} \n "&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;READ_FS()&lt;BR /&gt;{&lt;BR /&gt;ALLVG=`awk -F: '/^VG/ {print $2}' $TABLE`&lt;BR /&gt;for VGP in `echo $ALLVG` &lt;BR /&gt;   do&lt;BR /&gt;    echo "Checking $VGP filesystem requirements"&lt;BR /&gt;    FSP=`awk -F: -v volgrp=$VGP '/^FS/ &amp;amp;&amp;amp; $2 ~ volgrp {printf "%-4s %-21s %8dMB \n", $2,$3,($4/1024)}' $TABLE`&lt;BR /&gt;    echo "$FSP"&lt;BR /&gt;   done&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;READ_VG &lt;BR /&gt;READ_FS &lt;BR /&gt;read go?"Proceed to create the filesystmes (y/n): "&lt;BR /&gt;case $go in &lt;BR /&gt;    Y|y|YES|yes )&lt;BR /&gt;                 echo "----------------------------------------------------"   | tee -a $LOGS&lt;BR /&gt;                 echo "Creating directory and file for volume groups "  | tee -a $LOGS&lt;BR /&gt;                  for vgc in `awk -F: '/^VG/ {print $2}' $TABLE`&lt;BR /&gt;                     do&lt;BR /&gt;                        #### Check if the VG directory exist ####&lt;BR /&gt;                        if [ ! -d /dev/${vgc} ] ; then&lt;BR /&gt;                          echo "$vgc does not exist, creating directory now "&lt;BR /&gt;                          minornum=`grep "VG:${vgc} | awk -F: '{print $NF}'`&lt;BR /&gt;                          set -x&lt;BR /&gt;                           mkdir  /dev/${vgc}&lt;BR /&gt;                           mknod  /dev/${vgc}/group c 64 0x0${minornum}0000&lt;BR /&gt;                          set +x&lt;BR /&gt;                          PRIDSK=`awk -F: -v volgrp=$vgc '/^VG/ &amp;amp;&amp;amp; $2 ~ volgrp {print $3}' $TABLE` &lt;BR /&gt;                          ALTDSK=`awk -F: -v volgrp=$vgc '/^VG/ &amp;amp;&amp;amp; $2 ~ volgrp {print $4}' $TABLE` &lt;BR /&gt;                          NUMPRIDK=`echo $PRIDSK | awk -F"," '{print NF}'`&lt;BR /&gt;                         #### Collecting disk information per VG ####&lt;BR /&gt;                         if [ $NUMPRIDK -gt 1 ] ; then&lt;BR /&gt;                             ADDPDSK=`awk -F: -v volgrp=$vgc '/^VG/ &amp;amp;&amp;amp; $2 ~ volgrp {print $3}' $TABLE | \&lt;BR /&gt;                                      awk -F"," '{print substr($0,index($0,$2))}'`&lt;BR /&gt;                             ALLDISKS=`echo "$ADDPDSK,$ALTDSK"`&lt;BR /&gt;                             FIRSRDSK=`awk -F: -v volgrp=$vgc '/^VG/ &amp;amp;&amp;amp; $2 ~ volgrp {print $3}' $TABLE | \&lt;BR /&gt;                                      awk -F"," '{print $1}'`&lt;BR /&gt;                           else&lt;BR /&gt;                            FIRSRDSK=$PRIDSK&lt;BR /&gt;                            ALLDISKS=$ALTDSK&lt;BR /&gt;                         fi &lt;BR /&gt;                             FIRSRDSK=`echo $FIRSRDSK | sed -e 's/,/ /g' | sed -e "s/c/\/dev\/dsk\/c/g"`&lt;BR /&gt;                             ALLDISKS=`echo $ALLDISKS | sed -e 's/,/ /g' | sed -e "s/c/\/dev\/dsk\/c/g"`&lt;BR /&gt;                             echo "$FIRSRDSK ----&amp;gt; $ALLDISKS"&lt;BR /&gt;                         ##### Creating and Extending Volume Group ######&lt;BR /&gt;                         set -x&lt;BR /&gt;                          vgcreate -l 255 -e 7000 -p 32 -s 4 /dev/${vgc} $FIRSRDSK  &lt;BR /&gt;                          vgextend /dev/${vgc}  $ALLDISKS &lt;BR /&gt;                         set +x&lt;BR /&gt;                         ###### Creating Logical Volumes using table file configuration #####&lt;BR /&gt;                         echo "Now we will create the Logical Volumes for $vgc .... \n"&lt;BR /&gt;#                         set -x &lt;BR /&gt;                         for lvolc in  `awk -F: -v volgrp=$vgc '/^FS/ &amp;amp;&amp;amp; $2 ~ volgrp  {print $5}' $TABLE`&lt;BR /&gt;                          do&lt;BR /&gt;                           echo $lvolc&lt;BR /&gt;                           lv_mount=`awk -F: -v volgrp=$vgc -v lv=${lvolc} '/^FS/ &amp;amp;&amp;amp; $2 ~ volgrp &amp;amp;&amp;amp; $5 ~ lv {print $3}' $TABLE | head -1`&lt;BR /&gt;                           lv_size=`awk -F: -v volgrp=$vgc -v lv=${lvolc} '/^FS/ &amp;amp;&amp;amp; $2 ~ volgrp &amp;amp;&amp;amp; $5 ~ lv {print ($4/1024)}' $TABLE | head -1`&lt;BR /&gt;                           set -x&lt;BR /&gt;                           lvcreate -L $lv_size -n $lvolc $vgc "&lt;BR /&gt;                           mkfs -F vxfs -o ninode=unlimited,bsize=1024,version=5,inosize=256,logsize=16384,largefiles /dev/${vgc}/${lvolc} &lt;BR /&gt;                           mkdir -p $lv_mount&lt;BR /&gt;                           mount /dev/${vgc}/${lvolc} $lv_mount &lt;BR /&gt;                           set +x&lt;BR /&gt;                           echo "----------------------------------------------------" &lt;BR /&gt;                          done &lt;BR /&gt;                         set +x&lt;BR /&gt;                          else&lt;BR /&gt;                           echo "$vgc directory exist, please check and re-run $vgc only" &lt;BR /&gt;                        fi&lt;BR /&gt;                     done  | tee -a $LOGS&lt;BR /&gt;                 ;;&lt;BR /&gt;    N|n|NO|no   )&lt;BR /&gt;                  echo " Exiting script....... good bye.....  " &lt;BR /&gt;                  exit 1 &lt;BR /&gt;                 ;;&lt;BR /&gt;              * ) echo " Wrong option re-run the script and choose the right option... "  &lt;BR /&gt;                 ;;&lt;BR /&gt;esac&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 11 Dec 2009 11:08:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/vg-script/m-p/5213909#M465404</guid>
      <dc:creator>David Willams</dc:creator>
      <dc:date>2009-12-11T11:08:47Z</dc:date>
    </item>
    <item>
      <title>Re: VG Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/vg-script/m-p/5213910#M465405</link>
      <description>What is filesystem.txt ???&lt;BR /&gt;&lt;BR /&gt;and how does it look like&lt;BR /&gt;&lt;BR /&gt;If this is not the correct one... can someone give me a script to create multiple VG's and LV's</description>
      <pubDate>Fri, 11 Dec 2009 11:23:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/vg-script/m-p/5213910#M465405</guid>
      <dc:creator>David Willams</dc:creator>
      <dc:date>2009-12-11T11:23:11Z</dc:date>
    </item>
    <item>
      <title>Re: VG Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/vg-script/m-p/5213911#M465406</link>
      <description>Ask the author!&lt;BR /&gt;&lt;BR /&gt;I would be very careful with a script found on the net, especially if I don't know what it does and expects in detail.</description>
      <pubDate>Fri, 11 Dec 2009 11:47:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/vg-script/m-p/5213911#M465406</guid>
      <dc:creator>Torsten.</dc:creator>
      <dc:date>2009-12-11T11:47:16Z</dc:date>
    </item>
    <item>
      <title>Re: VG Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/vg-script/m-p/5213912#M465407</link>
      <description>thanks Torsten,&lt;BR /&gt;&lt;BR /&gt;COuld you give me a script to create multiple VG's&lt;BR /&gt;&lt;BR /&gt;also my other hpvm issue is going hard... I have reinstalled the OS and everything but still the same&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 11 Dec 2009 12:07:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/vg-script/m-p/5213912#M465407</guid>
      <dc:creator>David Willams</dc:creator>
      <dc:date>2009-12-11T12:07:46Z</dc:date>
    </item>
    <item>
      <title>Re: VG Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/vg-script/m-p/5213913#M465408</link>
      <description>Sorry, I don't have something to publish.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 11 Dec 2009 12:43:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/vg-script/m-p/5213913#M465408</guid>
      <dc:creator>Torsten.</dc:creator>
      <dc:date>2009-12-11T12:43:17Z</dc:date>
    </item>
    <item>
      <title>Re: VG Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/vg-script/m-p/5213914#M465409</link>
      <description>Can I install hpvm 4.1 on below&lt;BR /&gt;&lt;BR /&gt;# uname -a&lt;BR /&gt;HP-UX rx26-161 B.11.31 U ia64 3206393905 unlimited-user license&lt;BR /&gt;[rx26-161]/ &lt;BR /&gt;# &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 11 Dec 2009 13:13:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/vg-script/m-p/5213914#M465409</guid>
      <dc:creator>David Willams</dc:creator>
      <dc:date>2009-12-11T13:13:14Z</dc:date>
    </item>
    <item>
      <title>Re: VG Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/vg-script/m-p/5213915#M465410</link>
      <description>Opps sorry wrong thread</description>
      <pubDate>Fri, 11 Dec 2009 13:13:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/vg-script/m-p/5213915#M465410</guid>
      <dc:creator>David Willams</dc:creator>
      <dc:date>2009-12-11T13:13:32Z</dc:date>
    </item>
    <item>
      <title>Re: VG Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/vg-script/m-p/5213916#M465411</link>
      <description>Too many open threads?&lt;BR /&gt;&lt;BR /&gt;;-)&lt;BR /&gt;&lt;BR /&gt;But yes, you can.</description>
      <pubDate>Fri, 11 Dec 2009 13:17:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/vg-script/m-p/5213916#M465411</guid>
      <dc:creator>Torsten.</dc:creator>
      <dc:date>2009-12-11T13:17:55Z</dc:date>
    </item>
    <item>
      <title>Re: VG Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/vg-script/m-p/5213917#M465412</link>
      <description>&amp;gt; What is filesystem.txt ???&lt;BR /&gt;&amp;gt; and how does it look like&lt;BR /&gt;&lt;BR /&gt;I guess, this everyone is asking who is confronted with this script.&lt;BR /&gt;It really would have been nice by the script's author if he had dropped a comment line what the contents of the filesystem.txt file is supposed to be and what format it should have.&lt;BR /&gt;As he didn't, the user will have to "reverse engineer" by looking at the various awk statements that refer to $TABLE spread over several functions.&lt;BR /&gt;&lt;BR /&gt;&amp;gt; If this is not the correct one... &lt;BR /&gt;&amp;gt; can someone give me a script to create multiple VG's and LV's&lt;BR /&gt;&lt;BR /&gt;What would be the "correct" script for your task?&lt;BR /&gt;I think it would be easier to write you own script or disclose your requirements to the forum's community and hope to get a few hints how to tackle the task.&lt;BR /&gt;&lt;BR /&gt;I think it is no great loss if you dismiss this script.&lt;BR /&gt;It doesn't look that convincing to me.&lt;BR /&gt;(e.g. many useless uses of echo etc.)</description>
      <pubDate>Fri, 11 Dec 2009 14:17:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/vg-script/m-p/5213917#M465412</guid>
      <dc:creator>Ralph Grothe</dc:creator>
      <dc:date>2009-12-11T14:17:24Z</dc:date>
    </item>
    <item>
      <title>Re: VG Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/vg-script/m-p/5213918#M465413</link>
      <description>.</description>
      <pubDate>Sat, 12 Dec 2009 12:19:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/vg-script/m-p/5213918#M465413</guid>
      <dc:creator>David Willams</dc:creator>
      <dc:date>2009-12-12T12:19:22Z</dc:date>
    </item>
  </channel>
</rss>

