orenoblog

エンジニアになりたいExcel方眼紙erの物語

iodrive2ほしい…そんな言葉は使う必要がねーんだ。iodrive2をブッ挿したッ!なら言ってもいい。

ioDrive2に触れる機会があったのでメモ。

HW: HP Proliant DL360 G7(ちと古い)
OS: CentOS5.10(x86_64)

・服を脱ぎます
・金属に触れます。つめたぁーい
・サーバの電源を停止し、ラックから外します
・ioDrive2を箱から出します
PCI-Expressに挿します
・サーバをラッキングします
・電源ON

簡単!!

BIOS上の認識

PCI Slot X Other Mass Storage Controller

lspciの結果

# lspci |grep -i fusion
09:00.0 Mass storage controller: Fusion-io ioDrive2 (rev 04)

認識OKです。iomemory-vslをインストールします。

iomemory-vslのインストール

# yum install  kernel-headers-`uname -r` kernel-devel-`uname -r` gcc rsync rpm-build make
# rpmbuild --rebuild iomemory-vsl-*.*.*.****-*.*.src.rpm
iomemory-vsl-*.*.*.****-*.*.src.rpm をインストール中です。
実行中(%prep): /bin/sh -e /var/tmp/rpm-tmp.32951
+ umask 022
+ cd /usr/src/redhat/BUILD

・・省略・・

+ umask 022
+ cd /usr/src/redhat/BUILD
+ rm -rf iomemory-vsl-*.*.*.****
+ exit 0
# rpm -ivh /usr/src/redhat/RPMS/x86_64/iomemory-vsl-*************.x86_64.rpm \
/usr/src/redhat/RPMS/x86_64/iomemory-vsl-config-******************.x86_64.rpm \
/usr/src/redhat/RPMS/x86_64/iomemory-vsl-source-*******************.x86_64.rpm
準備中...                ########################################### [100%]
   1:iomemory-vsl-source    ########################################### [ 33%]
   2:iomemory-vsl-************ ########################################### [ 67%]
   3:iomemory-vsl-config-*** ########################################### [100%]
# vi /etc/modprobe.d/iomemory_vsl.conf
# udevを無効化する
# blacklist iomemory-vsl
↓
blacklist iomemory-vsl
# modprobe iomemory_vsl
# lsmod |grep iomem
iomemory_vsl         1229980  0
# cd /root/iodrive2/CentOS-5/*.*.*/Utilities
# tree
|-- fio-common-*.*.*.****-1.0.noarch.rpm
|-- fio-sysvinit-*.*.*.****-1.0.noarch.rpm
|-- fio-util-*.*.*.****-1.0.noarch.rpm
|-- lib32vsl-*.*.*.****-1.i386.rpm
`-- libvsl-*.*.*.****-1.0.noarch.rpm
# rpm -Uvh *
準備中...                ########################################### [100%]
   1:fio-util               ########################################### [ 20%]
   2:fio-common             ########################################### [ 40%]
   3:fio-sysvinit           ########################################### [ 60%]
   4:lib32vsl               ########################################### [ 80%]
   5:libvsl                 ########################################### [100%]
# fio-status --all
S/N等が表示されるので省略。
ioMemory deviceが確認できればOK
# ll /dev/fio*
brw-r----- 1 root disk 252, 0 1029 13:00 /dev/fioa
# fdisk -l
Disk /dev/fioa: 365.0 GB, 365000000000 bytes
255 heads, 63 sectors/track, 44375 cylindersUnits = シリンダ数 of 16065 * 512 = 8225280 bytes
ディスク /dev/fioa は正常な領域テーブルを含んでいません

ioDrive2の初期化

初期化及びFirmware update時はfio-detatch -> 操作 -> fio-attachが基本です。

# fio-detach /dev/fct0
Detaching: [====================] (100%) -
 fioa - detached.
# fio-format -b 4k /dev/fct0

/dev/fct0: Creating block device.
  Block device of size 365.00GBytes (339.93GiBytes).
  Using block (sector) size of 4096 bytes.

WARNING: Formatting will destroy any existing data on the device!
Do you wish to continue [y/n]? y

WARNING: Do not interrupt the formatting! If interrupted,
the fio-sure-erase utility may help recover from format errors.
Please see documentation or contact support.

Formatting: [====================] (100%) -
 /dev/fct0 - format successful.
# fio-attach /dev/fct0
Attaching: [====================] (100%) /
 fioa - attached.

ファイルシステムの準備

MySQLサーバを稼働させるため、XFSを利用しました。

# yum install xfsprogs
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: www.ftp.ne.jp
 * epel: ftp.iij.ad.jp
 * extras: www.ftp.ne.jp
 * updates: www.ftp.ne.jp
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package xfsprogs.x86_64 0:2.9.4-1.el5.centos set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================
 Package           Arch            Version                        Repository       Size
========================================================================================
Installing:
 xfsprogs          x86_64          2.9.4-1.el5.centos             extras          1.3 M

Transaction Summary
========================================================================================
Install       1 Package(s)
Upgrade       0 Package(s)

Total download size: 1.3 M
Is this ok [y/N]: y
# fdisk /dev/fioa
注意: セクタサイズが 4096 です (512 ではなく)
デバイスは正常な DOS 領域テーブルも、Sun, SGI や OSF ディスクラベルも
含んでいません
新たに DOS ディスクラベルを作成します。あなたが書き込みを決定するまで、変更は
メモリ内だけに残します。その後はもちろん以前の内容は修復不可能になります。

このディスクのシリンダ数は 5546 に設定されています。
間違いではないのですが、1024 を超えているため、以下の場合
に問題を生じうる事を確認しましょう:
1) ブート時に実行するソフトウェア (例. バージョンが古い LILO)
2) 別の OS のブートやパーティション作成ソフト
   (例. DOS FDISK, OS/2 FDISK)
警告: 領域テーブル 4 の不正なフラグ 0x0000 は w(書き込み)によって
正常になります

コマンド (m でヘルプ): p

Disk /dev/fioa: 364.9 GB, 364999999488 bytes
255 heads, 63 sectors/track, 5546 cylinders
Units = シリンダ数 of 16065 * 4096 = 65802240 bytes

デバイス Boot      Start         End      Blocks   Id  System

コマンド (m でヘルプ): n
コマンドアクション
   e   拡張
   p   基本領域 (1-4)
p
領域番号 (1-4): 1
最初 シリンダ (1-5546, default 1):
Using default value 1
終点 シリンダ または +サイズ または +サイズM または +サイズK (1-5546, default 5546):
Using default value 5546

コマンド (m でヘルプ): p

Disk /dev/fioa: 364.9 GB, 364999999488 bytes
255 heads, 63 sectors/track, 5546 cylinders
Units = シリンダ数 of 16065 * 4096 = 65802240 bytes

デバイス Boot      Start         End      Blocks   Id  System
/dev/fioa1               1        5546   356385708   83  Linux

コマンド (m でヘルプ): w
領域テーブルは交換されました!

ioctl() を呼び出して領域テーブルを再読込みします。
ディスクを同期させます。
# mkfs.xfs -s size=4096 -b size=4096 /dev/fioa1
meta-data=/dev/fioa1             isize=256    agcount=16, agsize=5568526 blks
         =                       sectsz=4096  attr=0
data     =                       bsize=4096   blocks=89096416, imaxpct=25
         =                       sunit=0      swidth=0 blks, unwritten=1
naming   =version 2              bsize=4096
log      =internal log           bsize=4096   blocks=32768, version=2
         =                       sectsz=4096  sunit=1 blks, lazy-count=0
realtime =none                   extsz=4096   blocks=0, rtextents=0

マウントの設定をします

# vi /etc/fstab
-- 追記する
/dev/fioa1      /mnt/iodrive xfs noauto,defaults,nobarrier,noatime 0 0
# mkdir /mnt/iodrive

iomemory-vslに記述します。

# chkconfig --add iomemory-vsl
# vi /etc/sysconfig/iomemory-vsl
# ENABLED=1ENABLED= 1
# MOUNTS=""MOUNTS="/mnt/iodrive"
# service iomemory-vsl restart
Stopping iomemory-vsl:
Detaching: [====================] (100%) /
 fioa - detached.
Unloading module iomemory-vsl
                                                           [  OK  ]
Starting iomemory-vsl:
Loading module iomemory-vsl
Mounting /mnt/iodrive
                                                           [  OK  ]
# df
Filesystem           1K-ブロック    使用   使用可 使用% マウント位置
/dev/mapper/VolGroup00-LogVol00
                      20314748   8707564  10558608  46% /
/dev/mapper/VolGroup00-LogVol01
                      15870920    286500  14765220   2% /var
/dev/sda1       101086     19469     76398  21% /boot
tmpfs                  8216144         0   8216144   0% /dev/shm
★/dev/fioa1           356254592      4832 356249760   1% /mnt/iodrive★

ようこそ爆速の世界へ。ラ・ヨダソウ・スティアーナ

firemware update

ファームウェアアップデート前にデータのバックアップを取得しておくといいぞ☆(ゝω・)vキャピってDocumentsに記載されていた

# fio-update-iodrive --split -d /dev/fctX <firemware_file>