<?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: Scripts for ServiceGuard (chown, chmod) in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/scripts-for-serviceguard-chown-chmod/m-p/4412757#M672189</link>
    <description>Hi Fernando&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Take in consideration that if you create new LV's you need to change your package configuration.&lt;BR /&gt;&lt;BR /&gt;I also think that you must consider do this manually.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Tue, 05 May 2009 08:47:55 GMT</pubDate>
    <dc:creator>nightwich</dc:creator>
    <dc:date>2009-05-05T08:47:55Z</dc:date>
    <item>
      <title>Scripts for ServiceGuard (chown, chmod)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripts-for-serviceguard-chown-chmod/m-p/4412752#M672184</link>
      <description>I have a customer with a ServiceGuard cluster (two nodes), HP-UX 11.11&lt;BR /&gt;&lt;BR /&gt;He frecuently creates logical volumes on that cluster, but he forgets do the followings tasks:&lt;BR /&gt;vgexport&lt;BR /&gt;vgimport&lt;BR /&gt;chmod&lt;BR /&gt;chown&lt;BR /&gt;&lt;BR /&gt;I need scripts for automaticaly do that task for client.&lt;BR /&gt;&lt;BR /&gt;Any idea??</description>
      <pubDate>Mon, 04 May 2009 17:34:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripts-for-serviceguard-chown-chmod/m-p/4412752#M672184</guid>
      <dc:creator>Fernando Boza</dc:creator>
      <dc:date>2009-05-04T17:34:02Z</dc:date>
    </item>
    <item>
      <title>Re: Scripts for ServiceGuard (chown, chmod)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripts-for-serviceguard-chown-chmod/m-p/4412753#M672185</link>
      <description>Shalom,&lt;BR /&gt;&lt;BR /&gt;Honestly:&lt;BR /&gt;&lt;BR /&gt;I'd create a checklist on paper and make him put it up where he can see it in the office.&lt;BR /&gt;&lt;BR /&gt;failing that:&lt;BR /&gt;&lt;BR /&gt;I'd create a script that does these tasks and accepts the volume group name as $1 and disks involved as $2 etc.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Mon, 04 May 2009 19:46:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripts-for-serviceguard-chown-chmod/m-p/4412753#M672185</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2009-05-04T19:46:35Z</dc:date>
    </item>
    <item>
      <title>Re: Scripts for ServiceGuard (chown, chmod)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripts-for-serviceguard-chown-chmod/m-p/4412754#M672186</link>
      <description>&lt;!--!*#--&gt;Hey;&lt;BR /&gt;&lt;BR /&gt;While it'd be great if the customer would remember, everyone makes mistakes.  The more people you have managing systems, the more likely those mistakes are too.&lt;BR /&gt;&lt;BR /&gt;My client has a number of clusters some of which use EMC timefinder to copy the data to remote systems for backups.&lt;BR /&gt;&lt;BR /&gt;This client's issue was that the map files on the backup servers weren't always in sync with the ones actually running production.  Go figure on how well that made database backups work.&lt;BR /&gt;&lt;BR /&gt;I wrote a script that runs on all the clusters that reads in a data file formatted as follows:&lt;BR /&gt;&lt;BR /&gt;########################################################################&lt;BR /&gt;# vgs.tbl:  Table of volume group information used by /root/bin/get_maps&lt;BR /&gt;#           to obtain vg maps and transfer them to other clustser nodes&lt;BR /&gt;#           and to the backup server.&lt;BR /&gt;########################################################################&lt;BR /&gt;# Pri    Alt      VG              Minor     Sid   Pkg       Bdir&lt;BR /&gt;########################################################################&lt;BR /&gt;&lt;BR /&gt;The script runs preview exports for each of the volume groups, then using a null passphrased ssh key, secure copies the map files to the other node.  Then, if the system uses EMC timefinder (Bdir != N/A is the flag), it secure copies the map files up to the two netbackup media servers.&lt;BR /&gt;&lt;BR /&gt;Finally, as a last step, it runs another script called reimport on the other node which uses that same vgs.tbl as input to reimport the volume groups associated with the SAP sid.&lt;BR /&gt;&lt;BR /&gt;This script runs every day at 1700 right before the backups are scheduled to kick off.  We haven't had a bit of problems with teh map files not being in sync since then.&lt;BR /&gt;&lt;BR /&gt;Another problem we've had in the past is raw volumes not having the ownership updated on them.  vgimport sets ownership on all lv devs to root:sys.  If you're using raw devs in oracle or informix, this poses a problem - particularly if you automatically import the vgs as described above.&lt;BR /&gt;&lt;BR /&gt;I define a function in package control scripts that updates the ownership of all raw devices in the appropriate volume groups.  Fortunately, the basis/dba folk keep the raw devices in distinct volume groups; easier to script that way.&lt;BR /&gt;&lt;BR /&gt;function update_owner&lt;BR /&gt;{  Inst=$1&lt;BR /&gt;   owner=$2&lt;BR /&gt;   set -A vgs $(vgdisplay | grep -i 'vg name' | grep -v vg00 | \&lt;BR /&gt;      grep data | grep -i ${Inst} | awk '{print substr($NF,6)}')&lt;BR /&gt;   owner="${owner}:dba"&lt;BR /&gt;   Date=$(date "+%x %X")&lt;BR /&gt;&lt;BR /&gt;   for vg in ${vgs[*]}&lt;BR /&gt;   do&lt;BR /&gt;      printf "%-18s Updating ownership of %s raw volumes\n" "${Date}" ${vg}&lt;BR /&gt;      for lv in $(vgdisplay -v ${vg} | grep -i 'lv name' | awk '{print $NF}')&lt;BR /&gt;      do&lt;BR /&gt;         chown ${owner} ${lv%/*}/r${lv##*/}&lt;BR /&gt;      done&lt;BR /&gt;   done&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;Calling it looks like:&lt;BR /&gt;&lt;BR /&gt;function customer_defined_run_cmds&lt;BR /&gt;{&lt;BR /&gt;   update_owner E1P orae1p&lt;BR /&gt;   /etc/cmcluster/E1P/sapdb.cntl startDB E1P&lt;BR /&gt;... rest snipped.&lt;BR /&gt;&lt;BR /&gt;Like I said, remembering and/or not making mistakes would be the best bet, but we're all human.  Automating repetitious tasks helps prevent human error mistakes and forgetfulness.&lt;BR /&gt;&lt;BR /&gt;HTH;&lt;BR /&gt;&lt;BR /&gt;Doug O'Leary&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 04 May 2009 20:18:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripts-for-serviceguard-chown-chmod/m-p/4412754#M672186</guid>
      <dc:creator>Doug O'Leary</dc:creator>
      <dc:date>2009-05-04T20:18:50Z</dc:date>
    </item>
    <item>
      <title>Re: Scripts for ServiceGuard (chown, chmod)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripts-for-serviceguard-chown-chmod/m-p/4412755#M672187</link>
      <description>&lt;!--!*#--&gt;A script for syncing the LVM state? Instead of I'd suggest you a check-script that compare the control-scripts for the packages, counts the disks on each node, etc... &lt;BR /&gt;vgexport/vgimport in a script can be very dangerous, i'd prefer just a check-script and manual intervention in case of failures. &lt;BR /&gt;This is the way we do it, we wrote some scripts and that we are using nagios.&lt;BR /&gt;</description>
      <pubDate>Tue, 05 May 2009 08:09:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripts-for-serviceguard-chown-chmod/m-p/4412755#M672187</guid>
      <dc:creator>Viktor Balogh</dc:creator>
      <dc:date>2009-05-05T08:09:52Z</dc:date>
    </item>
    <item>
      <title>Re: Scripts for ServiceGuard (chown, chmod)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripts-for-serviceguard-chown-chmod/m-p/4412756#M672188</link>
      <description>It is clear that key-based authentication is required, you need at least a central server with keys to every machine.&lt;BR /&gt;&lt;BR /&gt;Anyway, it is very hard to write a script for an unknown environment....&lt;BR /&gt;(and please don't attach any specs here, I won't write this script, I don't like 'remote developing', there's too much to test, etc...)&lt;BR /&gt;</description>
      <pubDate>Tue, 05 May 2009 08:14:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripts-for-serviceguard-chown-chmod/m-p/4412756#M672188</guid>
      <dc:creator>Viktor Balogh</dc:creator>
      <dc:date>2009-05-05T08:14:07Z</dc:date>
    </item>
    <item>
      <title>Re: Scripts for ServiceGuard (chown, chmod)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripts-for-serviceguard-chown-chmod/m-p/4412757#M672189</link>
      <description>Hi Fernando&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Take in consideration that if you create new LV's you need to change your package configuration.&lt;BR /&gt;&lt;BR /&gt;I also think that you must consider do this manually.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 05 May 2009 08:47:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripts-for-serviceguard-chown-chmod/m-p/4412757#M672189</guid>
      <dc:creator>nightwich</dc:creator>
      <dc:date>2009-05-05T08:47:55Z</dc:date>
    </item>
  </channel>
</rss>

