Install Fiber Channel in Openfiler 2.99

Due to high demand of IO, we have to upgrade the hardware of iSCSI server. This time, Fiber Channel is our option. This post will show how to enable FC in Openfiler 2.99 and map a volume to FC card.

1. Unmap the volume, this can be done via the web interface Openfiler provided.

2. Enable Fiber Channel via service sectionopenfiler-services

3. run the following command to enable vdisk_fileio and vdisk_blockio handlers

1
2
3
4
5
6
7
8
9
10
11
12
modprobe scst_disk
modprobe scst_vdisk
modprobe qla2x00tgt
modprobe scst_vdisk
modprobe scst_user
modprobe scst_modisk
modprobe scst_processor
modprobe scst_raid
modprobe scst_tape
modprobe scst_cdrom
modprobe scst_changer
modprobe ib_srpt

4. Create a scst device

1
scstadmin -open_dev <device-name > -handler <vdisk_fileio or vdisk_blockio > -attributes filename=<path of logical volume >

5. create a security group for target and initiator

1
2
3
4
5
# add group
scstadmin -add_group <group-name > -driver qla2x00t -target <onboard fc card wwn >
# assign server fc to security group
scstadmin -add_init <server wwn > -driver qla2x00t -target <onboard fc card wwn > -group <group-name >

6. assign virtual disk to security group and Lun

1
scstadmin -add_lun 0 -driver qla2x00t -target <onboard fc card wwn > -group <group-name > -device <device-name >

7. save configuration to config file

1
scstadmin -write_config /etc/scst.conf

After saving the config, the scst.conf will look like this:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
HANDLER vdisk_fileio {
DEVICE <device-name > {
t10_dev_id 'fc_vol 3d61d0df'
usn 3d61d0df
filename /dev/group_1/logical_volumn_1
}
}
TARGET_DRIVER qla2x00t {
TARGET <onboard fc wwn 1 > {
rel_tgt_id 1
enabled 0
}
TARGET <onboard fc wwn 2 > {
rel_tgt_id 2
enabled 1
GROUP <group-name > {
LUN 0 <device-name >
INITIATOR <server fc wwn >
}
}
}

Now, the config file could be edit to add more targets and logical volumes, then run the following command to activate them

1
scstadmin -config /etc/scst.conf

References:

http://www.tomlecluse.be/blog/20110619/openfiler-299-fiber-channel-setup