Tuesday, August 18, 2015

Shell Script to create mirrors of Physical Volumes

#!/bin/sh
#******* DISK:
# create LVM mirrors for VolGroup
for x in `ls /dev/VolGroup`; do
        lvconvert -m 1 /dev/VolGroup/$x `pvdisplay | grep "PV Name" | awk '{printf $3" "}'` &
        if [ $? -ne 0 ]; then logError DISK: $x; fi
done

Sunday, August 16, 2015

Server is not coming up after we patched and rebooted it

We have a RHEL 6 (64 bits) Virtual Machine in vSphere 5.0. Today when we rebooted the server after Linux patching the server could not come up and following message is showing on the screen:

/dev/fd/8: 8: Syntax Error: Bad fd number
/dev/fd/8: 1: Syntax Error: Bad fd number
init: readahead-collector main process(364) terminated with status 2
init: rcS pre-start process(365) terminated  with status 2
init: readahead main process(366) terminated with status 2
init: readahead-collector post process(367) terminated with status 2
/dev/fd/8: 11: Syntax Error: Bad fd number
init: rcS post-stop process(368) terminated with status 2
init: readahead-disable-services main process(369) terminated with status 2.

The screen is stuck with this message and the server is not coming up.

To resolve the issue we have restored the server from backup. 

Thursday, August 6, 2015

hpacucli is not getting installed through yum install

We have our red Hat satellite server and all other servers are getting patched with these satellite servers on regular basis. But today when i tried to install hpacucli i am getting the following message:

root@lxe1129 [~] # yum install hpacucli
Loaded plugins: product-id, rhnplugin, security, subscription-manager
This system is receiving updates from RHN Classic or RHN Satellite.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package hpacucli.x86_64 0:9.40-12.0 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package Arch Version Repository Size
================================================================================
Installing:
 hpacucli x86_64 9.40-12.0 prod-hp-sys-tools 6.5 M

Transaction Summary
================================================================================
Install 1 Package(s)

Total download size: 6.5 M
Installed size: 0
Is this ok [y/N]: y
Downloading Packages:
hpacucli-9.40-12.0.x86_64.rpm | 6.5 MB 00:00
warning: rpmts_HdrFromFdno: Header V3 DSA/SHA1 Signature, key ID 2689b887: NOKEY

Public key for hpacucli-9.40-12.0.x86_64.rpm is not installed

And after that when i checked with rpm -qa | grep hpacucli, it is not showing any output. 

Resolution:
For installing these software from HP we need to download the rpm package from HP site. And then do rpm -ivh.

We have downloaded the following packages:
hpacucli-9.20-9.0.x86_64.rpm
hp-ams-1.2.0-781.36.rhel5.x86_64.rpm
hp-health-9.20-1528.19.rhel5.x86_64.rpm
hp-snmp-agents-9.20-2350.17.rhel5.x86_64.rpm

and made the following script to install them:

for PKG in `ls *.rpm`
do
rpm -ivh $PKG
done

# Disable HP ASR
hpasmcli -s "disable asr"