digiturf.net

Finding TIMEZONE of Linux Server & How to SET it to the zone we need that to be in..?



Finding Timezone information :   

pdb10:/ # md5sum /etc/localtime             # To find checksum number
4c9f9c5c5f86bcc5465c08831ef59e75  /etc/localtime

pdb10:/# find /usr/share/zoneinfo -type f | xargs md5sum | grep       # grep for that checksum No. from ‘zoneinfo’ file.


4c9f9c5c5f86bcc5465c08831ef59e75
4c9f9c5c5f86bcc5465c08831ef59e75  /usr/share/zoneinfo/Europe/Guernsey
4c9f9c5c5f86bcc5465c08831ef59e75  /usr/share/zoneinfo/Europe/Isle_of_Man
4c9f9c5c5f86bcc5465c08831ef59e75  /usr/share/zoneinfo/Europe/Belfast
4c9f9c5c5f86bcc5465c08831ef59e75  /usr/share/zoneinfo/Europe/Jersey
4c9f9c5c5f86bcc5465c08831ef59e75  /usr/share/zoneinfo/Europe/London
4c9f9c5c5f86bcc5465c08831ef59e75  /usr/share/zoneinfo/posix/Europe/Guernsey
4c9f9c5c5f86bcc5465c08831ef59e75  /usr/share/zoneinfo/posix/Europe/Isle_of_Man
4c9f9c5c5f86bcc5465c08831ef59e75  /usr/share/zoneinfo/posix/Europe/Belfast
4c9f9c5c5f86bcc5465c08831ef59e75  /usr/share/zoneinfo/posix/Europe/Jersey
4c9f9c5c5f86bcc5465c08831ef59e75  /usr/share/zoneinfo/posix/Europe/London
4c9f9c5c5f86bcc5465c08831ef59e75  /usr/share/zoneinfo/posix/GB-Eire
4c9f9c5c5f86bcc5465c08831ef59e75  /usr/share/zoneinfo/posix/GB
4c9f9c5c5f86bcc5465c08831ef59e75  /usr/share/zoneinfo/GB-Eire
4c9f9c5c5f86bcc5465c08831ef59e75  /usr/share/zoneinfo/GB


pdb10:/ # cat /etc/sysconfig/clock         # Shows present TIMEZONE info.

** Before setting this verify from other server in same DC / region in where the timezone is set right and using that info FIX the issue in problem server.


Setting the server to required TIMEZONE :

pdb10:/ # ln -s /usr/share/zoneinfo/Europe/London /etc/localtime          # We’ve set the server’s time to EDT which is Europe time.

Extending a VG in AIX & increase the Filesystem size online.



Q) How to extend filesystems on AIX Server (aixdb2-03) for SAN ( Disks from SAN) growth ?

desc : on aixdb2-03, do the following: ( hdisk47 – 59 || Total of 13 disks each 25GB )

add hdisk47 to dbvg0  (dbvg0 through dbvg12)
add hdisk48 to dbvg1

add hdisk59 to dbvg12
———————-
extend /data/vol1 by 25G (vol1 through vol12)
extend /data/vol2 by 25G

extend /data/vol12 by 25G
————————–
NOTE: may need to adjust sizes slightly due to overhead.
use lsvg to see the free PP’s in each VG.

A) HOW IS IT DONE / ESTABLISHED :

** Before increasing the VG’s space, the disk space levels are as follows.

[root@aixdb2-03:/] df -g
Filesystem    GB blocks      Free %Used    Iused %Iused Mounted on
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
/dev/dblv0       173.00     22.05   88%      950     1% /data/vol1
/dev/dblv1       173.00     22.31   88%      457     1% /data/vol2
/dev/dblv2       173.00     22.26   88%      471     1% /data/vol3
/dev/dblv3       173.00     22.24   88%      480     1% /data/vol4
/dev/dblv4       173.00     22.24   88%      489     1% /data/vol5
/dev/dblv5       173.00     23.00   87%      471     1% /data/vol6
/dev/dblv6       173.00     23.01   87%      463     1% /data/vol7
/dev/dblv7       173.00     23.01   87%      458     1% /data/vol8
/dev/dblv8       173.00     23.01   87%      460     1% /data/vol9
/dev/dblv9       173.00     23.02   87%      454     1% /data/vol10
/dev/fslv02      172.75     22.78   87%      457     1% /data/vol11
/dev/fslv03      172.75     22.78   87%      461     1% /data/vol12
/dev/fslv04      172.75     22.80   87%      457     1% /data/vol13

** To know the MOUNT POINT(s) & LV NAME(s) from VG use the command # lsvg -l

[root@aixdb2-03:/] lsvg -l dbvg1
dbvg1:
LV NAME             TYPE       LPs   PPs   PVs  LV STATE      MOUNT POINT
dblv1                        jfs2          396   396    4     open/syncd            /data/vol2
loglv07                     jfs2log      1       1       1     open/syncd                N/A

** As per the #lspv output, disks from hdisk47 – 59 are free and not assigned to any vg.

[root@aixdb2-03:/] lspv
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
hdisk5          00c77c7e10e06ec6                    dbvg0           active
hdisk6          00c77c7e10e5fbb5                    dbvg1           active
hdisk7          00c77c7e10e85142                    dbvg2           active
hdisk8          00c77c7e10ea3164                    dbvg3           active
hdisk9          00c77c7e10e9b74f                    dbvg4           active
hdisk10         00c77c7e10ebe471                   dbvg5           active
hdisk11         00c77c7e10ec7537                   dbvg6           active
hdisk12         00c77c7e10ee3db1                   dbvg7           active
hdisk13         00c77c7e10edaa5c                   dbvg8           active
hdisk14         00c77c7e10ed4a20                   dbvg9           active
hdisk15         00c77c7e6498cc20                   dbvg10          active
hdisk16         00c77c7e6498d82d                  dbvg11          active
hdisk17         00c77c7e649a5b3a                   dbvg12          active
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
hdisk47         none                                None          
hdisk48         none                                None          
hdisk49         none                                None          
hdisk50         none                                None          
hdisk51         none                                None          
hdisk52         none                                None          
hdisk53         none                                None          
hdisk54         none                                None          
hdisk55         none                                None          
hdisk56         none                                None          
hdisk57         none                                None          
hdisk58         none                                None          
hdisk59         none                                None          

** #lsvg lists the volume groups available in server. 

[root@aixdb2-03:/] lsvg
rootvg
dbvg0
dbvg1
dbvg2
dbvg3
dbvg4
dbvg5
dbvg6
dbvg7
dbvg8
dbvg9
dbvg10
dbvg11
dbvg12

** dbvg0-12 are 13 different VG’s and we we will allocate hdisk47-59 to each of those VG’s by #extendvg cmd.

[root@aixdb2-03:/] extendvg dbvg0 hdisk47
0516-1254 extendvg: Changing the PVID in the ODM.
[root@aixdb2-03:/] extendvg dbvg1 hdisk48
0516-1254 extendvg: Changing the PVID in the ODM.
[root@aixdb2-03:/] extendvg dbvg2 hdisk49
0516-1254 extendvg: Changing the PVID in the ODM.
[root@aixdb2-03:/] extendvg dbvg3 hdisk50
0516-1254 extendvg: Changing the PVID in the ODM.
[root@aixdb2-03:/] extendvg dbvg4 hdisk51
0516-1254 extendvg: Changing the PVID in the ODM.
[root@aixdb2-03:/] extendvg dbvg5 hdisk52
0516-1254 extendvg: Changing the PVID in the ODM.
[root@aixdb2-03:/] extendvg dbvg6 hdisk53
0516-1254 extendvg: Changing the PVID in the ODM.
[root@aixdb2-03:/] extendvg dbvg7 hdisk54
0516-1254 extendvg: Changing the PVID in the ODM.
[root@aixdb2-03:/] extendvg dbvg8 hdisk55
0516-1254 extendvg: Changing the PVID in the ODM.
[root@aixdb2-03:/] extendvg dbvg9 hdisk56
0516-1254 extendvg: Changing the PVID in the ODM.
[root@aixdb2-03:/] extendvg dbvg10 hdisk57
0516-1254 extendvg: Changing the PVID in the ODM.
[root@aixdb2-03:/] extendvg dbvg11 hdisk58
0516-1254 extendvg: Changing the PVID in the ODM.
[root@aixdb2-03:/] extendvg dbvg12 hdisk59
0516-1254 extendvg: Changing the PVID in the ODM.

** As per # lspv, disks from hdisk47-59 are now allocated to VG’s dbvg0 through dbvg12.

[root@aixdb2-03:/] lspv        
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
hdisk5          00c77c7e10e06ec6                    dbvg0           active
hdisk6          00c77c7e10e5fbb5                    dbvg1           active
hdisk7          00c77c7e10e85142                    dbvg2           active
hdisk8          00c77c7e10ea3164                    dbvg3           active
hdisk9          00c77c7e10e9b74f                     dbvg4           active
hdisk10         00c77c7e10ebe471                   dbvg5           active
hdisk11         00c77c7e10ec7537                   dbvg6           active
hdisk12         00c77c7e10ee3db1                   dbvg7           active
hdisk13         00c77c7e10edaa5c                    dbvg8           active
hdisk14         00c77c7e10ed4a20                   dbvg9           active
hdisk15         00c77c7e6498cc20                   dbvg10          active
hdisk16         00c77c7e6498d82d                  dbvg11          active
hdisk17         00c77c7e649a5b3a                   dbvg12          active
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
hdisk47         00c77c7ed1d9b082                    dbvg0           active
hdisk48         00c77c7ed1d9f7b3                    dbvg1           active
hdisk49         00c77c7ed1da3591                    dbvg2           active
hdisk50         00c77c7ed1da825a                    dbvg3           active
hdisk51         00c77c7ed1dad991                    dbvg4           active
hdisk52         00c77c7ed1db6d32                    dbvg5           active
hdisk53         00c77c7ed1dbc4e3                    dbvg6           active
hdisk54         00c77c7ed1dc0b8b                    dbvg7           active
hdisk55         00c77c7ed1dc6e18                    dbvg8           active
hdisk56         00c77c7ed1dcb2ac                    dbvg9           active
hdisk57         00c77c7ed1dd0d8f                   dbvg10          active
hdisk58         00c77c7ed1dd4fe1                    dbvg11          active
hdisk59         00c77c7ed1dd8ff6                    dbvg12          active

** Increasing the filesystems associated with each of the VG by #chfs CMD.

[root@aixdb2-03:/] chfs -a size=+25G /data/vol1
Filesystem size changed to 415236096
[root@aixdb2-03:/] chfs -a size=+25G /data/vol2
Filesystem size changed to 415236096
[root@aixdb2-03:/] chfs -a size=+25G /data/vol3
Filesystem size changed to 415236096
[root@aixdb2-03:/] chfs -a size=+25G /data/vol4
Filesystem size changed to 415236096
[root@aixdb2-03:/] chfs -a size=+25G /data/vol5
Filesystem size changed to 415236096
[root@aixdb2-03:/] chfs -a size=+25G /data/vol6
Filesystem size changed to 415236096
[root@aixdb2-03:/] chfs -a size=+25G /data/vol7
Filesystem size changed to 415236096
[root@aixdb2-03:/] chfs -a size=+25G /data/vol8
Filesystem size changed to 415236096
[root@aixdb2-03:/] chfs -a size=+25G /data/vol9
Filesystem size changed to 415236096
[root@aixdb2-03:/] chfs -a size=+25G /data/vol10
Filesystem size changed to 415236096
[root@aixdb2-03:/] chfs -a size=+25G /data/vol11
Filesystem size changed to 414711808
[root@aixdb2-03:/] chfs -a size=+25G /data/vol12
Filesystem size changed to 414711808

** After the filesystems are growed online with #chfs CMD free space is increased from 23% to 48%.

[root@aixdb2-03:/] df -g
Filesystem    GB blocks      Free %Used    Iused %Iused Mounted on
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
/dev/dblv0       198.00     47.04   77%      950     1% /data/vol1
/dev/dblv1       198.00     47.31   77%      457     1% /data/vol2
/dev/dblv2       198.00     47.26   77%      471     1% /data/vol3
/dev/dblv3       198.00     47.24   77%      480     1% /data/vol4
/dev/dblv4       198.00     47.23   77%      489     1% /data/vol5
/dev/dblv5       198.00     47.99   76%      471     1% /data/vol6
/dev/dblv6       198.00     48.00   76%      463     1% /data/vol7
/dev/dblv7       198.00     48.01   76%      458     1% /data/vol8
/dev/dblv8       198.00     48.01   76%      460     1% /data/vol9
/dev/dblv9       198.00     48.02   76%      454     1% /data/vol10
/dev/fslv02      197.75     47.77   76%      457     1% /data/vol11
/dev/fslv03      197.75     47.78   76%      461     1% /data/vol12
/dev/fslv04      172.75     22.80   87%      457     1% /data/vol13
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Remove / Delete a Node form Veritas cluster



Taking backup of Config file from Primary Node :
[root@tsdb1 ~]# cp -p /etc/VRTSvcs/conf/config/main.cf /main.cf_VRTSvcs05162013


To be executed in Primary node to delete the Leaving / Being removed “TSGB13” :

[root@tsdb1 ~]# haconf -makerw        -making config Read & Write
[root@tsdb1 ~]# hastop -sys tsgb13    – Offline / stopping the Node tsgb13 from cluster.
[root@tsdb1 ~]# hastatus -sum

— SYSTEM STATE
— System               State                Frozen

A  tsdb1                RUNNING              0
A  tsdb2                RUNNING              0
A  tsgb1                RUNNING              0
A  tsgb13               LEAVING              0
A  tsgb2                RUNNING              0
A  tsgb3                RUNNING              0

— GROUP STATE
— Group           System               Probed     AutoDisabled    State

B  ClusterService  tsdb1                Y          N               ONLINE
B  ClusterService  tsdb2                Y          N               OFFLINE
B  ClusterService  tsgb1                Y          N               OFFLINE
B  ClusterService  tsgb13               Y          N               OFFLINE
B  ClusterService  tsgb2                Y          N               OFFLINE
B  ClusterService  tsgb3                Y          N               OFFLINE
B  cvm             tsdb1                Y          N               ONLINE
B  cvm             tsdb2                Y          N               ONLINE
B  cvm             tsgb1                Y          N               ONLINE
B  cvm             tsgb13               Y          N               ONLINE
B  cvm             tsgb2                Y          N               ONLINE
B  cvm             tsgb3                Y          N               ONLINE
B  proddbcfs       tsdb1                Y          N               ONLINE
B  proddbcfs       tsdb2                Y          N               ONLINE
B  proddbcfs       tsgb1                Y          N               ONLINE
B  proddbcfs       tsgb13               Y          N               ONLINE|STOPPING
B  proddbcfs       tsgb2                Y          N               ONLINE
B  proddbcfs       tsgb3                Y          N               ONLINE
B  tsdbnfssg       tsdb1                Y          N               OFFLINE
B  tsdbnfssg       tsdb2                Y          N               ONLINE
B  ugbcfs          tsdb1                Y          N               ONLINE
B  ugbcfs          tsdb2                Y          N               ONLINE
B  ugbcfs          tsgb1                Y          N               ONLINE
B  ugbcfs          tsgb13               Y          N               ONLINE|STOPPING
B  ugbcfs          tsgb2                Y          N               ONLINE
B  ugbcfs          tsgb3                Y          N               ONLINE
B  vrts_vea_cfs_int_cfsmount1 tsdb1                Y          N               ONLINE
B  vrts_vea_cfs_int_cfsmount1 tsdb2                Y          N               ONLINE
B  vrts_vea_cfs_int_cfsmount1 tsgb1                Y          N               ONLINE
B  vrts_vea_cfs_int_cfsmount1 tsgb13               Y          N               OFFLINE
B  vrts_vea_cfs_int_cfsmount1 tsgb2                Y          N               ONLINE
B  vrts_vea_cfs_int_cfsmount1 tsgb3                Y          N               ONLINE
B  wok5bse         tsdb1                Y          N               ONLINE
B  wok5bse         tsdb2                Y          N               ONLINE
B  wok5bse         tsgb1                Y          N               ONLINE
B  wok5bse         tsgb13               Y          N               ONLINE|STOPPING
B  wok5bse         tsgb2                Y          N               ONLINE
B  wok5bse         tsgb3                Y          N               ONLINE

— RESOURCES NOT PROBED
— Group           Type                 Resource             System

D  ClusterService  NIC                  NIC                  tsdb1
D  ClusterService  NIC                  NIC                  tsdb2
D  ClusterService  NIC                  NIC                  tsgb1
D  ClusterService  NIC                  NIC                  tsgb13
D  ClusterService  NIC                  NIC                  tsgb2
D  ClusterService  NIC                  NIC                  tsgb3
D  tsdbnfssg       NIC                  vNFS_NIC_main_nic    tsdb1
D  tsdbnfssg       NIC                  vNFS_NIC_main_nic    tsdb2

— RESOURCES OFFLINING
— Group           Type            Resource             System               IState

F  proddbcfs       CFSMount        proddbmnt            tsgb13               W_OFFLINE_PROPAGATE
F  ugbcfs          CFSMount        cfsugbmnt            tsgb13               W_OFFLINE_PROPAGATE
F  wok5bse         CFSMount        wok5bse_mnt          tsgb13               W_OFFLINE_PROPAGATE



Now we have to remove the groups from TSGB13 :  List and note down the groups and then delete.
[root@tsdb1 ~]#  hagrp -list
ClusterService                          tsdb1
ClusterService                          tsdb2
ClusterService                          tsgb1
ClusterService                          tsgb13
ClusterService                          tsgb2
ClusterService                          tsgb3
cvm                                     tsdb1
cvm                                     tsdb2
cvm                                     tsgb1
cvm                                     tsgb13
cvm                                     tsgb2
cvm                                     tsgb3
proddbcfs                               tsdb1
proddbcfs                               tsdb2
proddbcfs                               tsgb1
proddbcfs                               tsgb13
proddbcfs                               tsgb2
proddbcfs                               tsgb3
tsdbnfssg                               tsdb1
tsdbnfssg                               tsdb2
ugbcfs                                  tsdb1
ugbcfs                                  tsdb2
ugbcfs                                  tsgb1
ugbcfs                                  tsgb13
ugbcfs                                  tsgb2
ugbcfs                                  tsgb3
vrts_vea_cfs_int_cfsmount1              tsdb1
vrts_vea_cfs_int_cfsmount1              tsdb2
vrts_vea_cfs_int_cfsmount1              tsgb1
vrts_vea_cfs_int_cfsmount1              tsgb13
vrts_vea_cfs_int_cfsmount1              tsgb2
vrts_vea_cfs_int_cfsmount1              tsgb3
wok5bse                                 tsdb1
wok5bse                                 tsdb2
wok5bse                                 tsgb1
wok5bse                                 tsgb13
wok5bse                                 tsgb2
wok5bse                                 tsgb3




Deleting the service and resource groups from node TSGB13
[root@tsdb1 ~]# hagrp -modify ClusterService SystemList -delete tsgb13
[root@tsdb1 ~]# hagrp -modify cvm SystemList -delete tsgb13
[root@tsdb1 ~]# hagrp -modify proddbcfs SystemList -delete tsgb13
[root@tsdb1 ~]# hagrp -modify ugbcfs SystemList -delete tsgb13
[root@tsdb1 ~]# hagrp -modify vrts_vea_cfs_int_cfsmount1 SystemList -delete tsgb13
[root@tsdb1 ~]# hagrp -modify wok5bse SystemList -delete tsgb13
 

Making sure that they are deleted by listing and verifying:
[root@tsdb1 ~]#  hagrp -list
ClusterService                          tsdb1
ClusterService                          tsdb2
ClusterService                          tsgb1
ClusterService                          tsgb2
ClusterService                          tsgb3
cvm                                     tsdb1
cvm                                     tsdb2
cvm                                     tsgb1
cvm                                     tsgb2
cvm                                     tsgb3
proddbcfs                               tsdb1
proddbcfs                               tsdb2
proddbcfs                               tsgb1
proddbcfs                               tsgb2
proddbcfs                               tsgb3
tsdbnfssg                               tsdb1
tsdbnfssg                               tsdb2
ugbcfs                                  tsdb1
ugbcfs                                  tsdb2
ugbcfs                                  tsgb1
ugbcfs                                  tsgb2
ugbcfs                                  tsgb3
vrts_vea_cfs_int_cfsmount1              tsdb1
vrts_vea_cfs_int_cfsmount1              tsdb2
vrts_vea_cfs_int_cfsmount1              tsgb1
vrts_vea_cfs_int_cfsmount1              tsgb2
vrts_vea_cfs_int_cfsmount1              tsgb3
wok5bse                                 tsdb1
wok5bse                                 tsdb2
wok5bse                                 tsgb1
wok5bse                                 tsgb2
wok5bse                                 tsgb3

[root@tsdb1 ~]# hasys -delete tsgb13              –  Finally delete the host tsgb13 from config
[root@tsdb1 ~]# haconf -dump -makero           –  Make the config read-only.
[root@tsdb1 ~]# hastatus -sum                        –  Run summary to make sure “tsgb13” is not shown anywhere.

Do the following in leaving node which is TSGB13 :  We are disabling veritas cluter not to start at boot time : Refer http://www.symantec.com/docs/TECH9719
 
mv /etc/rc3.d/S66llt   /etc/rc3.d/s66llt
mv /etc/rc3.d/S67gab   /etc/rc3.d/s67gab
mv /etc/rc3.d/S99vcs   /etc/rc3.d/s99vcs

HP iLO Password Reset & Other

This procedure is tested and worked for me on different models of “HP Proliant” servers running Linux.

                    By default HP-iLO will have Administrator as user to login to it. If you have additional user ID’s added to it apart from “Administrator”, you can reset the password of any user ID by following the method mentioned here :

No reboot / anything required, it is very simple method to do.

WHAT WE NEED :  “hponcfg” utility that is installed in server as a part of PSP – Prolliant Support Pack.

Create / edit a file with following and save it as resetilopwd.xml (any file name will do)


RIBCL Version is indicates the firmware version of iLO on which you are trying to change the password. If the FW version is 1.x, the same needs to be mentioned in script.


PASSWORD can be anything, what you write here really doesn’t matter, we write it because script needs it while running.

PASSWORD value is what we are trying to establish ( reset the password ), we need to mention the password we would like to use to login to iLO.

** Information provided in script are to be mentioned in ” “, Double quotes.

Everest:~ # hponcfg -f resetilopwd.xml

Firmware Revision = 2.05 Device type = iLO 2 Driver name = hpilo
Script succeeded

if you get “Script succeeded” message, then you should be able to login to iLO with credentials Administrator / changeit
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


How to Find the present config of iLO and know IP and other details without rebooting the server :

[root@1vmapp0003 root]# touch ilo.xml

[root@1vmapp0003 root]# ls -l ilo.xml

-rw-r–r–    1 root     root         1778 Mar  8 22:31 ilo.xml

[root@1vmapp0003 root]# hponcfg -w ilo.xml

Firmware Revision = 1.81 Device type = iLO 2 Driver name = cpqci
RILOE II/iLO configuration successfully written to file “ilo.xml”

** From the following image the value of IP_ADDRESS VALUE denotes the current IP of your iLO for the server from where you’ve run above command. Here it is the IP of 1vmapp0003’s iLO.



How to upgrade Emulex NIC / HBA Drivers and Firmware.







This procedure is executed on “HP ProLiant BL460c G7” running “SLES 11.1 Update 2 (x86_64).


prodappsrv11:~ # uname -a
Linux prodappsrv11 2.6.32.59-0.3-default #1 SMP 2012-04-27 11:14:44 +0200 x86_64 x86_64 x86_64 GNU/Linux

prodappsrv11:~ # ethtool -i eth0     

driver: be2net
version: 2.104.277.1
firmware-version: 3.104.281.0 
bus-info: 0000:02:00.0

prodappsrv11:~ # rpm -e `rpm -qa|grep be2net`  -remove any existing driver rpm.


prodappsrv11:~ # rpm -ivh hp-be2net-kmp-default-4.1.402.6_2.6.32.59_0.3-2.x86_64.rpm   

-updates NIC Drivers.
   Preparing…                ########################################### [100%]
   1:hp-be2net-kmp-default     ########################################### [100%]

prodappsrv11:~ # echo “options be2net rss_on_mc=1″ >> /etc/modprobe.conf.local   

-Enable multiple rx queues with driver.
  
prodappsrv11:~ # rpm -ivh elxocmlibhbaapi-5.1.53.1-1.x86_64.rpm
   Preparing…                ########################################### [100%]
   1:elxocmlibhbaapi           ########################################### [100%]

prodappsrv11:~ # rpm -ivh elxocmcore-5.1.53.1-1.x86_64.rpm

   Preparing…                ########################################### [100%]
   1:elxocmcore                ########################################### [100%]
elxmilid                  0:off  1:off  2:on   3:on   4:off  5:on   6:off
elxmilid  on
elxsnmpd                  0:off  1:off  2:on   3:on   4:off  5:on   6:off
elxsnmpd  on
elxhbamgrd                0:off  1:off  2:on   3:on   4:on   5:on   6:off
Starting OneCommand MILI Daemon:                                      done
Starting OneCommand Manager Management Daemon:
done

prodappsrv11:/usr/sbin # rpm -qa | grep -i elx      

elxocmcore-5.1.53.1-1
elxocmlibhbaapi-5.1.53.1-1

prodappsrv11:/usr/sbin # rpm -ql elxocmcore-5.1.53.1-1 

-These are installed by above 2 pkg’s.


/etc/emulexDiscConfig
/etc/emulexRMConfig
/etc/emulexRMOptions
/etc/init.d/elxhbamgrd
/etc/init.d/elxmilid
/etc/init.d/elxsnmpd
/usr/lib/libdfc.so
/usr/lib/libdfc.so.4
/usr/lib/libdfc.so.4.0.20
/usr/lib/libemulexhbaapi.so
/usr/lib/liblrmapi.so
/usr/lib/libmili2.so
/usr/lib/librmapi.so
/usr/lib64/libdfc.so
/usr/lib64/libdfc.so.4
/usr/lib64/libdfc.so.4.0.20
/usr/lib64/libemulexhbaapi.so
/usr/lib64/liblrmapi.so
/usr/lib64/libmili2.so
/usr/lib64/librmapi.so
/usr/sbin/hbacmd
/usr/sbin/lpfc
/usr/sbin/lpfc/dfc64
/usr/sbin/lpfc/dump_disc_trc.sh
/usr/sbin/lpfc/lsvport.sh
/usr/sbin/lpfc/lun_scan
/usr/sbin/lpfc/mkvport.sh
/usr/sbin/lpfc/rmvport.sh
/usr/sbin/ocmanager/BE2SNMP
/usr/sbin/ocmanager/convert_conf_file
/usr/sbin/ocmanager/elxhbamgrd
/usr/sbin/ocmanager/hbacmd
/usr/sbin/ocmanager/mili2d
/usr/sbin/ocmanager/rm.conf
/usr/sbin/ocmanager/scripts
/usr/sbin/ocmanager/scripts/uninstall_ocmanager.sh
/usr/sbin/ocmanager/set_operating_mode
/usr/sbin/ocmanager/start_ocmanager
/usr/sbin/ocmanager/stop_ocmanager   


prodappsrv11:~ # hbacmd listhbas   
-lists all NIC’s & HBA’s info in server.

Manageable HBA List


Permanent MAC    : 10-1f-74-35-79-c8  -Use this to update NIC FW.

Current MAC      : 02-cf-00-00-f5-f0
Flags            : 80000710
Host Name        : prodappsrv11
Mfg              : Emulex Corporation
Serial No.       : H311306065
Port Number      : 1
Mode             : Initiator
PCI Function     : 0
Port Type        : NIC
Model            : NC553i


** This is the same procedure that applies for firmware upgrade on HBA and NIC’s from Emulex.


prodappsrv11:~ # hbacmd download 10-1f-74-35-79-c8 /tmp/oc11-4.1.402.20.ufi   
-.UFI File(NIC/HBA firmware),Download from HP’s site.

Downloading /tmp/oc11-4.1.402.20.ufi to hba 10-1f-74-35-79-c8

Download Complete. Please reboot system to activate new firmware.


prodappsrv11:~ # reboot

Broadcast message from root (pts/0) (Sat Jan 19 21:49:15 2013):

The system is going down for reboot NOW!

prodappsrv11:~ # ethtool -i eth0  -Drv & FW are updated.

driver: be2net
version: 4.1.402.6
firmware-version: 4.1.402.20
bus-info: 0000:02:00.0


! cannot start cron; FIFO exists


                        As cron schedule has not run / skipped on one of the servers, I’ve to restart the ” cron ” daemon and when i tried to do it, i ran me into a message like below :-

     # /usr/sbin/cron

     # ! cannot start cron; FIFO exists Wed Sep  5 01:27:03 2012
       ! ******* CRON ABORTED ******** Wed Sep  5 01:27:03 2012

The solution to FIX this error is very simple, all we have to do is this –

      # rm -rf /etc/cron.d/FIFO     # Remove FIFO file from /etc/cron.d
   
      # /usr/sbin/cron                   # restart the cron daemon by /usr/sbin/cron binary.
                                                 # Arg’s like start / stop can’t be passed for binaries.

 OR By

– SunOS 5.10 
                         /lib/svc/method/svc-cron stop
                         /lib/svc/method/svc-cron start

– less than SunOS 5.10
                                                /etc/init.d/cron stop
                                                /etc/init.d/cron start

      # ps -ef | grep -i cron
          root 19903 17926  0 01:30:16 pts/5    0:00 grep -i cron
          root 19675     1  0 01:30:06 ?        0:00 /usr/sbin/cron

I’ve faced this issue in Solaris 8 Operating System as seen below.

      # uname -a
         SunOS serv1 5.8 Generic_117350-41 sun4u sparc SUNW,Sun-Fire-V240

Execute the scripts / commands as other user without being prompted for password.


                The other day i’ve come across a scenario where application users ( they user user ID called ‘chkprod’ ) wanted to execute certain scripts and few default UNIX commands as other user ID called nobody without being prompted for password authentication.

Here is how i could do it :

[root@applprod01 ~]# visudo                    # Editing /etc/sudoers file.

# Added the following lines to the file and saved it.

chkprod ALL=(nobody) NOPASSWD: /usr/local/app/web/etc/*     # all the scripts in ../etc/
chkprod ALL=(nobody) NOPASSWD: /bin/chown                        # Access to chown alone.

      * Now that required changes are done to `sudoers` file, `chkprod` user can execute the commands / scripts as `nobody` user by giving like this.

*** Should be logged in as `chkprod` before executing below commands ***

[chkprod@applprod01 ~]sudo -u nobody /bin/chown isiprod:prod test
[chkprod@applprod01 ~]# sudo -u nobody /usr/local/app/web/etc/