Monthly Archives: July 2012

Scan FC or iSCSİ Disk on Linux, remove and format without reboot if fdisk want reboot it and find out WWN of HBA

Many times i was searching on internet and collect many thing from many page about add a new disk to linux OS after that decide to put everything on one place

After assign the LUN from storage to host , on command line of you server pls type below

echo “- – – ” > /sys/class/scsi_host/*host_number*/scan

You can find out host number under ;

/sys/class/scsi_host

On my servers i can see many hosts there like host0,host1,host2 then don’t need to think twice execute the command with all or I’m not %100 sure but on Redhat6/Centos6 you can find out vi execute command below to get HBA ports

 cat /sys/class/fc_host/host

then with fdisk -l you should find the disk , if you are using MPIO then you should check /dev/mapper/mpath* or /dev/dm-*

When execute fdisk and save the new partition sometimes you can get “You should restart to host to use new partition” , don’t worry execute command below

partprobe

but sometimes only execute this can work, sometimes no , then pls execute below

partprobe /dev/mapper/mpath1

Also sometime you need to remove such assigned partition , to do it pls unmount from OS, unassign from storage and read the last link under related links for short see below

# echo 1 > /sys/block/devName/device/delete
# echo 1 > /sys/block/sdc/device/delete

Extra ….

To find out HBA WWNs pls execute below

[root@kahin1 ~]# cat /sys/class/fc_host/host5/port_name
0x21000024ff03f0b0

Related Links and many thanks to they

http://jreypo.wordpress.com/2010/10/28/how-to-rescan-the-scsi-bus-in-linux/
http://zhigang.org/blog/using-partprobe-to-avoid-reboot-after-re-partition/
http://www.linuxquestions.org/questions/linux-hardware-18/how-to-configure-a-hba-card-and-see-its-wwn-676199/
http://www.cyberciti.biz/tips/vmware-add-a-new-hard-disk-without-rebooting-guest.html

Pls command this article if something missing and not working or you do not find out what you are searching

VM

Advertisements

FC Brocades / IBM Branded Brocades / EMC Branded Brocades ISL Connection

i accept that you are adding new fc switch to fabric, this document do not related with merge something

Be sure no configuration on new switch, if it has then clear it

Savage_Opress:FID128:admin> cfgshow

Defined configuration:

no configuration defined

Effective configuration:

no configuration in effect

You do not have to deal with DomainID, default every switch have DomainID 1 and when you join the new switch to new existing fabric need to be restart because need to be election if without reboot you connect two fc switch via ISL link, you will get incompatible …

Savage_Opress:FID128:admin> islshow

1:  0->    (incompatible)

Try to reboot new switch you will see that it will join to new fabric like below (to reboot fc switch type “reboot” to go )

Savage_Opress:FID128:admin> islshow  1:  0->  4 10:00:00:05:33:55:ef:af   2 Chewbacca       sp:  8.000G bw:  8.000G

Chewbacca:admin> islshow
1: 0-> 3 10:00:00:05:1e:d6:5c:19 1 R2D2 sp: 8.000G bw: 8.000G
2: 4-> 0 10:00:00:05:33:ab:b9:95 3 Savage_Opress sp: 8.000G bw: 8.000G

Now this configuration is cascade base installation , Chewbacca connected to R2D2 , Savage connected to Chewbacca , if you want you can connect Savage to R2D2 for ring topology

Also maybe you have a question on your mind, domain name is not important on this configuration.

VM

FC Brocades / IBM Branded Brocades / EMC Branded Brocades FOS Upgrade

Go …

Download related FOS and out it on any FTP server or you can use SCP too ! File Name section you can see that i indicated folder no any file just folder where all files inside. IBM redirect to special website of Brocade to download, on EMC powerlink you can download it too !

if you ask me what is the big issue of purchase branded fc switch , answer is very easy EMC say aaaa this is IBM branded ask they, IBM yes this is EMC one problem should be there 😀 very funny isn’t it because they are selling same product

Pls do not ask me something about firmwares because most hard thing is this

Savage_Opress:FID128:admin> firmwaredownload
Server Name or IP Address: xxx.yyy.ttt.zzz
User Name: iso
File Name: /FOS/v7.0.1
Network Protocol(1-auto-select, 2-FTP, 3-SCP, 4-SFTP) [1]: 2
Password:
Server IP: 212.58.13.11, Protocol IPv4
Checking system settings for firmwaredownload…
System settings check passed.

You can run firmwaredownloadstatus to get the status
of this command.

This command will cause a warm/non-disruptive boot but will
require that existing telnet, secure telnet or SSH sessions
be restarted.
Do you want to continue (Y/N) [Y]:
Firmware is being downloaded to the switch. This step may take up to 30 minutes.
Preparing for firmwaredownload…
Start to install packages…
dir ##################################################
ldconfig ##################################################
glibc ##################################################

You can see that linux running on it, lovely. Hey Windows lovers waiting someday fc switches run on Windows maybe on 2199 when its more powerful or more fit or whatever  🙂 .. Go …

All packages have been downloaded successfully.
Firmware has been downloaded to the secondary partition of the switch.
HA Rebooting …

Now, reconnect switch and execute

Darth_Maul:FID128:admin> version
Kernel: 2.6.14.2
Fabric OS: v7.0.1
Made on: Thu Dec 15 00:10:22 2011
Flash: Mon Jul 2 18:56:16 2012
BootProm: 1.0.9

perfect !

FC Brocades / IBM Branded Brocades / EMC Branded Brocades First Time Installation

quick as possible

Connect console cable (sorry i don’t like EZSetup) 9600,n,8,1 Flow is none

Default user is admin and password is password 🙂

Pls do not forget i don’t know which terminal you will use like  Putty / SecureCRT or bla bla don’t backspace something such terminals can understand different sometimes and you can not logon or something will be wrong

Brocade will ask you 4 users pass which are root,factory,admin,user

then, continue hope ip address are ready to go , pls type like below

ipaddrset

Darth_Maul:FID128:admin> ipaddrset
Ethernet IP Address [192.168.21.9]:
Ethernet Subnetmask [255.255.255.0]:
Gateway IP Address [192.168.21.1]:
DHCP [Off]:

Not: Type your one, i already did it

Connent GUI like http://ip.address.of.yourdevice

Click Switch Admin –> 

  • Change the name of switch
  • Set DNS Address
  • Set Domian Name
Apply it !

Click Licenses –>

it should be empty or just only default/embedded ones should be

Now my switch is IBM one and i need to go web site http://www-912.ibm.com/LicenseRequestClient/
Not: Other vendors should have their own one, ask to they 

On terminal type like below to get License ID

Darth_Maul:FID128:admin> licenseidshow
10:00:00:05:33:d2:81:1d

Type your email address and all transaction key step by step with license ID to get Activation keys

Back to GUI again , on license section and enter license keys , then grey sections of switch become more beautiful to you 😀

After add license execute such commands

Darth_Maul:FID128:admin> switchdisable
Darth_Maul:FID128:admin> switchenable

Now its beautiful ..

VM