Dears,

Blog has been moved to http://www.AlTwaijiry.com, please join us.

Blog has been moved to

http://www.AlTwaijiry.com,

please join us.



EtisalatMobily

Blog has been moved to

http://www.AlTwaijiry.com,

please join us.


1. Run the following command to get the current mount points that the cluster is controlling them (replace HAPLUS with your StorageHA-Plus resource name)

root@local# scrgadm -vvp | grep FilesystemMountPoints | grep value | grep  HAPLUS
(resourcegroup:HAPLUS:FilesystemMountPoints) Res property value: /apps /database


2. Now for example if we want this resource also to control the directory /log , AFTER we create the file system in the same metaset and we add it to /etc/vfstab and we also test it (mount and umount in all node) we run the following command:

scrgadm -c -j HAPLUS -x FileSystemMountPoints=”/apps,/database,/log

After running the command above the cluster will auto mount the filesystem /log automaticly (if it’s already mounted it will no remount it, also FYI this command can be executed while the cluster/application is running.

Blog has been moved to

http://www.AlTwaijiry.com,

please join us.


1. Run the following command create the Oracle listener resource:

scrgadm -a -j ctl-ora-lsnr-res -g ctlprod-rg -t SUNW.oracle_listener:5 \
-x ORACLE_HOME=/oracle/ctlprod/9.2.0 \
-y Resource_dependencies=ctl-db-hasp-res1,ctl-db-hasp-res2,ctl-db-hasp-res3

A. ctl-ora-lsnr-res is the new resource name for the oracle listener

B. ORACLE_HOME=/oracle/ctlprod/9.2.0 Oracle home directory.

C. Resource_dependencies:  Any resource dependency

D. ctlprod-rg: resource group name

2. The command above will create the resource and will leave it offline, you will have to online it manually.

scswitch -e -j ctl-ora-lsnr-res

3. Run the following command create the Oracle Server resource:

scrgadm -a -j ctl-ora-srv-res -g ctlprod-rg -t SUNW.oracle_server:5 \
-x ORACLE_HOME=/oracle/ctlprod/9.2.0 \
-x ORACLE_SID=ctlprod \
-x Alert_log_file=/oracle/ctlprod/admin/bdump/alert_ctlprod.log \
-x Connect_string=suncluster/password \
-y Resource_dependencies=ctl-db-hasp-res1,ctl-db-hasp-res2,ctl-db-hasp-res3

A. ctl-ora-srv-res-g: the new resource name for the oracle server/database

B. ORACLE_HOME=/oracle/ctlprod/9.2.0 Oracle home directory.

C. Resource_dependencies:  Any resource dependency

D. ctlprod-rg: resource group name

E. ORACLE_SID: Oracle database SID name

F. Alert_log_file: Oracle database alert log file full path

G. Connect_string: Connection string , the user name and the password that the cluster will use it to connect to the database in order to monitor it.

4. The command above will create the resource and will leave it offline, you will have to online it manually.

scswitch -e -j ctl-ora-srv-res

Blog has been moved to

http://www.AlTwaijiry.com,

please join us.



Few command lines you can use them when you ssh to any HMC (I usualy use it when I have a slow connection and I want to do something very fast)


1. List all th managed system in the HMC

lssyscfg -r sys -F name

2. List all the LPars running in any system

lssyscfg -m ‘SYSTEM_NAME’ -r lpar -F name

3. Run a terminal/console for any system

vtmenu

4.  Display the state of all Lpars in a system managed by the HMC

lssyscfg -m ‘SYSTEM_NAME’ -r lpar -F name,lpar_id,state

5. Reboot Lpar immediatly

chsysstate -m ‘SYSTEM_NAME’ -r lpar -n ‘LPAR_NAME’ -o shutdown –immed –restart

Blog has been moved to

http://www.AlTwaijiry.com,

please join us.



Run the following script if you want the system to forward all the mails to an SMTP server that is responsible to send all your mails:

PS: replace **SERVER** with your mail relay server (SMTP Server) and youremail@yourdomain.com with your email

#!/bin/bash

cp /etc/mail/sendmail.cf /etc/mail/sendmail.cf.org
perl -i -pe ‘s/^DS.*/DS**SERVER**/g’ /etc/mail/sendmail.cf
/etc/init.d/sendmail stop
/etc/init.d/sendmail start
banner `hostname` | /usr/lib/sendmail -v youremail@yourdomain.com

Blog has been moved to

http://www.AlTwaijiry.com,

please join us.



Simple!!

for i in `lscfg -vp |grep fcs| awk ‘{print $1}’`
do
echo $i && lscfg -vp -l $i |grep “Network Address”
done

AIX1:/>for i in `lscfg -vp |grep fcs| awk ‘{print $1}’`
> do
> echo $i && lscfg -vp -l $i |grep “Network Address”
> done
fcs1
Network Address………….10000000C95A2E3F
fcs0
Network Address………….10000000C95A31CE
AIX1:/>

Follow

Get every new post delivered to your Inbox.