人気ブログランキング | 話題のタグを見る

Metaphorical Dream

FC-SAN その2 Silkworm3250 分解写真

手持ちのSN200Model220もとい、Silkworm3250を分解してみたw

(1)全体
FC-SAN その2 Silkworm3250 分解写真_e0113173_0575175.jpg


(2)基盤アップ
FC-SAN その2 Silkworm3250 分解写真_e0113173_0581820.jpg


CPU:PowerPC
Mem:128MB(恐らく基盤に埋め込まれてる、と想定。)
HDD:256MB(Toshiba製CF)
Ethernet:(Chipが)Broadcom
FC:まだあんまり詳しくないので良くわからなかったです

あとはカバーのビスを全て外した後、
正面(SFPやEtherの口がある面)から見て
手前に引っ張るかたちで、カバーを外すことができます。

しかし、一番最初は中々外れず、
どっち方向へ力を掛けて良いのか?
わかりませんでした。

このため、大きめの釘抜きで、自分が思う方向へ
ゴリゴリと力を掛けていたところ、何とかカバーを外せました。

もう少しでご愁傷様になるところでしたw

それと、一番気になるのはやはりCFなわけで。
CFを読み込めるPCがメインで使用していたため、
Knoppix6でBootして、CFをマウントしようとしましたがNGでした。

仕方がないので、一応ddしてみたんですが、
この後はどう喰おうか?と少々悩み中です。

Silkworm3250がさらに一台あれば、
もう少し危険な橋を渡ることもできるかなぁと考え中。

# by mdesign21 | 2010-04-30 01:09 | IT系

FC-SAN その1 Silkworm パスワードリカバリ手順

Brocade Silkworm3250のOEMで、
富士通から販売しているSN200Model220の
パスワードリカバリ手順をアップします。

オークションで落としたBrocadeのSANスイッチには必須かと。

1-1.電源投入
電源投入後、以下のメッセージ(メモリチェック)が表示されたらESCキーを押下

Checking system RAM - press any key to stop test
00100000


1-2.BootPROMメニュー
ESCキー押下後、以下のメッセージ表示後にBootPROMメニューが表示。
そして、3を選択します。
Press escape within 4 seconds to enter boot interface.

1) Start system.
2) Recover password.
3) Enter command shell.

Option? 3


1-4.Shell表示
以下のメッセージ表示後にshellのプロンプト(>)が表示。
Boot PROM password has not been set.

>


1-5.helpにてコマンド確認
> help
Valid commands are:
auto Boot per boot environment variable settings
boot Boot specified image
date Display or set the system date and time
debug Hardware Debug - Edit Memory/PCI registers
help Display this list of commands
helpenv Display help for boot environment variables
hinv Display hardware inventory
passwd Set the boot modification password
ping Ping test
printenv Display all boot environment variables
reset Reset the system
resetpw Remove the boot modification password
setenv Set a boot environment variable
saveenv Save the current boot environment variables
unsetenv Unset a boot environment variable
version Display boot version info


1-6.OSLoaderの確認
「printenv」と入力

> printenv
AutoLoad=yes
ENET_MAC=00051E348DA7
InitTest=MEM()
LoadIdentifiers=Fabric Operating System;Fabric Operating System
OSBooted=MEM()0xF0000000
OSLoadOptions=quiet;quiet
OSLoader=MEM()0xF0000000;MEM()0xF0800000
OSRootPartition=hda1;hda2
SkipWatchdog=yes
>

!コメント!
「OSLoader=」の後に記載されたアドレスをメモってください。
 MEM()0xF0000000 ←First Memory Address=これが重要。メモしてください。
 MEM()0xF0800000 ←Second Memory Address(と言うのか?は微妙=不要)

「OSRootPartition=」の後に記載されたPartitionを覚えておいてください。
 hda1 ←恐らく /boot と想定
 hda2 ←恐らく /   と想定


1-7.FirstMemoryAddressを指定してboot
「boot MEM()0xF0000000 -s」と入力

> boot MEM()0xF0000000 -s

~・~・~・~・~・~・~・~以下、Boot時の画面出力~・~・~・~・~・~・~
Booting "Manually selected OS" image.
Entry point at 0x00800000 ...

Linux/PPC load:
BootROM command line: -s
Uncompressing Linux...done.
Now booting the kernel
Linux version 2.4.19 (swrel@squaw)
(gcc version 2.95.3 20010112 (prerelease)) #1 Wed Mar 28 12:47:37 PDT 2007
On node 0 totalpages: 32768
zone(0): 32768 pages.
zone (0): min(255), low(1275), high (2040)
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: -s
Set up jiffies counter to wrap in 0 seconds.
Calibrating FIT timer... running at 1526 Hz. [TSR_FP=2]
Calibrating delay loop... 199.88 BogoMIPS
Memory: 123856k available (1848k kernel code, 1124k data, 76k init, 0k highmem)
Dentry cache hash table entries: 16384 (order: 5, 131072 bytes)
Inode cache hash table entries: 8192 (order: 4, 65536 bytes)
Mount-cache hash table entries: 2048 (order: 2, 16384 bytes)
Buffer-cache hash table entries: 8192 (order: 3, 32768 bytes)
Page-cache hash table entries: 32768 (order: 5, 131072 bytes)
POSIX conformance testing by UNIFIX
PCI: Probing PCI hardware
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
OCP uart ver 1.6.1 init complete
Starting kswapd
Journalled Block Device driver loaded
SGI XFS with no debug enabled
i2c-core.o: i2c core module version 2.6.3 (20020322)
i2c-dev.o: i2c /dev entries driver module version 2.6.3 (20020322)
i2c-proc.o version 2.6.3 (20020322)
pty: 256 Unix98 ptys configured
Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled
ttyS00 at 0xef600400 (irq = 1) is a 16550A
ttyS01 at 0xef600300 (irq = 0) is a 16550A
PPC 405 watchdog driver v0.5. (Timer driven)
SWBD Platform Driver v1.0: [type 27, rev 3].
Config Silkworm
Uniform Multi-Platform E-IDE driver Revision: 6.31
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
cpld_ide_init_hwif_ports: dp=0, cp=0, hw=c0487f08
silkworm.c: read cpld_data (offset 0xc100001f), 0x00
Silkworm CPLD ATA interface configured [CPLD version 0]
cpld_ide_init_hwif_ports: dp=0, cp=0, hw=c0487f08
cpld_ide_init_hwif_ports: dp=0, cp=0, hw=c0487f08
cpld_ide_init_hwif_ports: dp=0, cp=0, hw=c0487f08
cpld_ide_init_hwif_ports: dp=0, cp=0, hw=c0487f08
cpld_ide_init_hwif_ports: dp=0, cp=0, hw=c0487f08
cpld_ide_init_hwif_ports: dp=0, cp=0, hw=c0487f08
cpld_ide_init_hwif_ports: dp=0, cp=0, hw=c0487f08
hda: TOSHIBA THNCF256MBA, ATA DISK drive
ide0 at 0xe10021f0-0xe10021f7,0xe10023f6 on irq 30
hda: 500736 sectors (256 MB) w/2KiB Cache, CHS=978/16/32
Partition check:
hda: hda1 hda2
RAMDISK driver initialized: 16 RAM disks of 6144K size 1024 blocksize
loop: loaded (max 8 devices)
eth0: Phy @ 0x1, type BCM5221 (0x004061e4)
eth0: IBM OCP 10/100 Mbps ethernet: EMAC0, MAC 00:05:1e:34:8d:a7
eth0: Tx/Rx Interrupt mitigation (1500 pps)
ATA polled-mode panic dumper on char-major-252.
silkworm: Using SWBD27 flash configuration
Creating 2 MTD partitions on "Boot flash":
0x00000000-0x00010000 : "bootenv: boot environment"
0x00010000-0x00080000 : "prom: boot prom"
Creating 5 MTD partitions on "User flash":
0x00000000-0x01000000 : "Entire user flash"
0x00000000-0x00400000 : "kern0: kernel and initrd (1)"
0x00800000-0x00c00000 : "kern1: kernel and initrd (2)"
0x00400000-0x00800000 : "dump0: log data (1)"
0x00c00000-0x01000000 : "dump1: log data (2)"
Creating 2 MTD partitions on "Boot flash":
0x00000000-0x00010000 : "bootenv0s: boot environment"
0x00010000-0x00020000 : "bootenv1s: boot environment"
Silkworm crash dump logger using dump0: log data (1)
mtdchar: write-caching enabled
IBM On-chip iic (i2c) algorithm module 2002.30.04
iic_ibmocp_init: IBM on-chip iic adapter module
M41T11 Real-time-clock Driver v1.1
m41t11: Called to probe for bus IIC-0
m41t11: I2C Real-Time-Clock detected on iic0 addr 0x68
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 1024 buckets, 8Kbytes
TCP: Hash tables configured (established 8192 bind 8192)
Linux IP multicast router 0.06 plus PIM-SM
ip_tables: (C) 2000-2002 Netfilter core team
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
RAMDISK: ext2 filesystem found at block 0
RAMDISK: Loading 2603 blocks [1 disk] into ram disk... -\|/-done.
Freeing initrd memory: 2603k freed
VFS: Mounted root (ext2 filesystem).
Attempting to find a root file system on hda1...
hda: hda1 hda2
hda: hda1 hda2
kjournald starting. Commit interval 5 seconds
EXT3 FS 2.4-0.9.17, 10 Jan 2002 on ide0(3,1), internal journal
EXT3-fs: mounted filesystem with ordered data mode.
hda: hda1 hda2
hda: hda1 hda2
kjournald starting. Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
VFS: Mounted root (ext3 filesystem) readonly.
Trying to move old root to /initrd ... okay
Freeing unused kernel memory: 76k init
INIT: version 2.78 booting

~・~・~・~・~・~・~・~以下、Boot時の画面出力 終了~・~・~・~・~・~
sh-2.04#
sh-2.04#

!コメント!
Shellのプロンプト(sh-2.04#)が表示されればOK



2-1./ のRemount
「mount -o remount,rw,noatime /」と入力

sh-2.04# mount -o remount,rw,noatime /
EXT3 FS 2.4-0.9.17, 10 Jan 2002 on ide0(3,1), internal journal


2-2.Root PartitionのMount
「mount /dev/hda2 /mnt」と入力

sh-2.04# mount /dev/hda2 /mnt
kjournald starting. Commit interval 5 seconds
EXT3 FS 2.4-0.9.17, 10 Jan 2002 on ide0(3,2), internal journal
EXT3-fs: mounted filesystem with ordered data mode.

!コメント!
なぜ、hda2なのか?については、あくまでも想定ですが、
1-6.に記載した通りです。
 hda1 ←恐らく /boot と想定
 hda2 ←恐らく /   と想定


2-3.パスワードリカバリスクリプトの実行
「/sbin/passwddefault」を実行してください。

sh-2.04# /sbin/passwddefault
All account passwords have been successfully set to factory default.


2-4.再起動
「reboot -f」にて再起動してください。

sh-2.04# reboot -f

~・~・~・~・~・~・~・~以下、Boot時の画面出力~・~・~・~・~・~・~
flushing ide devices: hda
Restarting system.



The system is coming up, please wait...
Checking system RAM - press any key to stop test
001000000
System RAM check complete
Press escape within 4 seconds to enter boot interface.
Booting "Fabric Operating System" image.
Entry point at 0x00800000 ...

Linux/PPC load:
BootROM command line: quiet
Uncompressing Linux...done.
Now booting the kernel
Attempting to find a root file system on hda1...
INIT: version 2.78 booting
INIT: Entering runlevel: 3

Fabric OS (fcs01)

fcs01 console login: uptime: 2605; sysc_qid: 0
2010/04/29-14:54:33, [HAM-1004], 91,, INFO, SilkWorm3250, Processor rebooted - Reboot

SNMP Research SNMP Agent Resident Module Version 15.3.1.4
Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 SNMP Research, Inc.
sysctrld: all services Standby
Services starting a COLD recovery
sysctrld: all services Active
POST1: Started running Thu Apr 29 14:55:00 GMT 2010
POST1: Test #1 - Running turboramtest
POST1: Test #2 - Running centralmemorytest
POST1: Test #3 - Running cmitest
POST1: Script PASSED with exit status of 0 Thu Apr 29 14:55:06 GMT 2010 took (0:0:6)
POST2: Started running Thu Apr 29 14:55:08 GMT 2010
POST2: Test #1 - Running camtest
POST2: Test #2 - Running txdpath
POST2: Test #3 - Running spinsilk (SERDES)
POST2: Running diagshow
POST2: Script PASSED with exit status of 0 Thu Apr 29 14:56:00 GMT 2010 took (0:0:52)
Initializing Ports ....
Port Initialization Completed
Enabling switch...
~・~・~・~・~・~以下、Boot時の画面出力 終了~・~・~・~・~



3-1.初期パスワード入力
以下の表示が出たらFabricOSのDefaultのユーザ名とパスを入力しましょう。

Defaultユーザ名=admin
Defaultパスワード=password

Fabric OS (fcs01)

fcs01 console login: admin
Password: (表示されませんがpasswordと入力)

Please change passwords for switch default accounts now.
Use Control-C to exit or press 'Enter' key to proceed.

Warning: Access to the Root and Factory accounts may be required for
proper support of the switch. Please ensure the Root and Factory
passwords are documented in a secure location. Recovery of a lost Root
or Factory password will result in fabric downtime.


3-2.初期パスワード設定
パスワードリカバリが完了しているため、上記ログイン後、
改めてDefaultユーザにパスワードを設定します。

Defaultのユーザ名
 root
 factory
 admin
 user

3-2-1.rootのパスワード設定
for user - root
Changing password for root
Enter new password:
Re-type new password:
passwd: all authentication tokens updated successfully
2010/04/29-15:01:19, [SEC-3024], 92, AUDIT, INFO, fcs01,
User: admin, Role: admin, Event: passwd, Status:
success, Info: User account, [root], password changed.
Please change passwords for switch default accounts now.

3-2-2.factoryのパスワード設定
for user - factory
Changing password for factory
Enter new password:
Re-type new password:
passwd: all authentication tokens updated successfully
2010/04/29-15:01:27, [SEC-3024], 93, AUDIT, INFO, fcs01,
User: admin, Role: admin, Event: passwd, Status:
success, Info: User account, [factory], password changed.
Please change passwords for switch default accounts now.

3-2-3.adminのパスワード設定
for user - admin
Changing password for admin
Enter new password:
Re-type new password:
passwd: all authentication tokens updated successfully
2010/04/29-15:01:35, [SEC-3024], 94, AUDIT, INFO, fcs01,
User: admin, Role: admin, Event: passwd, Status:
success, Info: User account, [admin], password changed.
Please change passwords for switch default accounts now.

3-2-4.userのパスワード設定
for user - user
Changing password for user
Enter new password:
Re-type new password:
passwd: all authentication tokens updated successfully
2010/04/29-15:01:41, [SEC-3024], 95, AUDIT, INFO, fcs01,
User: admin, Role: admin, Event: passwd, Status:
success, Info: User account, [user], password changed.
Saving passwords to stable storage.
Passwords saved to stable storage successfully

3-3.完了
最後はプロンプトが表示されれば完了です。

fcs01:admin>


Brocade silkworm SN200 Model220 HT-4990-SW3250
パスワード初期化 パスワードリセット

# by mdesign21 | 2010-04-30 00:46 | IT系

scst その7 SCSTインストール qla2x00tgtインストール時の画面出力

「scst その6」に引き続き、
コマンドを投入した際の画面出力をアップしておきます。

「scst その6」に記載した項番に紐付いているので、
項番ごとにどのような画面出力になるのか?を確認できます。

一部大量に出力されるものは省略してあります。
Blogのしょぼい文字数制限があるため、
txtファイルをアップします。

これまた私の備忘録の一部抜粋なので、
必ずしもこれ通りにいかなくても保証できないっす。
あしからず。

以下のtxtファイルをDLしてくださいませ。
インストール画面出力

文字化けしちゃう場合にはSJISで。

# by mdesign21 | 2010-04-29 11:06 | IT系

scst その6 SCSTインストール qla2x00tgtインストール

CentOS5.4にSCSTをインストールする手順です。
qla2x00tgtによるFC Targetのインストール方法とも言えるかな。

Openfiler2.3の場合、HBAを挿入するタイミングが肝になります。

しかし、以下に記載する方法であれば、最初からHBAを挿入した状態で、
qla2x00tgtによるFC Targetを実装することができました。

なお、以下に記載することは、私の備忘録を一部抜粋しているだけなので、
内容についての保証はできません。

【Hardware】
筐体:ML115G5
CPU:PhenomⅡ 945(もっと遅くてもOK)
Mem:W2U800CQ-2GL5J*2(こんなに積まなくてもOK)
HDD:ST3160023AS
HBA:QLogic QLA2342 or QLA2340
OS:CentOS5.4 x86_64 or CentOS5.4 x86(32bit版もOK)
Kernel:2.6.26


【OSインストール】
CentOS5.4 x86_64のインストールパッケージのカスタマイズ

デスクトップ環境
 全てOFF(GNOME,KDEも使わない)

アプリケーション
 エディタ→vim-enhancedのみ

開発
 開発ツール
 開発ライブラリ

サーバー
 全てOFF

ベースシステム
 ベースのみ

仮想化,クラスタリング,クラスタストレージ
 全てOFF

!コメント!
OSインストールに10分程度掛かりますので、
CoffeeBreakでもどうぞ!

【scstのインストール手順】
1.事前準備
1-1.ドライバの確認
lspci | grep Fibre
dmesg | grep qla
cat /sys/class/fc_host/host?/port_name

1-2.ファームのDL
cd /lib/firmware/
wget ftp://ftp.qlogic.com/outgoing/linux/firmware/ql2300_fw.bin

1-3.Linux KernelソースのDL
cd /usr/src
wget ftp://ftp.iij.ad.jp/pub/linux/kernel/linux/kernel/v2.6/linux-2.6.26.tar.gz
tar xvf linux-2.6.26.tar.gz
ln -s /usr/src/linux-2.6.26 linux
ln -s /usr/src/linux-2.6.26 kernel

1-4.scstソースのDL
cd /root
svn co https://scst.svn.sourceforge.net/svnroot/scst

2.scstパッチ当て
2-1.scstパッチのコピー
cd /root/scst/trunk
cp /root/scst/trunk/scst/kernel/scst_exec_req_fifo-2.6.26.patch /usr/src

2-2.scstパッチをKernelに当てる
cd /usr/src
patch -p0 < scst_exec_req_fifo-2.6.26.patch

2-3.qla2xドライバの移動&ln貼り付け
cd /root/scst/trunk
mv /usr/src/linux/drivers/scsi/qla2xxx /usr/src/linux/drivers/scsi/qla2xxx_org
ln -s /root/scst/trunk/qla2x00t /usr/src/linux/drivers/scsi/qla2xxx

3.KernelのBuild
3-1.Linux KernelのMakefile設定
cd /usr/src/linux
make menuconfig

!コメント!
 以下のメッセージが表示された場合は
 ターミナル(TeraTermなど)の画面サイズが小さ過ぎます。
  Your display is too small to run Menuconfig!
  It must be at least 19 lines by 80 columns.
  make[1]: *** [menuconfig] エラー 1
  make: *** [menuconfig] エラー 2

3-1-1.FC targetモードの確認
make menuconfigコマンド投入後に表示されたGUIライクな画面にて、
以下の項目を選択していきます。

Device Drivers->
SCSI device support->
SCSI low level drivers->
Qlogic 2xxx target mode support

以下のように表示されていることを確認
[*]が[ ]なっていたりしたら、以下の通りに設定してください。

QLogic QLA2XXX Fibre Channel Support
[*] QLogic 2xxx target mode support (NEW)
[*] Disable initiator mode for ports with enabled target mode (NEW)

3-1-2.CONFIG_NOHIGHMEMをOFFに設定(x86の場合のみ=x86_64では項目自体が無い)

Processor type and features->
High Memory Support (64GB)->

以下のように表示されていることを確認
(X)が( )なっていたりしたら、以下の通りに設定してください。
(X) off
( ) 4GB
( ) 64GB

3-1-3.設定の保存
Exitにて最初の画面に戻ってください。
以下の項目を選択し保存してください。

Save an Alternate Configuration File

最後は、最初の画面に戻ってExitを選択すれば、
元のプロンプト([root@ ~]#)に戻ります。

3-2.Makefikeの微修正
`uname -r`の出力にて、Kernel Version 2.6.26の後に
Buildしていることを明示するため、「-scst」を付与します。
(2.6.26 → 2.6.26-scstとして生成&表示させるという意味です。)

cd /usr/src/linux
cp Makefile Makefile_org
vi Makefile

viの画面が表示されたら、以下の項目を変更
EXTRAVERSION =

EXTRAVERSION = -scst

!コメント!
本項はOptionです。
但し、3-4以降の項目でコマンドを
そのままコピペしたい方は本項を実施してください。
3-4以降は、2.6.26-scstでKernelをBuildした想定で進めます。

3-3.Linux KernelのBuild
make bzImage && make modules && make modules_install && make install

!コメント!
30分くらい掛かりますので、
お風呂にでも入ってサッパリしちゃってください

3-4.新KernelをGRUBメニューへ追加
3-4-1.x86_64(64bit版)の場合
installkernel 2.6.26-scst arch/x86_64/boot/bzImage System.map

3-4-2.x86(32bit版)の場合
installkernel 2.6.26-scst arch/i386/boot/bzImage System.map

3-5.起動Kernelの選択
vi /boot/grub/menu.lst

以下の項目を0に設定
default=1

default=0

!コメント!
新Kernelが最初に起動されるように設定します。
Windowsライクに言うと"c:\boot.ini"を書き換える作業です。

3-6.再起動
shutdown -r now

4.scst&qla2x00tgtの設定(make&installやサービス設定など諸々)
4-1.再度ドライバの確認
lspci | grep Fibre
dmesg | grep qla
cat /sys/class/fc_host/host?/port_name

少なくても"dmesg | grep qla"にて、
以下の表示が出力されればOKでしょう。
光ケーブルが挿入されてないぞ!と怒られていますが。

qla2xxx 0000:01:08.0: Cable is unplugged...
qla2xxx 0000:01:08.1: Cable is unplugged...

4-2.scstのdebugモードからreleaseモードへの変更
cd /root/scst/trunk
make debug2release

出力結果より、以下のエラーが表示されないことを確認
scst: disagrees about version of symbol struct_module

表示される場合には、ご愁傷様です。
以下を実施後、make bzImage無しで、3-3.を再度実行してください。
cd /usr/src/linux
make oldconfig
make clean
rm -rf /lib/modules/`uname -r`

!コメント!
30分待ちは辛いので、
もう一回お風呂にでも入って頭をCoolDownしてください。

4-3.scst,qla2x00t,qla2x00-target,scstadminのコンパイル&インストール
4-3-1.scstのmake&install
cd /root/scst/trunk/scst/src
make all
make install

4-3-2.qla2x00tのmake&install
cd /root/scst/trunk/qla2x00t
make

!コメント!
本項が本当に必要か?は未確認です(不要かもしれない)ので、
おまじないだと思ってください。
個人的には不要と思ってますが。。

4-3-3.qla2x00-targetのmake&install
cd /root/scst/trunk/qla2x00t/qla2x00-target/
make
make install

4-3-4.scstadminのmake&install
cd /root/scst/trunk/scstadmin
make
make install

4-4.qla2xxxのドライバをln
以下のコマンドを実施します。
ls -Fal /lib/modules/2.6.26-scst/extra

"qla2xxx.ko"が無ければ、以下のコマンドにてln
ln -s /lib/modules/2.6.26-scst/kernel/drivers/scsi/qla2xxx/qla2xxx.ko /lib/modules/2.6.26-scst/extra/qla2xxx.ko

4-5.dev_handlersの確認
ls -Fal /lib/modules/2.6.26-scst/extra/dev_handlers

最低でも以下のハンドラが表示されればOK
scst_vdisk.ko
scst_disk.ko

その他には以下のようなものがあります。
scst_cdrom.ko
scst_changer.ko
scst_modisk.ko
scst_processor.ko
scst_raid.ko
scst_tape.ko
scst_user.ko

4-6.scst,qla2x00関連モジュールのmodprobe
modprobe scst
modprobe qla2x00tgt
modprobe qla2xxx
modprobe scst_disk
modprobe scst_vdisk

4-7.qla2x00tのサービススクリプト修正
vi /etc/rc.d/init.d/qla2x00t
#KERNEL_MODULES="qla2x00t"

KERNEL_MODULES="qla2x00tgt"

!コメント!
何で修正するのか?は、修正しないで、
qla2x00tをスタートすればわかります。
ご愁傷様にはならないので、興味本位で試してOKです。

4-8.scstのサービススクリプト修正
vi /etc/rc.d/init.d/scst
#SCST_MODULES="scst scst_disk scst_vdisk"

SCST_MODULES="scst qla2x00tgt scst_disk scst_vdisk"

!コメント!
こちらも、4-7.と同様です。
たぶん、scstのソースをよく読んで、2-3をきちんと設定すれば、
4-7と4-8は不要になるんじゃないか?と想定しています。

4-9.scst.confのファイル初期化
scstadmin -WriteConfig /etc/scst.conf

!コメント!
初回起動時は、/etc/scst.confが無いので、
とりあえず、/etc/scst.confを生成する。

4-10.scst,qla2x00tのサービス開始
/etc/rc.d/init.d/qla2x00t start
/etc/rc.d/init.d/scst start

4-11.サービス開始確認
scstadmin -session

以下のような表示が出力されれば、とりあえずOKです。
[root@fct01 scstadmin]# scstadmin -session
Collecting current configuration: done.

Target Name Initiator Name Group Name Command Count

All done.


5.scstadminによる管理
ここから先は、FC InitiatorをDAS接続していることを想定しています。
そもそも、FC Targetが正常動作しているか?は、
FC Initiatorが居ないとお話にならないので。

5-1.自サーバのHBAのWWPN確認
cat /sys/class/fc_host/host?/port_name

5-2.Target DeviceのEnable化
scstadmin -enable 0x210000e0xxxxxxxx

5-3.グループの設定
scstadmin -addgroup GROUP00

5-4.ユーザ追加&グループへ登録
scstadmin -adduser 21:00:00:e0:xx:xx:xx:xx -group GROUP00

!コメント!
21:00:00:e0:xx:xx:xx:xx=FC InitiatorのWWPNを記載

5-5.ボリューム作成
scstadmin -adddev VOL00 -handler vdisk -path /dev/sda3

!コメント1!
/dev/sda3をvdiskとして、VOL00という名前で作成

!コメント2!
上記5-3では、/dev/sda3をBlockDeviceとして指定しました。
以下の方法であれば、ImageFileとして指定可能です。
dd if=/dev/zero of=/mnt/disk bs=1024k count=3072

/mnt配下にdiskという名前で3GBのImageFileを生成した後、
以下のように設定することも可能。
scstadmin -adddev VOL00 -handler vdisk -path /mnt/disk

!コメント3!
本項を実施すると、Errorが表示される場合があります。
その際、一番手っ取り早いWorkaroundは、新しい別のHDDを一発追加することです。
それが出来ない場合には、以下のように/dev/sda3をfdiskして、
一発Rebootした後、再度scstadmin -adddevを実施してみてください。

[root@fct01 ~]# fdisk -l

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = シリンダ数 of 16065 * 512 = 8225280 bytes

デバイス Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 3837 30716280 8e Linux LVM
/dev/sda3 3838 19457 125467650 83 Linux
 ※1
 その他のPartionは、
  /dev/sda1=/boot
  /dev/sda2=/
 です。
 ※2
 Errorが表示される原因については、私も切り分けしきれていません。

5-6.ボリュームをグループにアタッチ
scstadmin -assigndev VOL00 -group GROUP00 -lun 0

!コメント!
いわゆるZoningです。
 VOL00をLUN 0として設定
 GROUP00に所属するユーザ(=FC InitiatorのWWPN)からVOL00へのアクセスを許可

5-7.設定の保存
scstadmin -WriteConfig /etc/scst.conf

5-8.設定ファイルの確認
lv /etc/scst.conf

ここまでで手順は完了です。

上記を実施した後、VMWare ESX4などでストレージの設定をすれば、
2010年 04月 28日に記載した「scst その4」のような画面で、
ESXがFC Targetを認識してくれます。

6.その他(いろいろな確認方法など)
6-1.認識済みFC Targetデバイスの確認
cat /proc/scsi_tgt/scsi_tgt

6-2.自サーバHBAのWWPNを確認
cat /sys/class/fc_host/host?/port_name

6-3.FC InitiatorのWWPNを確認
scstadmin -session

6-4.設定ファイル変更後の設定反映
scstadmin -config /etc/scst.conf

!コメント!
"vi /etc/scst.conf"にて、直接設定ファイルをゴリゴリいじった後、
設定を反映させたい場合のコマンド

6-5.その他scstadminのオプション
"scstadmin --help"で要確認

もしくは、以下のDocでPerlソースの詳細を確認しても良いと思います。
/root/scst/trunk/scstadmin/scstadmin

6-6.WWPNのフォーマット説明
以下、通常はありえないWWPNですが、
説明用に全て異なる値を書いています。

WWPN例
21:aa:bb:cc:dd:ee:ff:00

2
 HAA bits
  Hex:1=IEEE
  Hex:2=IEEE extended

1:aa
 Reserved
 Node内 N_portID

bb:cc:dd
 IEEEによるアサイン値(OUI)

ee:ff:00
 ベンダ固有の値

# by mdesign21 | 2010-04-29 01:23 | IT系

scst その5

一応、こんなんも載せておく。
って言いながら、wwnは伏せておく。
小心者なので、すいません。

(1)scst
[root@fct01 ~]# dmesg | grep scst
scst: Attached to scsi0, channel 0, id 0, lun 0, type 0
scst: Attached to scsi1, channel 0, id 0, lun 0, type 0
scst: Attached to scsi4, channel 0, id 0, lun 0, type 5
scst: Processing thread scsi_tgt0 (PID 2654) started
scst: Processing thread scsi_tgt1 (PID 2655) started
scst: Processing thread scsi_tgt2 (PID 2656) started
scst: Processing thread scsi_tgt3 (PID 2657) started
scst: Init thread started, PID 2658
scst: Task management thread started, PID 2659
scst: Management thread started, PID 2660
scst: SCST version 2.0.0-pre1-procfs loaded successfully (max mem for commands 2001MB, per device 800MB)
scst: Enabled features: TRACING
scst: Target 21:00:00:e0:xx:xx:xx:xx (rel ID 1) for template qla2x00tgt registered successfully
scst: Target 21:01:00:e0:xx:xx:xx:xx (rel ID 2) for template qla2x00tgt registered successfully
scst: Target template qla2x00tgt registered successfully
scst: Device 0:0:0:0: TST 0, QUEUE ALG 0, SWP 0, TAS 0, D_SENSE 0, has_own_order_mgmt 1
scst: Device 1:0:0:0: TST 0, QUEUE ALG 0, SWP 0, TAS 0, D_SENSE 0, has_own_order_mgmt 1
scst: Device handler "dev_disk" for type 0 registered successfully
scst: Device handler "dev_disk_perf" for type 0 registered successfully
scst: Virtual device handler vdisk_fileio for type 0 registered successfully
scst: Virtual device handler vdisk_blockio for type 0 registered successfully
scst: Virtual device handler vdisk_nullio for type 0 registered successfully
scst: Virtual device handler vcdrom for type 5 registered successfully

(2)qla2x
[root@fct01 ~]# dmesg | grep qla
qla2xxx 0000:01:08.0: Found an ISP2312, irq 19, iobase 0xffffc20000c4e000
qla2xxx 0000:01:08.0: Configuring PCI space...
qla2xxx 0000:01:08.0: Configure NVRAM parameters...
qla2xxx 0000:01:08.0: Verifying loaded RISC code...
scsi6 : qla2xxx
qla2xxx 0000:01:08.0:
qla2xxx 0000:01:08.1: Found an ISP2312, irq 18, iobase 0xffffc20000c70000
qla2xxx 0000:01:08.1: Configuring PCI space...
qla2xxx 0000:01:08.1: Configure NVRAM parameters...
qla2xxx 0000:01:08.1: Verifying loaded RISC code...
scsi7 : qla2xxx
qla2xxx 0000:01:08.1:
qla2xxx 0000:01:08.0: Cable is unplugged...
qla2xxx 0000:01:08.1: Cable is unplugged...
scst: Target 21:00:00:e0:xx:xx:xx:xx (rel ID 1) for template qla2x00tgt registered successfully
qla2x00t(0): 64 Bit PCI addressing enabled
scst: Target 21:01:00:e0:xx:xx:xx:xx (rel ID 2) for template qla2x00tgt registered successfully
qla2x00t(1): 64 Bit PCI addressing enabled
scst: Target template qla2x00tgt registered successfully
qla2x00t(0): Enabling target mode
qla2xxx 0000:01:08.0: Performing ISP abort - ha= ffff81024dc88608.
qla2xxx 0000:01:08.0: Cable is unplugged...

# by mdesign21 | 2010-04-28 23:41 | IT系