<?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: Script for VG and LV create in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script-for-vg-and-lv-create/m-p/5136997#M451571</link>
    <description>this script extends file systems at boot time. (pls edit as per your requirements)&lt;BR /&gt;&lt;BR /&gt;Rgds,&lt;BR /&gt;Johnson</description>
    <pubDate>Thu, 23 Oct 2008 01:24:57 GMT</pubDate>
    <dc:creator>Johnson Punniyalingam</dc:creator>
    <dc:date>2008-10-23T01:24:57Z</dc:date>
    <item>
      <title>Script for VG and LV create</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-for-vg-and-lv-create/m-p/5136996#M451570</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I know how to do this from command line but does anyone has the scrip that I can modify and save time to create my VG's and LV's.&lt;BR /&gt;&lt;BR /&gt;I have lots of file systems that I need to create.&lt;BR /&gt;&lt;BR /&gt;Appreciate your help and thanks in advance.&lt;BR /&gt;&lt;BR /&gt;THX</description>
      <pubDate>Wed, 22 Oct 2008 21:35:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-for-vg-and-lv-create/m-p/5136996#M451570</guid>
      <dc:creator>Mike_305</dc:creator>
      <dc:date>2008-10-22T21:35:20Z</dc:date>
    </item>
    <item>
      <title>Re: Script for VG and LV create</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-for-vg-and-lv-create/m-p/5136997#M451571</link>
      <description>this script extends file systems at boot time. (pls edit as per your requirements)&lt;BR /&gt;&lt;BR /&gt;Rgds,&lt;BR /&gt;Johnson</description>
      <pubDate>Thu, 23 Oct 2008 01:24:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-for-vg-and-lv-create/m-p/5136997#M451571</guid>
      <dc:creator>Johnson Punniyalingam</dc:creator>
      <dc:date>2008-10-23T01:24:57Z</dc:date>
    </item>
    <item>
      <title>Re: Script for VG and LV create</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-for-vg-and-lv-create/m-p/5136998#M451572</link>
      <description>Make some tests and make one, suitable for your needs. You should consider with: &lt;BR /&gt; - maxvg kernel parameter;&lt;BR /&gt; - fing higher /dev/*/group number;&lt;BR /&gt; - check for duplicate VG name;&lt;BR /&gt; - create VG;&lt;BR /&gt; - create LV;&lt;BR /&gt; - mounpoints if necessary ...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;ivan</description>
      <pubDate>Thu, 23 Oct 2008 06:07:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-for-vg-and-lv-create/m-p/5136998#M451572</guid>
      <dc:creator>Ivan Krastev</dc:creator>
      <dc:date>2008-10-23T06:07:27Z</dc:date>
    </item>
    <item>
      <title>Re: Script for VG and LV create</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-for-vg-and-lv-create/m-p/5136999#M451573</link>
      <description>It's a bitz hard to suggest, because there are so many choices:&lt;BR /&gt;&lt;BR /&gt;- LVM ver 1.0, 2.0, 2.1&lt;BR /&gt;- OS version&lt;BR /&gt;- multipathing&lt;BR /&gt;- striping&lt;BR /&gt;- mirroring&lt;BR /&gt;- ...&lt;BR /&gt;&lt;BR /&gt;It always depends on your needs ...</description>
      <pubDate>Thu, 23 Oct 2008 06:11:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-for-vg-and-lv-create/m-p/5136999#M451573</guid>
      <dc:creator>Torsten.</dc:creator>
      <dc:date>2008-10-23T06:11:06Z</dc:date>
    </item>
    <item>
      <title>Re: Script for VG and LV create</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-for-vg-and-lv-create/m-p/5137000#M451574</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I think you are new to HPUX. VG creation is not a regular OR day to day activity. And the parameters used to create VG and LV keeps on change depending on your DB, Apps etc..... as mentioned by Torsten. If you want to create lots LV and VG's with same parameters, please come up with details of your server and get more specific answer.&lt;BR /&gt;&lt;BR /&gt;Rgds&lt;BR /&gt;Sreekanth</description>
      <pubDate>Thu, 23 Oct 2008 10:26:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-for-vg-and-lv-create/m-p/5137000#M451574</guid>
      <dc:creator>sreekanthtm</dc:creator>
      <dc:date>2008-10-23T10:26:42Z</dc:date>
    </item>
    <item>
      <title>Re: Script for VG and LV create</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-for-vg-and-lv-create/m-p/5137001#M451575</link>
      <description>A script like that would be big, if it needed to take all the possibilities into consideration.&lt;BR /&gt;&lt;BR /&gt;You need to think about the needs that you have and what variables you would like to specify.&lt;BR /&gt;&lt;BR /&gt;The script is not tested, i don't have a HPUX machine at hand :-), so it is from memory, but it is something to build on.&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/ksh&lt;BR /&gt;&lt;BR /&gt;if [ $# -ne 1 ]&lt;BR /&gt;then&lt;BR /&gt; echo "USAGES: $0 &lt;DISK&gt;"&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;# c1d1t1&lt;BR /&gt;DISK=$1&lt;BR /&gt;print -n "type new vgname: "; read VGNAME&lt;BR /&gt;print -n "type new lvname: "; read LVNAME&lt;BR /&gt;print -n "type new lvsize: "; read LVSIZE&lt;BR /&gt;&lt;BR /&gt;# standard names&lt;BR /&gt;# VGNUM=$(echo $VGNAME | awk -Fg '{print $2}'&lt;BR /&gt;# else&lt;BR /&gt;print -n "type the vgnumber (01 for vg01) : "; read VGNUM&lt;BR /&gt;&lt;BR /&gt;pvcreate /dev/rdsk/${DISK}&lt;BR /&gt;mkdir /dev/${VGNAME}&lt;BR /&gt;mknod /dev/${VGNAME}/group -c 64 0x${VGNUM}000&lt;BR /&gt;vgcreate ${VGNAME} /dev/dsk/${DISK}&lt;BR /&gt;lvcreate -L ${LVSIZE} -n ${LVNAME} /dev/${VGNAME}&lt;BR /&gt;&lt;BR /&gt;fsadm -F vxfs -o largefiles /dev/${VGNAME}/${LVNAME}&lt;BR /&gt;&lt;BR /&gt;echo "rember to put this volume into fstab"&lt;/DISK&gt;</description>
      <pubDate>Thu, 23 Oct 2008 11:12:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-for-vg-and-lv-create/m-p/5137001#M451575</guid>
      <dc:creator>Jannik</dc:creator>
      <dc:date>2008-10-23T11:12:04Z</dc:date>
    </item>
    <item>
      <title>Re: Script for VG and LV create</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-for-vg-and-lv-create/m-p/5137002#M451576</link>
      <description>Hello All,&lt;BR /&gt;&lt;BR /&gt;Thanks for the reply; I am looking for suggestion related to Volume group creation and File system related steps to be put in scripts.&lt;BR /&gt;&lt;BR /&gt;Appreciate your help.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance.</description>
      <pubDate>Thu, 23 Oct 2008 16:23:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-for-vg-and-lv-create/m-p/5137002#M451576</guid>
      <dc:creator>Mike_305</dc:creator>
      <dc:date>2008-10-23T16:23:51Z</dc:date>
    </item>
    <item>
      <title>Re: Script for VG and LV create</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-for-vg-and-lv-create/m-p/5137003#M451577</link>
      <description>I know you want to have a script, but how should we know what you need in detail?&lt;BR /&gt;&lt;BR /&gt;Do you need mirrored and/or striped LVOLs? How many disks per VG, how many alternate pathes. Do you have more alternates than supported? This would require additional checks! Do you run 11.31? In this case you don't need to check and create the group files. What maximum disk size you will have in future? How large do you want to have the PE size? Do you want to do any manual load balancing over several pathes? Do you have add. multipathing software?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Only a few questions out of many questions ...</description>
      <pubDate>Thu, 23 Oct 2008 16:28:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-for-vg-and-lv-create/m-p/5137003#M451577</guid>
      <dc:creator>Torsten.</dc:creator>
      <dc:date>2008-10-23T16:28:53Z</dc:date>
    </item>
    <item>
      <title>Re: Script for VG and LV create</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-for-vg-and-lv-create/m-p/5137004#M451578</link>
      <description>Hello All,&lt;BR /&gt;&lt;BR /&gt;Running 11.23&lt;BR /&gt;&lt;BR /&gt;Thanks for your help.  I did not want get too complicated on this.  I have script like this and it is bunch of â  for loopsâ  .&lt;BR /&gt;What I wanted is few idea on how can prompt the script so that I can enter VG name and minor numbers mknod command.  If I can prompt then I don't have put that in script.&lt;BR /&gt;&lt;BR /&gt;Also want to find out how prompt with "question" if you want to continue ot not, and if the answer is "NO" then exit 0, with running any commands.&lt;BR /&gt;&lt;BR /&gt;I am doing mkdir and mknods manually.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance for your time and help.&lt;BR /&gt;&lt;BR /&gt;=============================== &lt;BR /&gt;set -A disk $(cat /tmp/disk)&lt;BR /&gt;&lt;BR /&gt;sleep 2&lt;BR /&gt;&lt;BR /&gt;for disk in ${disk[*]}&lt;BR /&gt;do&lt;BR /&gt;   pvcreate /dev/rdsk/${disk##*/}&lt;BR /&gt;        sleep 2&lt;BR /&gt;   vgcreate -e 9600 -p 32 -s 32 /dev/$VG_NAME /dev/dsk/${disk##*/}&lt;BR /&gt;        sleep 2&lt;BR /&gt;sleep 2&lt;BR /&gt;done&lt;BR /&gt;============================== &lt;BR /&gt;for X in 1 2 3&lt;BR /&gt;do&lt;BR /&gt;lvcreate -L $LV_SZ_lvol${X}_a -n lvol${X} /dev/$VG_NAME&lt;BR /&gt;sleep 5&lt;BR /&gt;done&lt;BR /&gt;=============================== &lt;BR /&gt;for X in 1 2 3&lt;BR /&gt;do&lt;BR /&gt;newfs -F vxfs -o largefile /dev/$VG_NAME/rlvol${X}&lt;BR /&gt;sleep 10&lt;BR /&gt;done</description>
      <pubDate>Thu, 23 Oct 2008 19:25:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-for-vg-and-lv-create/m-p/5137004#M451578</guid>
      <dc:creator>Mike_305</dc:creator>
      <dc:date>2008-10-23T19:25:21Z</dc:date>
    </item>
    <item>
      <title>Re: Script for VG and LV create</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-for-vg-and-lv-create/m-p/5137005#M451579</link>
      <description>&lt;!--!*#--&gt;Hi:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; What I wanted is few idea on how can prompt the script so that I can enter VG name and minor numbers mknod command...&lt;BR /&gt;&lt;BR /&gt;You could use something like this:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;typeset    VGNAME&lt;BR /&gt;typeset    MINORNBR&lt;BR /&gt;typeset -l REPLY&lt;BR /&gt;while true&lt;BR /&gt;do&lt;BR /&gt;    echo "Enter VG Name: \c"&lt;BR /&gt;    read VGNAME&lt;BR /&gt;    echo "Enter minor #: \c"&lt;BR /&gt;    read MINORNBR&lt;BR /&gt;    echo "The VG NAME will be '${VGNAME}'"&lt;BR /&gt;    echo "The minor # will be '${MINORNBR}'"&lt;BR /&gt;    echo "Continue y|n: \c"&lt;BR /&gt;    read REPLY&lt;BR /&gt;    [ "${REPLY}" = "y" ] &amp;amp;&amp;amp; break || exit 0&lt;BR /&gt;done&lt;BR /&gt;echo "now continuing..."&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;</description>
      <pubDate>Thu, 23 Oct 2008 20:00:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-for-vg-and-lv-create/m-p/5137005#M451579</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-10-23T20:00:46Z</dc:date>
    </item>
    <item>
      <title>Re: Script for VG and LV create</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-for-vg-and-lv-create/m-p/5137006#M451580</link>
      <description>Hello James,&lt;BR /&gt;&lt;BR /&gt;After your suggestion, it was good but still trying to fix 2 things.  I have worked around for the issue but since I am putting all these pieces in place, might as well do this one to.&lt;BR /&gt;&lt;BR /&gt;Thanks for your help in advance&lt;BR /&gt;&lt;BR /&gt;If anyone else has any suggestion please let me know.&lt;BR /&gt;&lt;BR /&gt;Appreciate your help and time.&lt;BR /&gt;&lt;BR /&gt;============================&lt;BR /&gt;Q-1 What is the best way to grad the next available MINOR NUMBER out of my mknod listing?  I am running following.&lt;BR /&gt;&lt;BR /&gt;ls -l /dev/*/group | awk '{printf "%s\n", $6}' | sort â  n&lt;BR /&gt;============================== &lt;BR /&gt;Q-2 For my LVOL creations I have lvol sizes are in the scrips and that is working fine when I have following.&lt;BR /&gt; &lt;BR /&gt;lvcreate -L $LVSZ_1 -n lvol1 /dev/$VG_NAME â   (Manual Command works fine)&lt;BR /&gt;&lt;BR /&gt;lvcreate -L $LVSZ_2 -n lvol2 /dev/$VG_NAME&lt;BR /&gt;&lt;BR /&gt;LOOP is not grabbing my LVOL size that was set in variables.&lt;BR /&gt;&lt;BR /&gt;for X in 1 2 3&lt;BR /&gt;do&lt;BR /&gt;lvcreate -L $LVSZ_${X} -n lvol${X} /dev/$VG_NAME&lt;BR /&gt;done&lt;BR /&gt;=================================</description>
      <pubDate>Fri, 24 Oct 2008 16:50:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-for-vg-and-lv-create/m-p/5137006#M451580</guid>
      <dc:creator>Mike_305</dc:creator>
      <dc:date>2008-10-24T16:50:25Z</dc:date>
    </item>
    <item>
      <title>Re: Script for VG and LV create</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-for-vg-and-lv-create/m-p/5137007#M451581</link>
      <description>THX 4 all your help.</description>
      <pubDate>Mon, 27 Oct 2008 18:31:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-for-vg-and-lv-create/m-p/5137007#M451581</guid>
      <dc:creator>Mike_305</dc:creator>
      <dc:date>2008-10-27T18:31:00Z</dc:date>
    </item>
  </channel>
</rss>

