Fujitsu Notes: Difference between revisions

From Alteeve Wiki
Jump to navigation Jump to search
Line 299: Line 299:
=== Monitoring 2 or More APC UPSes at Once ===
=== 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.
<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 16:47:26.938607712 -0400
+++ /etc/apcupsd/apcupsd.ups1.conf 2012-08-19 17:42:10.041584151 -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 pp-u01
+UPSNAME pp-u02
# 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:private
+DEVICE 10.20.3.2:161:APC:private
# POLLTIME <int>
#  Interval (in seconds) at which apcupsd polls the UPS for status. This
</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>





Revision as of 23:38, 19 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:

APC UPSes

This covers the setup of APC UPSes with network management cards installed.

Note: These are specific links. They may break as updated packages are released.

Easiest way to setup apcupsd 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.

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

Now edit the repo to protect the base RPMs.

cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.orig
vim /etc/yum.repos.d/CentOS-Base.repo

Add protect=1 to the [base], [updates], [extras] and [contrib]. Note that RHEL machines may not have all these repos.

diff -u /etc/yum.repos.d/CentOS-Base.repo.orig /etc/yum.repos.d/CentOS-Base.repo
--- /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

Now unprotect the EPEL repo as any conflicts that might arise should be replaced by the official versions.

cp /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo.orig
vim /etc/yum.repos.d/epel.repo

This time, add protect=0 to [epel], [epel-debuginfo] and [epel-source].

diff -u /etc/yum.repos.d/epel.repo.orig /etc/yum.repos.d/epel.repo
--- /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

Now install apcupsd

yum -y install apcupsd

Now setup the configuration file:

cp /etc/apcupsd/apcupsd.conf /etc/apcupsd/apcupsd.conf.orig
vim /etc/apcupsd/apcupsd.conf

The main arguments to change/set are;

  • UPSNAME - Important if you will be setting up two or more UPSes. Optional otherwise.
  • UPSTYPE - This needs to be set to snmp to enable network access to the UPS's stats.
  • DEVICE - This is where we tell the apcupsd daemon where to find the UPS. For most people, this should be set to 10.20.3.1:161:APC:private, substituting 10.20.3.1 for the IP of your UPS.

In our case, we don't want apcupsd 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;

  • POLLTIME - Set this to the number of seconds you want apcupsd to check for changes in the UPS. The lower this number, the higher the overhead.
  • BATTERYLEVEL - This sets the remaining battery percentage at which point apcupsd will initiate a shutdown of the host.
  • MINUTES - This sets the remaining nunmber of minutes (according to the UPS itself) at which point apcupsd will initiate a shutdown of the host. In our case, AN!CM will trigger a withdrawl sooner than this anyway.
diff -u /etc/apcupsd/apcupsd.conf.orig /etc/apcupsd/apcupsd.conf
--- /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.

Now start the apcupsd daemon.

chkconfig apcupsd on
/etc/init.d/apcupsd start
Starting UPS monitoring:                                   [  OK  ]

You can confirm that it's working via apcaccess

apcaccess
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

Likewise, you can test by pulling the UPS from the mains and within POLLTIME seconds you should see a broadcast message on all terminals. Plug the UPS back into mains and again within POLLTIME seconds you should see another broadcast saying that power has been restored.

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...

Done!

Monitoring 2 or More APC UPSes at Once

Note: This section is based off of this document on the official apcupsd website. However, changes are made to reflect our UPSes being network connected and specifically for EL6.

To setup apcupsd to support multiple APC UPSes, we need to duplicate the configuration file. To do this, first stop the apcupsd daemon.

/etc/init.d/apcupsd stop
Shutting down UPS monitoring:                              [  OK  ]
Note: The new name of the configuration file needs to be in the format apcupsd.*.conf. This tutorial stays in line with the original tutorial by using upsX.

Next rename the existing stock configuration and then copy it for the second (and third...) UPSes.

mv /etc/apcupsd/apcupsd.conf /etc/apcupsd/apcupsd.ups0.conf
cp /etc/apcupsd/apcupsd.ups0.conf /etc/apcupsd/apcupsd.ups1.conf

Edit the new apcupsd.ups1.conf file to reflect the configuration of the second UPS.

vim /etc/apcupsd/apcupsd.ups1.conf
diff -u /etc/apcupsd/apcupsd.ups0.conf /etc/apcupsd/apcupsd.ups1.conf
--- /etc/apcupsd/apcupsd.ups0.conf	2012-08-19 16:47:26.938607712 -0400
+++ /etc/apcupsd/apcupsd.ups1.conf	2012-08-19 17:42:10.041584151 -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 pp-u01
+UPSNAME pp-u02
 
 # 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:private
+DEVICE 10.20.3.2:161:APC:private
 
 # POLLTIME <int>
 #   Interval (in seconds) at which apcupsd polls the UPS for status. This

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 root user's home directory.

cp /etc/init.d/apcupsd /root/apcupsd.init.orig

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:

rm -f /etc/init.d/apcupsd
wget https://alteeve.ca/files/apcupsd -O /etc/init.d/apcupsd
--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]

Alternatively;

Now to edit it to fire on multiple config files;

vim /etc/init.d/apcupsd
diff -u /root/apcupsd.init.orig /etc/init.d/apcupsd
--- /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}"

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.

/etc/init.d/apcupsd start
Starting UPS monitoring (apcupsd.ups0.conf):               [  OK  ]
Starting UPS monitoring (apcupsd.ups1.conf):               [  OK  ]


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.