»
S
I
D
E
B
A
R
«
CISCO Catalyst Tips & Tricks
Apr 22nd, 2008 by admin

Sometime it’s required for me to change the port setting on a CISCO switch for a particular machine remotely. So it becomes necessary to somehow identify the port on which that machine is connected to. It’s basically a two step approach:

1. Get the MAC address of the machine

[root@linux-node03 ~]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:19:B9:E6:C6:78
          inet addr:172.16.2.251  Bcast:172.16.255.255  Mask:255.255.0.0
          inet6 addr: fe80::219:b9ff:fee6:c678/64
          Scope:LinkUP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:10631 errors:0 dropped:0 overruns:0 frame:0
          TX packets:90 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1037012 (1012.7 KiB)  TX bytes:17701 (17.2 KiB)
          Interrupt:169 Memory:f8000000-f8011100

2. Get the associated port number on the CISCO switch

cisco-3750-01#show mac-address
          Mac Address Table
-------------------------------------------
Vlan    Mac Address       Type        Ports
----    -----------       --------    -----
All    0100.0ccc.cccc    STATIC      CPU
All    0100.0ccc.cccd    STATIC      CPU
  -           -              -         -
  -           -              -         -
  -           -              -         -
  1    0019.b9e6.c678    DYNAMIC     Gi2/0/18
  1    0019.b9e6.d18f    DYNAMIC     Gi2/0/21

Total Mac Addresses for this criterion: XX

The port number for the MAC address 00:19:B9:E6:C6:78 is Gi2/0/18

Rocks: Avoid external storage on kickstart install
Apr 22nd, 2008 by admin

When external storage is connected to the rocks nodes (compute nodes) then there is are chances that those block devices can get destroyed during the kickstart process when the nodes gets re-imaged over the network automatically. In order to make sure that the SAN connected volumes are not destroyed I use a method by which I make sure that the driver module for the SAN device is not loaded thus it would not scan the additional block devices.

This could be easily achieved by passing the option nostorage to the kernel during boot process which will ignore all the storage drivers. Then we can manually specify the drivers that we would like to load. The string that works for my hardware is


"nostorage driverload=sd_mod:mptbase:mptscsih:mptsas:aacraid:mptscsih:libata"

For rocks I place the above modification on to the file “/tftpboot/pxelinux/pxelinux.cfg/default”. All that is required is to append the above string to the kernel line. My /tftpboot/pxelinux/pxelinux.cfg/default file looks like:


# cat default
default ks
prompt 0
label ks
kernel vmlinuz append ks initrd=initrd.img ramdisk_size=150000 lang= \
       devfs=nomount pxe kssendmac selinux=0

After the change the file would look something like


# cat default
default ks
prompt 0
label ks
kernel vmlinuz append ks initrd=initrd.img ramdisk_size=150000 \
       lang= devfs=nomount pxe kssendmac selinux=0 nostorage \
       driverload=sd_mod:mptbase:mptscsih:mptsas:aacraid:mptscsih:libata

The net effect is that i have singled out the qlogic qla2400 and qla2xxx drivers from loading as the HBA’s that my compute nodes are from qlogic.

I would love to hear feedbacks if this trick did not work for you. Or even better if there is another cleaner way of achieving the same goal using some other trick.

»  Substance: WordPress   »  Style: Ahren Ahimsa