Thursday, 13 December 2012

Unable to Execute the Command "hpacucli"



Please follow the below steps

MMM-root#hpacucli
HP Array Configuration Utility CLI 8.10-2.0
Detecting Controllers...

Error: Another instance of ACU is already running (possibly a service). Please
terminate the ACU application before running the ACU CLI. Press ENTER to
exit.

MMM-root#ps -ef |grep hpacu
root 2038 1484 0 14:06 pts/0 00:00:00 grep hpacu

To Kill the process of Hpacucli.

MMM-root#kill -9 2038

If issue still persists:

MMM-root# hpacucli
HP Array Configuration Utility CLI 7.50.18.0
Detecting Controllers…
Error: Another instance of ACU is already running (possibly a service). Please
terminate the ACU application before running the ACU CLI.

MMM-root# ps -ef | grep -i acu
root 26127 11377 0 15:12 pts/3 00:00:00 grep -i acu

goto /opt/compaq/cpqacuxe/bld/locks and remove all the files in that directory

then run hpacucli

You can check the below link for more information.

http://www.linuxquestions.org/questions/linux-server-73/unable-to-execute-the-command-hpacucli-883475/



Regards,
MMM

HPACUCLI Installation Instructions and Utility Commands


Downloading the software from the site:

Step 1:-Download the insulation file form HP website:


Step 2:- Copy the downloaded RPM file to the Linux server using WinScp.

Installing and configuring the Hpacucli software:

Step 1:-If there is an older version of ACU CLI installed on the system, please use  below command to remove it first.
Redhat # rpm -e hpacucli*

Step 2:- Go to the hapacucli.rpm path in the system and run the following command to install the software.
Redhat:- rpm  -ivhhapacucli.rpm

Step 3:- Check for the hpacucli command with root user id.


--: Below are the some useful commands  :--

Utility Keyword abbreviations
Abbreviations
chassisname = ch
controller = ctrl 
logicaldrive = ld
physicaldrive = pd 
drivewritecache = dwc
hpacucli utility
hpacucli
# hpacucli 

# hpacucli help

Note: you can use the hpacucli command in a script
Controller Commands
Display (detailed)
hpacucli> ctrl all show config
hpacucli> ctrl all show config detail
Status
hpacucli> ctrl all show status
Cache
hpacucli> ctrl slot=0 modify dwc=disable
hpacucli> ctrl slot=0 modify dwc=enable
Rescan
hpacucli> rescan

Note: detects newly added devices since the last rescan
Physical Drive Commands
Display (detailed)
hpacucli> ctrl slot=0 pd all show
hpacucli> ctrl slot=0 pd 2:3 show detail

Note: you can obtain the slot number by displaying the controller configuration (see above)
Status
hpacucli> ctrl slot=0 pd all show status
hpacucli> ctrl slot=0 pd 2:3 show status
Erase
hpacucli> ctrl slot=0 pd 2:3 modify erase
Blink disk LED
hpacucli> ctrl slot=0 pd 2:3 modify led=on
hpacucli> ctrl slot=0 pd 2:3 modify led=off
Logical Drive Commands
Display (detailed)
hpacucli> ctrl slot=0 ld all show [detail]
hpacucli> ctrl slot=0 ld 4 show [detail] 
Status
hpacucli> ctrl slot=0 ld all show status 
hpacucli> ctrl slot=0 ld 4 show status
Blink disk LED
hpacucli> ctrl slot=0 ld 4 modify led=on
hpacucli> ctrl slot=0 ld 4 modify led=off
re-enabling failed drive
hpacucli> ctrl slot=0 ld 4 modify reenable forced 
Create
# logical drive - one disk 
hpacucli> ctrl slot=0 create type=ld drives=1:12 raid=0 

# logical drive - mirrored 
hpacucli> ctrl slot=0 create type=ld drives=1:13,1:14 size=300 raid=1

# logical drive - raid 5 
hpacucli> ctrl slot=0 create type=ld drives=1:13,1:14,1:15,1:16,1:17 raid=5

Note:
drives - specific drives, all drives or unassigned drives
size - size of the logical drive in MB
raid - type of raid 0, 1 , 1+0 and 5
Remove
hpacucli> ctrl slot=0 ld 4 delete
Expanding
hpacucli> ctrl slot=0 ld 4 add drives=2:3
Extending
hpacucli> ctrl slot=0 ld 4 modify size=500 forced
Spare
hpacucli> ctrl slot=0 array all add spares=1:5,1:7


Regards,
MMM.

Sunday, 23 September 2012

Increasing the Size of Swap Partition in RHEL


-:There are possibilities that any time we can increase the size of RAM, at that time we
need to increase the size of swap partition as per the increased size of the RAM.
There are two method of doing so
1. creating partition
2. Creating file

1. Creating Partition:

i. We have to create one partition of size say 200MB and change its type to 82
(swap type) . save and exit and then run the command “partprobe”
ii. Format the partition say /dev/hda9
#mkswap /dev/hda9
iii. Make the swap partition active
#swapon /dev/hda9
iv. to check the entry of swap partition
# cat /proc/swaps
If we want to make the permanent entry in fstab then
#vi /etc/fstab
/dev/hda9 swap swap defaults 0 0

2. Creating file:

i. first make an empty file
#touch /swp
ii. Now we customize the size of the swap
# dd if=/dev/zero of=/swp bs=1M count=200
iii. Format the newly created swap file
#mkswap /swp
iv. Active the swap file
#swapon /swp
To check the entry of swap file
#cat /proc/swaps
If we want that automatically this swap file activate , we need to make the entry in
/etc/ec.local
# vi /etc/rc.local
Make the following entry
Swapon /swp
Save and exit ( Esc :wq!)

Regards,
MMM


JOB Scheduling in RHEL (crontab and at)


It is used for Task Automation and Task Scheduling.
Two command are used
1. at
2. crontab

syntax:
#at time
at>command I
at>command II
ctrl+D
Example:
#at 10:30
at>eject
at>eject –t
ctrl+D
Option used
#at now
#at now+5 minutes
#at now+5 hours
#at now+5 days
#at tomorrow
#at 10:30 july 16 2006

we can also restrict the user not to use the ‘at’ command. Restriction will be provided by
root login with administrator.
#vi /etc/at.deny
inside this file we have to just mentioned the name of the user in order to restrict him
not to use ‘at’ command.
Just save and exit form the file
By default all users are allowed to use ‘at’ command. ‘at.deny’ is default in system. We
can also create a file ‘at.allow’ file. Once we create this file, now by default all users will
be restricted to use ‘at’ command and only that user which have entry on ‘at.allow’ will
allow to use the ‘at’ command.
Another method is to make an entry inside the ‘crontab’ file. Entry will be done by the
root. Difference between these two method is crontab is used to perform the same task
many times whereas job through ‘at’ command will be removed after the task has been
performed.

Syntax: ( By root login)
#crontab –e
six field are listed
1 2 3 4 5 6
minute hour day of Month day of command
month Week
Example:
35 10 31 05 3 eject
36 10 31 05 3 eject –t
Minute : 0-59
Hours : 0-23
Day of Month : 1-31
Month : 1-12
Day of Week : 0-7
0 and 7 are Sunday
#service crond restart
#Whereis eject
this command display the path of the command. It is better to use the full path of the
command inside crontab instead of just the name of the command.
We can also make the entry as
35 10 * * * eject
36 10 * * * eject –t
In this case. These two jobs will be performed at 10:35 in every month.
Some command which are executed with ‘at’ or ‘crontab’ send their output to the user
mail box. These command are executed on background and their output is transferred to
the particular user’s mail box. In order to see the output of the command we use.
#mutt
This command will open the mailbox from where we check the output
Some of the switched used with the ‘crontab’
#crontab –l
List out all the job scheduled in crontab.
#crontab –r
Can remove the job from the crontab.
#atq : list the job number scheduled in at
#atrm jobno : to remove any job

Regards,
MMM

Welcome Message at the time of login on Red Hat Enterprise Linux


1) Log in with root access. 

 Type below command to add the  Welcome Message.
#vim /etc/motd
   (Type any message which we want to display)

“WELCOME TO MMM RHEL BLOGGER”

Esc
:wq!

Logoff and login you will get the Welcome Message at the time of login.

Regards,
MMM.