Fujitsu Notes: Difference between revisions

From Alteeve Wiki
Jump to navigation Jump to search
No edit summary
Line 36: Line 36:


* [http://kb.lsi.com/KnowledgebaseArticle16516.aspx Cheat-sheet]
* [http://kb.lsi.com/KnowledgebaseArticle16516.aspx Cheat-sheet]
== APC UPSes ==
This covers the setup of APC UPSes with network management cards installed.
{{note|1=These are specific links. They may break as updated packages are released.}}
Easiest way to setup <span class="code">apcupsd</span> is via [[EPEL]]. This will install it in such a way that EPEL packages will never mess with core RHEL packages. However, if the client has official RHEL support, consult with Red Hat to ensure this doesn't violate support. If it does, discuss alternative options.
<source lang="bash">
yum -y install yum-protectbase
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt # import keys
rpm -K rpmforge-release-0.5.2-2.el6.rf.*.rpm # verify package integrity
rpm -i rpmforge-release-0.5.2-2.el6.rf.*.rpm # install
# install EPEL
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-7.noarch.rpm
</source>
Now edit the repo to protect the base RPMs.
<source lang="bash">
cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.orig
vim /etc/yum.repos.d/CentOS-Base.repo
</source>
Add <span class="code">protect=1</span> to the <span class="code">[base]</span>, <span class="code">[updates]</span>, <span class="code">[extras]</span> and <span class="code">[contrib]</span>. Note that [[RHEL]] machines may not have all these repos.
<source lang="bash">
diff -u /etc/yum.repos.d/CentOS-Base.repo.orig /etc/yum.repos.d/CentOS-Base.repo
</source>
<source lang="diff">
--- /etc/yum.repos.d/CentOS-Base.repo.orig 2012-08-19 15:05:24.350787587 -0400
+++ /etc/yum.repos.d/CentOS-Base.repo 2012-08-19 15:04:58.000000000 -0400
@@ -16,6 +16,7 @@
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
+protect=1
#released updates
[updates]
@@ -24,6 +25,7 @@
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
+protect=1
#additional packages that may be useful
[extras]
@@ -32,6 +34,7 @@
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
+protect=1
#additional packages that extend functionality of existing packages
[centosplus]
@@ -50,3 +53,4 @@
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
+protect=1
</source>
Now unprotect the [[EPEL]] repo as any conflicts that might arise should be replaced by the official versions.
<source lang="bash">
cp /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo.orig
vim /etc/yum.repos.d/epel.repo
</source>
This time, add <span class="code">protect=0</span> to <span class="code">[epel]</span>, <span class="code">[epel-debuginfo]</span> and <span class="code">[epel-source]</span>.
<source lang="bash">
diff -u /etc/yum.repos.d/epel.repo.orig /etc/yum.repos.d/epel.repo
</source>
<source lang="diff">
--- /etc/yum.repos.d/epel.repo.orig 2012-08-19 15:24:47.631307949 -0400
+++ /etc/yum.repos.d/epel.repo 2012-08-19 15:26:31.119599427 -0400
@@ -6,6 +6,7 @@
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
+protect=0
[epel-debuginfo]
name=Extra Packages for Enterprise Linux 6 - $basearch - Debug
@@ -15,6 +16,7 @@
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
gpgcheck=1
+protect=0
[epel-source]
name=Extra Packages for Enterprise Linux 6 - $basearch - Source
@@ -24,3 +26,4 @@
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
gpgcheck=1
+protect=0
</source>
Now install <span class="code">apcupsd</span>
<source lang="bash">
yum -y install apcupsd
</source>
Now setup the configuration file:
<source lang="bash">
cp /etc/apcupsd/apcupsd.conf /etc/apcupsd/apcupsd.conf.orig
vim /etc/apcupsd/apcupsd.conf
</source>
The main arguments to change/set are;
* <span class="code">UPSNAME</span> - Important if you will be setting up two or more UPSes. Optional otherwise.
* <span class="code">UPSTYPE</span> - This needs to be set to <span class="code">snmp</span> to enable network access to the UPS's stats.
* <span class="code">DEVICE</span> - This is where we tell the <span class="code">apcupsd</span> daemon where to find the UPS. For most people, this should be set to <span class="code">10.20.3.1:161:APC:private</span>, substituting <span class="code">10.20.3.1</span> for the IP of your UPS.
In our case, we don't want <span class="code">apcupsd</span> to shut down the server. We'll handle the shutdown using [[AN!CM]]. We also want to tighten up the check time to 30 seconds. If you are not using this with an [[AN!Cluster]], then you may wish to alter how these are set. So, for our needs, we also want to set the following;
* <span class="code">POLLTIME</span> - Set this to the number of seconds you want <span class="code">apcupsd</span> to check for changes in the UPS. The lower this number, the higher the overhead.
* <span class="code">BATTERYLEVEL</span> - This sets the remaining battery percentage at which point <span class="code">apcupsd</span> will initiate a shutdown of the host.
* <span class="code">MINUTES</span> - This sets the remaining nunmber of minutes (according to the UPS itself) at which point <span class="code">apcupsd</span> will initiate a shutdown of the host. In our case, AN!CM will trigger a withdrawl sooner than this anyway.
<source lang="bash">
diff -u /etc/apcupsd/apcupsd.conf.orig /etc/apcupsd/apcupsd.conf
</source>
<source lang="diff">
--- /etc/apcupsd/apcupsd.conf.orig 2012-08-19 16:03:10.521542722 -0400
+++ /etc/apcupsd/apcupsd.conf 2012-08-19 16:47:26.938607712 -0400
@@ -12,7 +12,7 @@
#  Use this to give your UPS a name in log files and such. This
#  is particulary useful if you have multiple UPSes. This does not
#  set the EEPROM. It should be 8 characters or less.
-#UPSNAME
+UPSNAME an-u01
# UPSCABLE <cable>
#  Defines the type of cable connecting the UPS to your computer.
@@ -76,8 +76,8 @@
#                            3052. If this parameter is empty or missing, the
#                            default of 3052 will be used.
#
-UPSTYPE apcsmart
-DEVICE /dev/ttyS0
+UPSTYPE snmp
+DEVICE 10.20.3.1:161:APC:private
# POLLTIME <int>
#  Interval (in seconds) at which apcupsd polls the UPS for status. This
@@ -86,7 +86,7 @@
#  will improve apcupsd's responsiveness to certain events at the cost of
#  higher CPU utilization. The default of 60 is appropriate for most
#  situations.
-#POLLTIME 60
+POLLTIME 30
# LOCKFILE <path to lockfile>
#  Path for device lock file. Not used on Win32.
@@ -132,12 +132,12 @@
# If during a power failure, the remaining battery percentage
# (as reported by the UPS) is below or equal to BATTERYLEVEL,
# apcupsd will initiate a system shutdown.
-BATTERYLEVEL 5
+BATTERYLEVEL 1
# If during a power failure, the remaining runtime in minutes
# (as calculated internally by the UPS) is below or equal to MINUTES,
# apcupsd, will initiate a system shutdown.
-MINUTES 3
+MINUTES 1
# If during a power failure, the UPS has run on batteries for TIMEOUT
# many seconds or longer, apcupsd will initiate a system shutdown.
</source>
Now start the <span class="code">apcupsd</span> daemon.
<source lang="bash">
chkconfig apcupsd on
/etc/init.d/apcupsd start
</source>
<source lang="text">
Starting UPS monitoring:                                  [  OK  ]
</source>
You can confirm that it's working via <span class="code">apcaccess</span>
<source lang="bash">
apcaccess
</source>
<source lang="text">
APC      : 001,050,1228
DATE    : 2012-08-19 17:25:59 -0400 
HOSTNAME : an-c01n01.alteeve.ca
VERSION  : 3.14.10 (13 September 2011) redhat
UPSNAME  : APCUPS
CABLE    : Ethernet Link
DRIVER  : SNMP UPS Driver
UPSMODE  : Stand Alone
STARTTIME: 2012-08-19 17:24:58 -0400 
MODEL    : Smart-UPS 1500
STATUS  : ONLINE
LINEV    : 124.0 Volts
LOADPCT  :  16.0 Percent Load Capacity
BCHARGE  : 093.0 Percent
TIMELEFT :  71.0 Minutes
MBATTCHG : 1 Percent
MINTIMEL : 1 Minutes
MAXTIME  : 0 Seconds
MAXLINEV : 124.0 Volts
MINLINEV : 123.0 Volts
OUTPUTV  : 123.0 Volts
SENSE    : High
DWAKE    : 000 Seconds
DSHUTD  : 000 Seconds
DLOWBATT : 02 Minutes
LOTRANS  : 106.0 Volts
HITRANS  : 127.0 Volts
RETPCT  : 35594256.0 Percent
ITEMP    : 23.0 C Internal
ALARMDEL : 30 seconds
BATTV    : 27.0 Volts
LINEFREQ : 60.0 Hz
LASTXFER : Line voltage notch or spike
NUMXFERS : 0
TONBATT  : 0 seconds
CUMONBATT: 0 seconds
XOFFBATT : N/A
SELFTEST : OK
STESTI  : OFF
STATFLAG : 0x07000008 Status Flag
MANDATE  : 06/08/2012
SERIALNO : AS1223222656
BATTDATE : 06/08/2012
NOMOUTV  : 120 Volts
NOMBATTV : 35594256.0 Volts
HUMIDITY :  0.0 Percent
AMBTEMP  :  0.0 C
EXTBATTS : 35594256
BADBATTS : 0
FIRMWARE : UPS 08.3 / MCU 14.0
END APC  : 2012-08-19 17:26:28 -0400 
</source>
Likewise, you can test by pulling the UPS from the mains and within <span class="code">POLLTIME</span> seconds you should see a broadcast message on all terminals. Plug the UPS back into mains and again within <span class="code">POLLTIME</span> seconds you should see another broadcast saying that power has been restored.
<source lang="text">
Broadcast message from root@an-c01n01.alteeve.ca (Sun Aug 19 16:51:33 2012):
Power failure on UPS APCUPS. Running on batteries.
Broadcast message from root@an-c01n01.alteeve.ca (Sun Aug 19 16:52:09 2012):
Power has returned on UPS APCUPS...
</source>
Done!
=== Monitoring 2 or More APC UPSes at Once ===
{{note|1=This section is based off of [http://www.apcupsd.com/manual/manual.html#controlling-multiple-upses-on-one-machine this document] on the official <span class="code">apcupsd</span> website. However, changes are made to reflect our UPSes being network connected and specifically for [[EL6]].}}
To setup <span class="code">apcupsd</span> to support multiple APC UPSes, we need to duplicate the configuration file. To do this, first stop the <span class="code">apcupsd</span> daemon.
<source lang="bash">
/etc/init.d/apcupsd stop
</source>
<source lang="text">
Shutting down UPS monitoring:                              [  OK  ]
</source>
{{note|1=The new name of the configuration file needs to be in the format <span class="code">apcupsd.*.conf</span>. This tutorial stays in line with the original tutorial by using <span class="code">upsX</span>.}}
Next rename the existing stock configuration and then copy it for the second (and third...) UPSes.
<source lang="bash">
mv /etc/apcupsd/apcupsd.conf /etc/apcupsd/apcupsd.ups0.conf
cp /etc/apcupsd/apcupsd.ups0.conf /etc/apcupsd/apcupsd.ups1.conf
</source>
Edit the new <span class="code">apcupsd.ups1.conf</span> file to reflect the configuration of the second UPS. Note in a few key changes;
* <span class="code">DEVICE</span> - The <span class="code">vendor</span> portion has to change from <span class="code">APC</span> to <span class="code">APC_NOTRAP</span>. Without this change, both daemons will try to listen to the same port for SNMP traps and, thus, cause the second daemon to fail with the error <span class="code">bind: Address already in use</span> (only visible if the daemon is started manually with the <span class="code">-d 1</span> switch).
* The second daemon needs to have it's scripts set to a new, empty directory called <span class="code">/etc/apcupsd/null</span> to avoid conflicts. For us, this is fine because we won't be using <span class="code">apcupsd</span> to shutdown the hosts.
<source lang="bash">
vim /etc/apcupsd/apcupsd.ups1.conf
diff -u /etc/apcupsd/apcupsd.ups0.conf /etc/apcupsd/apcupsd.ups1.conf
</source>
<source lang="diff">
--- /etc/apcupsd/apcupsd.ups0.conf 2012-08-19 21:05:08.558601798 -0400
+++ /etc/apcupsd/apcupsd.ups1.conf 2012-08-19 21:05:22.035606926 -0400
@@ -12,7 +12,7 @@
#  Use this to give your UPS a name in log files and such. This
#  is particulary useful if you have multiple UPSes. This does not
#  set the EEPROM. It should be 8 characters or less.
-UPSNAME ups0
+UPSNAME ups1
# UPSCABLE <cable>
#  Defines the type of cable connecting the UPS to your computer.
@@ -77,7 +77,7 @@
#                            default of 3052 will be used.
#
UPSTYPE snmp
-DEVICE 10.20.3.1:161:APC_NOTRAP:private
+DEVICE 10.20.3.2:161:APC_NOTRAP:private
# POLLTIME <int>
#  Interval (in seconds) at which apcupsd polls the UPS for status. This
@@ -94,19 +94,19 @@
# SCRIPTDIR <path to script directory>
#  Directory in which apccontrol and event scripts are located.
-SCRIPTDIR /etc/apcupsd
+SCRIPTDIR /etc/apcupsd/null
# PWRFAILDIR <path to powerfail directory>
#  Directory in which to write the powerfail flag file. This file
#  is created when apcupsd initiates a system shutdown and is
#  checked in the OS halt scripts to determine if a killpower
#  (turning off UPS output power) is required.
-PWRFAILDIR /etc/apcupsd
+PWRFAILDIR /etc/apcupsd/null
# NOLOGINDIR <path to nologin directory>
#  Directory in which to write the nologin file. The existence
#  of this flag file tells the OS to disallow new logins.
-NOLOGINDIR /etc
+NOLOGINDIR /etc/apcupsd/null
#
@@ -199,11 +199,11 @@
#  It is not used unless NETSERVER is on. If you change this port,
#  you will need to change the corresponding value in the cgi directory
#  and rebuild the cgi programs.
-NISPORT 3551
+NISPORT 3552
# If you want the last few EVENTS to be available over the network
# by the network information server, you must define an EVENTSFILE.
-EVENTSFILE /var/log/apcupsd.0.events
+EVENTSFILE /var/log/apcupsd.1.events
# EVENTSFILEMAX <kilobytes>
#  By default, the size of the EVENTSFILE will be not be allowed to exceed
</source>
Now the tricky part... We need to alter the [[init.d]] script so that it fires multiple daemons, one for each configuration.
We can't make the usual backup, so we'll put a copy of the original version in the <span class="code">root</span> user's home directory.
<source lang="bash">
cp /etc/init.d/apcupsd /root/apcupsd.init.orig
</source>
Now you have two choices; Edit the init.d script yourself or download a copy from this website.
To download a updated/multi-UPS copy, run:
<source lang="bash">
rm -f /etc/init.d/apcupsd
wget https://alteeve.ca/files/apcupsd -O /etc/init.d/apcupsd
</source>
<source lang="bash">
--2012-08-19 18:47:03--  https://alteeve.ca/files/apcupsd
Resolving alteeve.ca... 64.34.141.3
Connecting to alteeve.ca|64.34.141.3|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1759 (1.7K) [text/plain]
Saving to: “/etc/init.d/apcupsd”
100%[==========================================================>] 1,759      --.-K/s  in 0s     
2012-08-19 18:47:03 (16.8 MB/s) - “/etc/init.d/apcupsd” saved [1759/1759]
</source>
'''''Alternatively''''';
Now to edit it to fire on multiple config files;
<source lang="bash">
vim /etc/init.d/apcupsd
diff -u /root/apcupsd.init.orig /etc/init.d/apcupsd
</source>
<source lang="diff">
--- /root/apcupsd.init.orig 2012-08-19 17:47:28.766433318 -0400
+++ /etc/init.d/apcupsd 2012-08-19 18:36:33.554601345 -0400
@@ -1,7 +1,7 @@
#! /bin/sh
#
# apcupsd      This shell script takes care of starting and stopping
-#       the apcupsd UPS monitoring daemon.
+#       the apcupsd UPS monitoring daemon. Multi-UPS version.
#
# chkconfig: 2345 60 99
# description: apcupsd monitors power and takes action if necessary
@@ -15,18 +15,24 @@
    start)
        rm -f /etc/apcupsd/powerfail
        rm -f /etc/nologin
-      echo -n "Starting UPS monitoring:"
-      daemon /sbin/apcupsd -f /etc/apcupsd/apcupsd.conf
-      RETVAL=$?
-      echo
-      [ $RETVAL -eq 0 ] && touch /var/lock/subsys/apcupsd
+      for conf in /etc/apcupsd/apcupsd.*.conf ; do
+          inst=`basename $conf`
+          echo -n "Starting UPS monitoring ($inst):"
+          daemon /sbin/apcupsd -f $conf -P /var/run/apcupsd-$inst.pid
+          RETVAL=$?
+          echo
+          [ $RETVAL -eq 0 ] && touch /var/lock/subsys/apcupsd-$inst
+      done
        ;;
    stop)
-      echo -n "Shutting down UPS monitoring:"
-      killproc apcupsd
-      echo
-      rm -f $APCPID
-      rm -f /var/lock/subsys/apcupsd
+      for conf in /etc/apcupsd/apcupsd.*.conf ; do
+          inst=`basename $conf`
+          echo -n "Shutting down UPS monitoring ($inst):"
+          killproc -p /var/run/apcupsd-$inst.pid apcupsd
+          echo
+          rm -f /var/run/apcupsd-$inst.pid
+          rm -f /var/lock/subsys/apcupsd-$inst
+      done
        ;;
    restart|force-reload)
        $0 stop
@@ -38,14 +44,16 @@
        exit 3
        ;;
    status)
-      status apcupsd
-      RETVAL=$?
-      if [ $RETVAL -eq 0 ]
-      then
-          /sbin/apcaccess status
-      else
-          exit $RETVAL
-      fi
+      for conf in /etc/apcupsd/apcupsd.*.conf ; do
+          inst=`basename $conf`
+          status -p /var/run/apcupsd-$inst.pid apcupsd-$inst
+          RETVAL=$?
+          if [ $RETVAL -eq 0 ]
+          then
+            NISPORT=`grep ^NISPORT < $conf | sed -e "s/NISPORT *\([0-9]\)/\1/"`
+            /sbin/apcaccess status localhost:$NISPORT | egrep "(STATUS)|(UPSNAME)"
+          fi
+      done
        ;;
    *)
        echo "Usage: $0 {start|stop|restart|status}"
</source>
With the new init.d script in place, we can restart the daemon. This time, two instances will start, one for each of our configurations.
<source lang="bash">
/etc/init.d/apcupsd start
</source>
<source lang="text">
Starting UPS monitoring (apcupsd.ups0.conf):              [  OK  ]
Starting UPS monitoring (apcupsd.ups1.conf):              [  OK  ]
</source>
Now confirm that both daemons actually started;
<source lang="bash">
/etc/init.d/apcupsd status
</source>
<source lang="text">
apcupsd-apcupsd.ups0.conf (pid  12424) is running...
UPSNAME  : APCUPS
STATUS  : ONLINE
apcupsd-apcupsd.ups1.conf (pid  12430) is running...
UPSNAME  : APCUPS
STATUS  : ONLINE
</source>
To check the states of each UPS will require calling <span class="code">apcaccess</span> using the arguments needed to talk to the appropriate <span class="code">apcupsd</span> daemon.
'''Check the first UPS''';
<source lang="bash">
apcaccess status localhost:3551
</source>
<source lang="text">
APC      : 001,050,1242
DATE    : 2012-08-19 21:33:09 -0400 
HOSTNAME : an-c01n01.alteeve.ca
VERSION  : 3.14.10 (13 September 2011) redhat
UPSNAME  : APCUPS
CABLE    : Ethernet Link
DRIVER  : SNMP UPS Driver
UPSMODE  : Stand Alone
STARTTIME: 2012-08-19 21:06:04 -0400 
MODEL    : Smart-UPS 1500
STATUS  : ONLINE
LINEV    : 123.0 Volts
LOADPCT  :  17.0 Percent Load Capacity
BCHARGE  : 100.0 Percent
TIMELEFT :  75.0 Minutes
MBATTCHG : 1 Percent
MINTIMEL : 1 Minutes
MAXTIME  : 0 Seconds
MAXLINEV : 124.0 Volts
MINLINEV : 123.0 Volts
OUTPUTV  : 123.0 Volts
SENSE    : High
DWAKE    : 000 Seconds
DSHUTD  : 000 Seconds
DLOWBATT : 02 Minutes
LOTRANS  : 106.0 Volts
HITRANS  : 127.0 Volts
RETPCT  : 31281168.0 Percent
ITEMP    : 25.0 C Internal
ALARMDEL : 30 seconds
BATTV    : 27.0 Volts
LINEFREQ : 60.0 Hz
LASTXFER : Line voltage notch or spike
NUMXFERS : 0
TONBATT  : 0 seconds
CUMONBATT: 0 seconds
XOFFBATT : N/A
SELFTEST : OK
STESTI  : OFF
STATFLAG : 0x07000008 Status Flag
MANDATE  : 06/08/2012
SERIALNO : xxxxxxxxxxxx
BATTDATE : 06/08/2012
NOMOUTV  : 120 Volts
NOMBATTV : 31281168.0 Volts
HUMIDITY : 6519592.0 Percent
AMBTEMP  : 6519592.0 C
EXTBATTS : 31281168
BADBATTS : 6519592
FIRMWARE : UPS 08.3 / MCU 14.0
END APC  : 2012-08-19 21:33:19 -0400 
</source>
'''Check the second UPS''';
<source lang="bash">
apcaccess status localhost:3552
</source>
<source lang="text">
APC      : 001,050,1240
DATE    : 2012-08-19 21:33:10 -0400 
HOSTNAME : pp-c01n01.plasticplus.ca
VERSION  : 3.14.10 (13 September 2011) redhat
UPSNAME  : APCUPS
CABLE    : Ethernet Link
DRIVER  : SNMP UPS Driver
UPSMODE  : Stand Alone
STARTTIME: 2012-08-19 21:06:04 -0400 
MODEL    : Smart-UPS 1500
STATUS  : ONLINE
LINEV    : 123.0 Volts
LOADPCT  :  16.0 Percent Load Capacity
BCHARGE  : 100.0 Percent
TIMELEFT :  77.0 Minutes
MBATTCHG : 1 Percent
MINTIMEL : 1 Minutes
MAXTIME  : 0 Seconds
MAXLINEV : 123.0 Volts
MINLINEV : 123.0 Volts
OUTPUTV  : 123.0 Volts
SENSE    : High
DWAKE    : 000 Seconds
DSHUTD  : 000 Seconds
DLOWBATT : 02 Minutes
LOTRANS  : 106.0 Volts
HITRANS  : 127.0 Volts
RETPCT  : 35442704.0 Percent
ITEMP    : 23.0 C Internal
ALARMDEL : 30 seconds
BATTV    : 27.0 Volts
LINEFREQ : 60.0 Hz
LASTXFER : No transfers since turnon
NUMXFERS : 0
TONBATT  : 0 seconds
CUMONBATT: 0 seconds
XOFFBATT : N/A
SELFTEST : OK
STESTI  : OFF
STATFLAG : 0x07000008 Status Flag
MANDATE  : 06/08/2012
SERIALNO : yyyyyyyyyyyy
BATTDATE : 06/08/2012
NOMOUTV  : 120 Volts
NOMBATTV : 35442704.0 Volts
HUMIDITY : 6519592.0 Percent
AMBTEMP  : 6519592.0 C
EXTBATTS : 35442704
BADBATTS : 6519592
FIRMWARE : UPS 08.3 / MCU 14.0
END APC  : 2012-08-19 21:33:20 -0400 
</source>
That's it! You can now check the status of each node.


= Creating a Backup Set =
= Creating a Backup Set =
Line 680: Line 73:
tar -cvzf base_an-c01n01.tar.gz etc root
tar -cvzf base_an-c01n01.tar.gz etc root
</source>
</source>


<span class="code"></span>
<span class="code"></span>
<source lang="bash">
<source lang="bash">
</source>
</source>


{{footer}}
{{footer}}

Revision as of 01:45, 20 August 2012

 AN!Wiki :: How To :: Fujitsu Notes

This covers specific setup notes for Fujitsu Primenergy servers on EL6.

PrimeEnergy RX300 G7

RAID

Install the MegaCLI tools;

Check for an updates MegaCLI from here (under "Management Software and Tools"). If there is an updated version, follow the

mkdir ~/temp
cd ~/temp
# Download the updated 8.04.07_MegaCLI.zip here
unzip 8.04.07_MegaCLI.zip
unzip CLI_Lin_8.04.07.zip 
unzip MegaCliLin.zip
rpm -Uvh MegaCli-8.04.07-1.noarch.rpm Lib_Utils-1.00-09.noarch.rpm

# This makes MegaCli64 app available without the full path
ln -s /opt/MegaRAID/MegaCli/MegaCli64 /sbin/

If you want to install from the AN!Cache, you can do this;

rpm -Uvh https://alteeve.com/files/Lib_Utils-1.00-09.noarch.rpm https://alteeve.com/files/MegaCli-8.04.07-1.noarch.rpm

# This makes MegaCli64 app available without the full path
ln -s /opt/MegaRAID/MegaCli/MegaCli64 /sbin/

Once installed, verify that you can see your hardware:

Creating a Backup Set

ToDo: Explain this...

mkdir ~/base
cd ~/base
mkdir root
mkdir -p etc/sysconfig/network-scripts/

rsync -av /root/.bashrc root/
rsync -av /root/.ssh root/
rsync -av /etc/sysconfig/network-scripts/ifcfg-{eth*,bond*,vbr*} etc/sysconfig/network-scripts/
rsync -av /etc/sysconfig/network etc/sysconfig/
rsync -av /etc/hosts etc/
rsync -av /etc/ssh etc/

# If you have the cluster built and want to backup it's configs.
mkdir etc/cluster
mkdir etc/lvm
rsync -av /etc/cluster/cluster.conf etc/cluster/
rsync -av /etc/lvm/lvm.conf etc/lvm/
# NOTE: DRBD won't work until you've manually created the partitions.
rsync -av /etc/drbd.d etc/

# If you had to manually set the UUID in libvirtd;
mkdir etc/libvirt
rsync -av /etc/libvirt/libvirt.conf etc/libvirt/

# If you're running RHEL and want to backup your registration info;
rsync -av /etc/sysconfig/rhn etc/sysconfig/

# Pack it up
# NOTE: Change the name to suit your node.
tar -cvzf base_an-c01n01.tar.gz etc root

 

Any questions, feedback, advice, complaints or meanderings are welcome.
Alteeve's Niche! Enterprise Support:
Alteeve Support
Community Support
© Alteeve's Niche! Inc. 1997-2024   Anvil! "Intelligent Availability®" Platform
legal stuff: All info is provided "As-Is". Do not use anything here unless you are willing and able to take responsibility for your own actions.