Thursday, 5 November 2015

CISCO SWITCH ADMIN PART-1 (MDS 9148 switch firmware up gradation/administration)


FIRMWARE UPGRADATION OF CISCO MDS 9148 SWITCH

# ssh admin@(IP OF SWITCH)
Password:
Cisco Nexus Operating System (NX-OS) Software

1)To show vesion
EDGESWITCH# show version

Software
  BIOS:      version 1.0.18
  loader:    version N/A
  kickstart: version 5.0(1a)
  system:    version 5.0(1a)
  BIOS compile time:       01/07/10
  kickstart image file is: bootflash:/m9100-s3ek9-kickstart-mz.5.0.1a.bin
  kickstart compile time:  12/25/2020 12:00:00 [02/21/2010 20:09:44]
  system image file is:    bootflash:/m9100-s3ek9-mz.5.0.1a.bin
  system compile time:     2/2/2010 17:00:00 [02/21/2010 23:13:41]

Hardware
  cisco MDS 9148 FC (1 Slot) Chassis ("1/2/4/8 Gbps FC/Supervisor-3")
  Motorola, e500v2  with 1036308 kB of memory.
  Processor Board ID JAF1642ANFC
  Device name: IDC1-SW05
  bootflash:    1000944 kB
Kernel uptime is 0 day(s), 2 hour(s), 29 minute(s), 4 second(s)
Last reset
  Reason: Unknown
  System version: 5.0(1a)
  Service:
EDGESWITCH# dir bootflash:
        950    Oct 21 23:04:07 2012  license_AMS16350858_15.lic
      16384    Oct 21 22:59:21 2012  lost+found/
   18693120    Oct 21 23:00:58 2012  m9100-s3ek9-kickstart-mz.5.0.1a.bin
   73579433    Oct 21 23:03:36 2012  m9100-s3ek9-mz.5.0.1a.bin
       2085    Oct 11 06:06:04 2013  mts.log
Usage for bootflash://sup-local
  143601664 bytes used
  533508096 bytes free
  677109760 bytes total
2)copy Firmware files (m9100-s3ek9-mz.6.2.3.bin & m9100-s3ek9-kickstart-mz.6.2.3.bin)
EDGESWITCH# copy ftp://<SERVERIP>/tmp/nos/9148/m9100-s3ek9-mz.6.2.3.bin  bootflash:
Enter username: sap
Password:

EDGESWITCH# dir bootflash:
        950    Oct 21 23:04:07 2012  license_AMS16350858_15.lic
      16384    Oct 21 22:59:21 2012  lost+found/
   18693120    Oct 21 23:00:58 2012  m9100-s3ek9-kickstart-mz.5.0.1a.bin
   19984384    Oct 11 08:36:34 2013  m9100-s3ek9-kickstart-mz.6.2.3.bin
   73579433    Oct 21 23:03:36 2012  m9100-s3ek9-mz.5.0.1a.bin
   73345328    Oct 11 08:37:10 2013  m9100-s3ek9-mz.6.2.3.bin
       2085    Oct 11 06:06:04 2013  mts.log
Usage for bootflash://sup-local
  237035520 bytes used
  440074240 bytes free
  677109760 bytes total


3)upgrade switches

# install all kickstart bootflash:m9100-s3ek9-kickstart-mz.6.2.3.bin system bootflash:m9100-s3ek9-mz.6.2.3.bin

Verifying image bootflash:/m9100-s3ek9-kickstart-mz.6.2.3.bin for boot variable "kickstart".
[####################] 100% -- SUCCESS
Verifying image bootflash:/m9100-s3ek9-mz.6.2.3.bin for boot variable "system".
[####################] 100% -- SUCCESS
Verifying image type.
[####################] 100% -- SUCCESS
Extracting "system" version from image bootflash:/m9100-s3ek9-mz.6.2.3.bin.
[####################] 100% -- SUCCESS
Extracting "kickstart" version from image bootflash:/m9100-s3ek9-kickstart-mz.6.2.3.bin.
[####################] 100% -- SUCCESS
Extracting "bios" version from image bootflash:/m9100-s3ek9-mz.6.2.3.bin.
[#                   ]   0%                                                    [####################] 100% -- SUCCESS
Performing Compact Flash and TCAM sanity test.
[####################] 100% -- SUCCESS
Performing module support checks.                                              [####################] 100% -- SUCCESS
Notifying services about system upgrade.                                       [####################] 100% -- SUCCESS

Compatibility check is done:
Module  bootable          Impact  Install-type  Reason
------  --------  --------------  ------------  ------
     1       yes  non-disruptive         reset

Images will be upgraded according to following table:
Module       Image                  Running-Version(pri:alt)           New-Version  Upg-Required
------  ----------  ----------------------------------------  --------------------  ------------
     1      system                                   5.0(1a)                6.2(3)           yes
     1   kickstart                                   5.0(1a)                6.2(3)           yes
     1        bios     v1.0.18(01/07/10):  v1.0.18(01/07/10)     v1.0.19(02/01/10)           yes

Do you want to continue with the installation (y/n)?  [n]

EDGESWITCH# install all kickstart bootflash:m9100-s3ek9-kickstart-mz.6.2.3.bin system bootflash:m9100-s3ek9-mz.6.2.3.bin
Verifying image bootflash:/m9100-s3ek9-kickstart-mz.6.2.3.bin for boot variable "kickstart".
[####################] 100% -- SUCCESS
Verifying image bootflash:/m9100-s3ek9-mz.6.2.3.bin for boot variable "system".
[####################] 100% -- SUCCESS
Verifying image type.
[####################] 100% -- SUCCESS
Extracting "system" version from image bootflash:/m9100-s3ek9-mz.6.2.3.bin.
[####################] 100% -- SUCCESS
Extracting "kickstart" version from image bootflash:/m9100-s3ek9-kickstart-mz.6.2.3.bin.
[####################] 100% -- SUCCESS
Extracting "bios" version from image bootflash:/m9100-s3ek9-mz.6.2.3.bin.
[####################] 100% -- SUCCESS
Performing Compact Flash and TCAM sanity test.
[####################] 100% -- SUCCESS
Performing module support checks.                                              [####################] 100% -- SUCCESS
Notifying services about system upgrade.                                       [####################] 100% -- SUCCESS

Compatibility check is done:
Module  bootable          Impact  Install-type  Reason
------  --------  --------------  ------------  ------
     1       yes  non-disruptive         reset

Images will be upgraded according to following table:
Module       Image                  Running-Version(pri:alt)           New-Version  Upg-Required
------  ----------  ----------------------------------------  --------------------  ------------
     1      system                                   5.0(1a)                6.2(3)           yes
     1   kickstart                                   5.0(1a)                6.2(3)           yes
     1        bios     v1.0.18(01/07/10):  v1.0.18(01/07/10)     v1.0.19(02/01/10)           yes

Do you want to continue with the installation (y/n)?  [n] y
Install is in progress, please wait.
Performing runtime checks.                                                     [####################] 100% -- SUCCESS
Notifying services about the upgrade.                                          [####################] 100% -- SUCCESS
Setting boot variables.
[####################] 100% -- SUCCESS
Performing configuration copy.
[####################] 100% -- SUCCESS
Module 1: Refreshing compact flash and upgrading bios/loader/bootrom.
Warning: please do not remove or power off the module at this time.
[####################] 100% -- SUCCESS
Upgrade can no longer be aborted, any failure will result in a disruptive upgrade.
Freeing memory in the file system.                                             [####################] 100% -- SUCCESS
Loading images into memory.                                                    [####################] 100% -- SUCCESS
Saving linecard runtime state.                                                 [####################] 100% -- SUCCESS
Saving supervisor runtime state.                                               [####################] 100% -- SUCCESS
Saving mts state.                                                              [####################] 100% -- SUCCESS
Rebooting the switch to proceed with the upgrade.

# ssh admin@xx.xx.xx.xx

Password:
EDGESWITCH# show version

Software
  BIOS:      version 1.0.19
  loader:    version N/A
  kickstart: version 6.2(3)
  system:    version 6.2(3)
  BIOS compile time:       02/01/10
  kickstart image file is: bootflash:///m9100-s3ek9-kickstart-mz.6.2.3.bin
  kickstart compile time:  7/10/2013 2:00:00 [07/31/2013 10:05:08]
  system image file is:    bootflash:///m9100-s3ek9-mz.6.2.3.bin
  system compile time:     7/10/2013 2:00:00 [07/31/2013 11:15:29]

Hardware
  cisco MDS 9148 FC (1 Slot) Chassis ("1/2/4/8 Gbps FC/Supervisor-3")
  Motorola, e500v2  with 1036300 kB of memory.
  Processor Board ID JAF1642ANFC
  Device name: IDC1-SW05
  bootflash:    1000944 kB
Kernel uptime is 0 day(s), 0 hour(s), 2 minute(s), 44 second(s)
Last reset at 431992 usecs after  Fri Oct 11 08:45:32 2013
  Reason: Reset due to upgrade
  System version: 5.0(1a)
  Service:
IDC1-SW05#
IDC1-SW05# reload
This command will reboot the system. (y/n)?  [n] y
Read from remote host 10.128.38.55: Connection reset by peer
Connection to 10.128.38.55 closed.
sap@P072XSTRMG # ssh admin@xx.xx.xx.xx
Could not create directory '/home/sap/.ssh'.
The authenticity of host '10.128.38.55 (10.128.38.55)' can't be established.
RSA key fingerprint is a8:ab:9b:b0:39:a8:15:03:c2:ee:76:73:96:09:14:4f.
Are you sure you want to continue connecting (yes/no)? yes
Failed to add the host to the list of known hosts (/home/sap/.ssh/known_hosts).
User Access Verification
Password:
Cisco Nexus Operating System (NX-OS) Software
Copyright (c) 2002-2013, Cisco Systems, Inc. All rights reserved.
The copyrights to certain works contained in this software are
owned by other third parties and used and distributed under
license. Certain components of this software are licensed under
the GNU General Public License (GPL) version 2.0 or the GNU
Lesser General Public License (LGPL) Version 2.1. A copy of each
such license is available at

IDC1-SW05#
IDC1-SW05# show version
Cisco Nexus Operating System (NX-OS) Software
Copyright (c) 2002-2013, Cisco Systems, Inc. All rights reserved.
The copyrights to certain works contained herein are owned by
other third parties and are used and distributed under license.
Some parts of this software are covered under the GNU Public
License. A copy of the license is available at
Software
  BIOS:      version 1.0.19
  loader:    version N/A
  kickstart: version 6.2(3)
  system:    version 6.2(3)
  BIOS compile time:       02/01/10
  kickstart image file is: bootflash:///m9100-s3ek9-kickstart-mz.6.2.3.bin
  kickstart compile time:  7/10/2013 2:00:00 [07/31/2013 10:05:08]
  system image file is:    bootflash:///m9100-s3ek9-mz.6.2.3.bin
  system compile time:     7/10/2013 2:00:00 [07/31/2013 11:15:29]

Hardware
  cisco MDS 9148 FC (1 Slot) Chassis ("1/2/4/8 Gbps FC/Supervisor-3")
  Motorola, e500v2  with 1036300 kB of memory.
  Processor Board ID JAF1642ANFC
  Device name: IDC1-SW05
  bootflash:    1000944 kB
Kernel uptime is 0 day(s), 0 hour(s), 2 minute(s), 7 second(s)
Last reset at 856438 usecs after  Fri Oct 11 08:49:19 2013
  Reason: Reset Requested by CLI command reload
  System version: 6.2(3)
  Service:


===============
1.To SHOW MODULE:-
IDC1-CSW02# show module
Mod  Ports  Module-Type                         Model              Status
---  -----  ----------------------------------- ------------------ ----------
1    32     1/2/4/8/10 Gbps Advanced FC Module  DS-X9232-256K9     ok
2    32     1/2/4/8/10 Gbps Advanced FC Module  DS-X9232-256K9     ok
3    32     1/2/4/8/10 Gbps Advanced FC Module  DS-X9232-256K9     ok
4    32     1/2/4/8/10 Gbps Advanced FC Module  DS-X9232-256K9     ok
7    0      Supervisor/Fabric-2a                DS-X9530-SF2AK9    active *
8    0      Supervisor/Fabric-2a                DS-X9530-SF2AK9    ha-standby
Mod  Sw              Hw      World-Wide-Name(s) (WWN)
---  --------------  ------  --------------------------------------------------
1    6.2(3)          1.1     20:01:54:7f:ee:af:95:40 to 20:20:54:7f:ee:af:95:40
2    6.2(3)          1.1     20:41:54:7f:ee:af:95:40 to 20:60:54:7f:ee:af:95:40
3    6.2(3)          1.1     20:81:54:7f:ee:af:95:40 to 20:a0:54:7f:ee:af:95:40
4    6.2(3)          1.1     20:c1:54:7f:ee:af:95:40 to 20:e0:54:7f:ee:af:95:40
7    6.2(3)          1.4     --
8    6.2(3)          1.4     --

Mod  MAC-Address(es)                         Serial-Num
---  --------------------------------------  ----------
1    68-ef-bd-a8-da-dc to 68-ef-bd-a8-da-df  JAF1723AABS
2    68-ef-bd-a8-db-44 to 68-ef-bd-a8-db-47  JAF1723AADD
3    68-ef-bd-a8-db-38 to 68-ef-bd-a8-db-3b  JAF1723AACA
4    68-ef-bd-a8-da-a0 to 68-ef-bd-a8-da-a3  JAF1723AABA
7    c8-9c-1d-41-d3-3c to c8-9c-1d-41-d3-3f  JAF1722BFSF
8    c8-9c-1d-41-d3-2c to c8-9c-1d-41-d3-2f  JAF1723ACAK
Xbar Ports  Module-Type                         Model              Status
---  -----  ----------------------------------- ------------------ ----------
1    0      Fabric Module 3                     DS-13SLT-FAB3      ok
2    0      Fabric Module 3                     DS-13SLT-FAB3      ok
Xbar Sw              Hw      World-Wide-Name(s) (WWN)
---  --------------  ------  --------------------------------------------------
1    NA              1.4     --
2    NA              1.4     --

Xbar MAC-Address(es)                         Serial-Num
---  --------------------------------------  ----------
1    NA                                      JAF1721ANEA
2    NA                                      JAF1721ANGN
* this terminal session

edge switch:-
IDC1-SW06# show module
Mod  Ports  Module-Type                         Model              Status
---  -----  ----------------------------------- ------------------ ----------
1    48     1/2/4/8 Gbps FC/Supervisor-3        DS-C9148-K9-SUP    active *
Mod  Sw              Hw      World-Wide-Name(s) (WWN)
---  --------------  ------  --------------------------------------------------
1    6.2(3)          1.1     20:01:54:7f:ee:b8:08:d8 to 20:30:54:7f:ee:b8:08:d8

Mod  MAC-Address(es)                         Serial-Num
---  --------------------------------------  ----------
1    30-f7-0d-c9-8b-c8 to 30-f7-0d-c9-8b-cb  JAF1642ANJH
* this terminal session

===========================================
2)To see the interface information
IDC1-CSW02(config)# show interface
fc1/1 is up
    Hardware is Fibre Channel, SFP is short wave laser w/o OFC (SN)
    Port WWN is 20:01:54:7f:ee:af:95:40
    Admin port mode is FX, trunk mode is on
    snmp link state traps are enabled
    Port mode is F, FCID is 0x090000
    Port vsan is 20
    Speed is 8 Gbps
    Rate mode is shared
    Transmit B2B Credit is 20
    Receive B2B Credit is 32
    Receive data field Size is 2112
    Beacon is turned off
    5 minutes input rate 4314112 bits/sec,539264 bytes/sec, 266 frames/sec
    5 minutes output rate 24544 bits/sec,3068 bytes/sec, 59 frames/sec
      128838407 frames input,164820321624 bytes
        0 discards,0 errors
        0 invalid CRC/FCS,0 unknown class
        0 too long,0 too short
      420867885 frames output,810133110612 bytes
        0 discards,0 errors
      0 input OLS,0  LRR,0 NOS,0 loop inits
      1 output OLS,1 LRR, 0 NOS, 1 loop inits
      32 receive B2B credit remaining
      20 transmit B2B credit remaining
      20 low priority transmit B2B credit remaining
    Interface last changed at Fri Nov 15 09:47:29 2013
    Last clearing of "show interface" counters  :never
similarly it shows all switch ports
=============================================================
3)to show all switch interfaces information breafly
IDC1-CSW02(config)# show interface brief
-------------------------------------------------------------------------------
Interface  Vsan   Admin  Admin   Status       SFP    Oper  Oper   Port
                  Mode   Trunk                       Mode  Speed  Channel
                         Mode                              (Gbps)
-------------------------------------------------------------------------------
fc1/1      20     FX     on      up           swl   F      8      --
fc1/2      20     FX     on      up           swl   F      8      --
fc1/3      20     FX     on      up           swl   F      8      --
fc1/4      20     FX     on      up           swl   F      8      --
fc1/5      20     FX     on      up           swl   F      8      --
fc1/6      20     FX     on      up           swl   F      8      --
fc1/7      20     auto   on      trunking     swl   TE     8      --
;
;
;
fc1/12     20     FX     on      notConnected swl    --    --     --
;
;
fc1/23     20     auto   on      trunking     swl   TE     8      --
fc1/24     20     auto   on      trunking     swl   TE     8      --
;
;
fc4/23     20     auto   on      trunking     swl   TE     8      --
fc4/24     20     auto   on      trunking     swl   TE     8      --
fc4/25     20     FX     on      up           swl   F      8      --
fc4/26     20     FX     on      notConnected swl    --    --     --
fc4/27     20     FX     on      up           swl   F      8      --
fc4/28     20     FX     on      notConnected swl    --    --     --
fc4/29     20     FX     on      up           swl   F      8      --
fc4/30     20     FX     on      notConnected swl    --    --     --
fc4/31     20     FX     on      up           swl   F      8      --
fc4/32     20     FX     on      notConnected swl    --    --     --
-------------------------------------------------------------------------------
Interface                Status                            Speed
                                                           (Gbps)
-------------------------------------------------------------------------------
sup-fc0                  up                                1
-------------------------------------------------------------------------------
Interface               Status     IP Address         Speed     MTU
-------------------------------------------------------------------------------
mgmt0                    up         10.128.38.50/27    1 Gbps   1500

========================================================

4)to show version of switch
IDC1-CSW02(config)# show version

Software
  BIOS:      version 1.0.10
  loader:    version N/A
  kickstart: version 6.2(3)
  system:    version 6.2(3)
  BIOS compile time:       01/08/09
  kickstart image file is: bootflash:///m9500-sf2ek9-kickstart-mz.6.2.3.bin
  kickstart compile time:  7/10/2013 2:00:00 [07/31/2013 10:05:06]
  system image file is:    bootflash:///m9500-sf2ek9-mz.6.2.3.bin
  system compile time:     7/10/2013 2:00:00 [07/31/2013 11:31:55]

Hardware
  cisco MDS 9513 (13 Slot) Chassis ("Supervisor/Fabric-2a")
  Motorola, 7447A, altivec  with 2071288 kB of memory.
  Processor Board ID JAF1722BFSF
  Device name: IDC1-CSW02
  bootflash:    1000944 kB
  slot0:              0 kB (expansion flash)
Kernel uptime is 14 day(s), 0 hour(s), 25 minute(s), 57 second(s)
Last reset at 232586 usecs after  Fri Nov 15 09:41:51 2013
  Reason: Reset Requested by CLI command reload
  System version: 6.2(3)
  Service:
plugin
  Core Plugin


5)How to change switch port speed
IDC1-CSW02(config)# interface fc3/15
IDC1-CSW02(config-if)# show interface fc3/15
fc3/15 is up
    Hardware is Fibre Channel, SFP is short wave laser w/o OFC (SN)
    Port WWN is 20:8f:54:7f:ee:af:95:40
    Admin port mode is FX, trunk mode is on
    snmp link state traps are enabled
    Port mode is F, FCID is 0x0904a0
    Port vsan is 20
    Speed is 8 Gbps
    Rate mode is shared
    Transmit B2B Credit is 20
    Receive B2B Credit is 32
    Receive data field Size is 2112
    Beacon is turned off
    5 minutes input rate 0 bits/sec,0 bytes/sec, 0 frames/sec
    5 minutes output rate 0 bits/sec,0 bytes/sec, 0 frames/sec
      13 frames input,1132 bytes
        0 discards,0 errors
        0 invalid CRC/FCS,0 unknown class
        0 too long,0 too short
      13 frames output,896 bytes
        0 discards,0 errors
      0 input OLS,0  LRR,0 NOS,0 loop inits
      1 output OLS,1 LRR, 0 NOS, 1 loop inits
      32 receive B2B credit remaining
      20 transmit B2B credit remaining
      20 low priority transmit B2B credit remaining
    Interface last changed at Fri Nov 15 09:47:32 2013
    Last clearing of "show interface" counters  :never
IDC1-CSW02(config-if)# show interface fc3/15 brief
-------------------------------------------------------------------------------
Interface  Vsan   Admin  Admin   Status       SFP    Oper  Oper   Port
                  Mode   Trunk                       Mode  Speed  Channel
                         Mode                              (Gbps)
-------------------------------------------------------------------------------
fc3/15     20     FX     on      up           swl   F      8      --
IDC1-CSW02(config-if)# switchport speed 4000
IDC1-CSW02(config-if)# show interface fc3/15 brief
-------------------------------------------------------------------------------
Interface  Vsan   Admin  Admin   Status       SFP    Oper  Oper   Port
                  Mode   Trunk                       Mode  Speed  Channel
                         Mode                              (Gbps)
-------------------------------------------------------------------------------
fc3/15     20     FX     on      up           swl   F      4      --
IDC1-CSW02(config-if)# switchport speed auto
IDC1-CSW02(config-if)# show interface fc3/15 brief
-------------------------------------------------------------------------------
Interface  Vsan   Admin  Admin   Status       SFP    Oper  Oper   Port
                  Mode   Trunk                       Mode  Speed  Channel
                         Mode                              (Gbps)
-------------------------------------------------------------------------------
fc3/15     20     FX     on      up           swl   F      8      --


6)PORT MODES
  FC port have only one mode at a time
  16 prot blade/slot default mode is AUTO
  32 port blade/slot default mode is FX
modes:-
i)E  --> used for expansion of fabric i.e one end of ISL
ii)F --> used for host/san i.e end devices
iii)N --> for end devices side
iv)FL --> for loop devices
v)Fx  --> for
vi)G  -->generic port
vii)SD 
iix)St
ix)TL
x)U


Solaris 11.3 Enterprise Cloud OS released.

Solaris 11.3 Enterprise OS released.
Solaris 4.3 Cluster Released.
Oracle VM 3.3 for sparc is released.
Sparc - 7 Processor servers available.

Friday, 21 August 2015

RHEL cluster 3.X installation & configuration.

SERVERS:10.25.12.20/10.25.12.25
RHEL  6: Configuring a cman-based cluster to use a specific network interface
1)Define all nodes in /etc/hosts.
If these nodes do not have any pre-existing hostname on that network, then names can be assigned to them in this file,
 as long as those names don't conflict with others hosts on the network.
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.143.61 node1.google.com node1
192.168.143.62 node2.google.com node2
Note: configure above ip's manullay on both nodes for private communication.
2)RPM need to install on both nodes.
Note: - Configure YUM on web
#mkdir -p /var/www/html/RHEL6/u5/Server/x86_64/
#cp -R /cdrom/* /var/www/html/RHEL6/u5/Server/x86_64/
#chmod a+rx -R /var/www/html/RHEL6/u5/Server/x86_64/
#service httpd start
#chcon -R -t httpd_sys_content_t /var/www/html/RHEL6/u5/Server/x86_64/
make entries in repo configuration file.
[or]
local repository cofiguration.
copy dvd into required location(/var/ftp/pub/RHEL6).
#vi  /etc/yum.repos.d/rhel-source.repo
[rhel-source]
name=Server
baseurl=file:///var/ftp/pub/RHEL6/Server
enabled=1
gpgcheck=0
[HighAvailability]
name=HighAvailability
baseurl=file:///var/ftp/pub/RHEL6/HighAvailability
enabled=1
gpgcheck=0
[LoadBalancer]
name=LoadBalancer
baseurl=file:///var/ftp/pub/RHEL6/LoadBalancer
enabled=1
gpgcheck=0
[ScalableFileSystem]
name=ScalableFileSystem
baseurl=file:///var/ftp/pub/RHEL6/ScalableFileSystem
enabled=1
gpgcheck=0
[ResilientStorage]
name=ResilientStorage
baseurl=file:///var/ftp/pub/RHEL6/ResilientStorage
enabled=1
gpgcheck=0
# yum repolist
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
HighAvailability                                                                                                                                 | 3.9 kB     00:00 ...
LoadBalancer                                                                                                                                     | 3.9 kB     00:00 ...
ResilientStorage                                                                                                                                 | 3.9 kB     00:00 ...
ScalableFileSystem                                                                                                                               | 3.9 kB     00:00 ...
rhel-source                                                                                                                                      | 3.9 kB     00:00 ...
repo id                                                                          repo name                                                                        status
HighAvailability                                                                 HighAvailability                                                                    56
LoadBalancer                                                                     LoadBalancer                                                                         4
ResilientStorage                                                                 ResilientStorage                                                                    62
ScalableFileSystem                                                               ScalableFileSystem                                                                   7
rhel-source                                                                      Server                                                                           3,690
repolist: 3,819
yum install gfs2-utils
yum install rgmanager
yum groupinstall "highavailabulity"
rpm -qa | egrep -i "ricci|luci|cluster|ccs|cman|gfs2"
yum groupinstall  Resilient*
yum install -y pacemaker
LUCI user & Ricci user is created while installing cluster
ricci:x:140:140:ricci daemon user:/var/lib/ricci:/sbin/nologin
luci:x:141:141:luci high availability management application:/var/lib/luci:/sbin/nologin
hacluster:x:494:489:heartbeat user:/var/lib/heartbeat/cores/hacluster:/sbin/nologin
please reset passd for above users.
#passwd ricci
#passwd luci
#passwd hacluser



3)Starting Cluster Software
type the following commands in this order:
1)service cman start
2)service clvmd start -----> if CLVM has been used to create clustered volumes
3)service gfs2 start---------> if you are using Red Hat GFS2
4)service rgmanager start--------> if you using high-availability (HA) services (rgmanager).
--------
To stop the cluster software on a node,
type the following commands in this order:
1)service rgmanager stop
2)service gfs2 stop
3)umount -at gfs2
4)service clvmd stop
5)service cman stop
4) Staring Cluster GUI .
# yum install luci
# service luci start
Starting luci: generating https SSL certificates...  done
                                                           [  OK  ]
/etc/sysconfig/luci is configuration file.
https://10.25.12.20:8084/

By using gui we need to configure
1) Clster name
2) cluster members
3) fencing
4) quorum devices
5)resources,& service groups.

5) then it generates cluster.conf file
6. After completing configuration of the rest of the necessary components and starting the cman service, check cman_tool status to see what addresses the nodes are communicating over:
Raw
[root@node1 ~]# cman_tool status | grep "Node addresses"
Node addresses: 192.168.143.61
Raw
[root@node2 ~]# cman_tool status | grep "Node addresses"
Node addresses: 192.168.143.62
Product(s) Red Hat Enterprise Linux Component cluster
Category Learn



7) Creating GFS file system is mandatiory.
after install cluster tools then only configure pvs,vgs,lvs other wise it does not recognize.
crateating volume:-
before creating volume with out cluster install ??
# service clvmd status
clvmd (pid  2121) is running...
Clustered Volume Groups: (none)
Active clustered Logical Volumes: (none)
# lvremove posdb1datavol  posdb1datavg
  Volume group "posdb1datavol" not found
  Skipping volume group posdb1datavol
Do you really want to remove active logical volume posdb1datavol? [y/n]: y
  Logical volume "posdb1datavol" successfully removed

# pvs
  PV         VG           Fmt  Attr PSize   PFree
  /dev/sdb   posdb1datavg lvm2 a--  200.00g 200.00g
[root@hydposdb1 ~]# vgs
  VG           #PV #LV #SN Attr   VSize   VFree
  posdb1datavg   1   0   0 wz--n- 200.00g 200.00g

# pvcreate /dev/sdb
  clvmd not running on node posdb_node1.google.co.in
  Can't get lock for orphan PVs

# service clvmd stop
Signaling clvmd to exit                                    [  OK  ]
clvmd terminated                                           [  OK  ]
# pvcreate /dev/sdb
  connect() failed on local socket: No such file or directory
  Internal cluster locking initialisation failed.
  WARNING: Falling back to local file-based locking.
  Volume Groups with the clustered attribute will be inaccessible.
  Physical volume "/dev/sdb" successfully created
# pvs
  connect() failed on local socket: No such file or directory
  Internal cluster locking initialisation failed.
  WARNING: Falling back to local file-based locking.
  Volume Groups with the clustered attribute will be inaccessible.
  PV         VG   Fmt  Attr PSize   PFree
  /dev/sdb        lvm2 a--  200.00g 200.00g
# service clvmd start
Starting clvmd:
Activating VG(s):   No volume groups found
                                                           [  OK  ]
# pvs
  PV         VG   Fmt  Attr PSize   PFree
  /dev/sdb        lvm2 a--  200.00g 200.00g

# vgcreate posdbdatavg /dev/sdb
  Clustered volume group "posdbdatavg" successfully created
[root@hydposdb1 ~]# service clvmd status
clvmd (pid  17090) is running...
Clustered Volume Groups: posdbdatavg
Active clustered Logical Volumes: (none)
# lvcreate -L 199G -n posdbdatavol posdbdatavg
  Logical volume "posdbdatavol" created
# lvs
  LV           VG          Attr       LSize   Pool Origin Data%  Move Log Cpy%Sync Convert
  posdbdatavol posdbdatavg -wi-a----- 199.00g
# service clvmd status
clvmd (pid  17090) is running...
Clustered Volume Groups: posdbdatavg
Active clustered Logical Volumes: posdbdatavol
To create GFS file system.
#  mkfs.gfs2 -t pos_cluster:posvol_gfs -p lock_dlm -j 3 /dev/posdbdatavg/posdbdatavol
This will destroy any data on /dev/posdbdatavg/posdbdatavol.
It appears to contain: symbolic link to `../dm-0'
Are you sure you want to proceed? [y/n] y
Device:                    /dev/posdbdatavg/posdbdatavol
Blocksize:                 4096
Device Size                199.00 GB (52166656 blocks)
Filesystem Size:           199.00 GB (52166654 blocks)
Journals:                  3
Resource Groups:           796
Locking Protocol:          "lock_dlm"
Lock Table:                "pos_cluster:posvol_gfs"
UUID:                      79bd19f4-478a-65b1-b563-b537cfa15f46

mkfs -t gfs2 -p lock_dlm -j 2 -t <cluster>:<name>  /volumefullpath

8)Testing command line:-
# clustat
Cluster Status for poc_cluster @ Sat May 16 12:34:46 2015
Member Status: Quorate
 Member Name                                                     ID   Status
 ------ ----                                                     ---- ------
 node1.google.co.in                                                   1 Online, rgmanager
 node2.google.co.in                                                   2 Online, Local, rgmanager
 Service Name                                                     Owner (Last)                                                     State
 ------- ----                                                     ----- ------                                                     -----
 service:pos                                                      (node1.google.co.in)                                              disabled
2)To enable service
#clusvcadm -e pos   -m hostnme
3)To restart service on running node.
#clusvcadm -R service_name
3)To stop service on running node.
#clusvcadm -s service_name
4)To freeze service on running node.
#clusvcadm -Z service_name
5)To unfreeze service on running node.
#clusvcadm -U service_name
6)To move service to another node.
#clusvcadm -r service_name


===================
RHEL 7: Configuring a corosync-based cluster to use a specific network interface.
1. Define all nodes in /etc/hosts.
 If these nodes do not have any pre-existing hostname on that network, then names can be assigned to them in this file,
 as long as those names don't conflict with others hosts on the network.

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.143.61 node1.example.com node1
192.168.143.62 node2.example.com node2
2. Set up the cluster with pcs,
the pcsd web interface, or directly in /etc/corosync/corosync.conf, specifying names matching those that were added in /etc/hosts. For example:

# pcs cluster setup --name myCluster node1.example.com node2.example.com
Which would produce a nodelist definition in /etc/corosync/corosync.conf with those names as the "ring0_addr" for each node:
Raw
nodelist {
  node {
        ring0_addr: node1.example.com
        nodeid: 1
       }
  node {
        ring0_addr: node2.example.com
        nodeid: 2
       }
}














NOTE: RHEL 7 corosync supports the usage of Redundant Ring Protocol in which multiple redundant interfaces can be used to communicate in the cluster.
In such configurations, the "ring1_addr" should be defined in /etc/hosts the same way the primary name was.
3. Upon starting the cluster with pcs cluster start [--all], check the output of corosync-cfgtool on each node to see what addresses are being used for node communication:
[root@node1 ~]# corosync-cfgtool -s
Printing ring status.
Local node ID 1
RING ID 0
    id  = 192.168.143.61
    status  = ring 0 active with no faults
[root@node1 ~]# corosync-cfgtool -s
Printing ring status.
Local node ID 1
RING ID 0
    id  = 192.168.143.62
    status  = ring 0 active with no faults

Post fix configuration / to flush / remove mailq

# postfix flush
OR
# postfix -f
To see mail queue, enter:
# mailq
To remove all mail from the queue, enter:
# postsuper -d ALL
To remove all mails in the deferred queue, enter:
# postsuper -d ALL deferred
 vi /etc/postfix/main.cf
relayhost = 172.16.7.185

Scripts : how to ping mulitple server from centralized server ?

#!/bin/bash
for i in `cat /tmp/server`
do
ping -q -c 1 $i > /tmp/null
if [ $? -eq 0 ]
then
   echo  " $i server is up & running fine"
else
   echo " $i server is down -- NEED ADMIN HELP"
fi
done

how to restart ovmm-console in OVM server??

Login in OVM server on which guest vm contains & execute below


#rm /var/run/ovm-consoled.pid

#service ovm-consoled start

Kernel upgradation in RHEL

Kernal Software :-
kernel debuginfo is required for vmcore analysis
debug kernel is compiled to troubleshoot issue
kernel - devel and headers is for compiling new kernel
kerne - doc is documentation
For kernel upgradation below two RPM's are mandatory.
kernel-2.6.32-431.el6.x86_64
kernel-firmware-2.6.32-431.el6.noarch
#rpm -ivh kernel-2.6.32-431.el6.x86_64
#rpm -ivh kernel-firmware-2.6.32-431.el6.noarch
#reboot