印刷
カテゴリ: FreeBSDとLinux
参照数: 1507

My PC environment is special, so iSCSI can be used to boot various OS.

However, with iSCSI, 1 GB Ethernet is the limit, and if 10 GB Ethernet is introduced, the amount of money burden is too high.

So, attention was focused on FC Fiber Channel.

Fiber Channel has 1, 2, 4, 8 Gb products, but 4 Gb seems to be cheap.

 

Let's try build SAN in home.

FC HBA (FC's PCIe card) requires 2 cards and 1 optical cable as a minimum configuration.

FC HBA is QLE2460, QLogic's product, which is PCIe x4 connection.

Next you need the optical cable.

 

It seems good with multimode duplex LC connector.

These products can be obtained cheaply with AMAZON or EBay.

 

Fiber Channel seems to connect to storage called target from FC HBA.

Normally you have to buy targeted storage.
But, it is very expensive to use it at home.

So let 's build an FC target with FreeBSD this time.

FreeBSD will become FC target by rebuilding the kernel.


 It is a rebuilding of the kernel immediately.

Prepare the source of the kernel.

Version 11.1 or higher is recommended.

 

Modify options

Copy "/usr/src/sys/amd64/conf/GENERIC" with an appropriate name and add the following.

options ISP_TARGET_MODE

With this, preparation is OK.

Next is the rebuild of the kernel.

make buildkernel KERNCONF=[modified GENERIC file]

make installkernel KERNCONF=[modified GENERIC file]

 

When construction is completed, modify the boot option etc.

/boot/device.hints

hint.isp.0.role="1"

/boot/loader.conf

ispfw_load="YES"

 

Ready. 

Let's plug in the QLE 2460 and restart os.

Successful is if the following is displayed on the boot log.

isp0: <Qlogic ISP 2432 PCI FC-AL Adapter> port 0xe000-0xe0ff mem 0xffa40000-0xffa43fff irq 24 at device 0.0 on pci1

isp0: Chan 0 setting role to 0x1


 Next, prepare the storage image data to be exposed as storage.

Example)
Use zfs, write a sample that exposes "zpool/fiber/test1" as storage.

 

Create storage

zfs create -V 100G -b 4k zpool/fiber/test1

 

/etc/rc.conf

ctld_enable=”YES”

 

/etc/ctl.conf

target naa.2100001b320bc0d3 {

        port isp0

        lun 0 {

                path /dev/zvol/zpool/fiber/test1

        }

 }

"naa.2100001b320bc0d3" is the name assigned to "camtgt isp0" displayed by the following command.

ctladm port -o on -t fc

ctladm portlist

 

Finally, start publishing with the following command.

/etc/rc.d/ctld restart


Since the FC target was able to be constructed, this time it is the client side (initiator).

By entering "CTRL + Q" at PC startup, the setting screen will be displayed.

 

Basically, OS can not boot with UEFI, so install it with MBR.

Linux can be installed easily.
But Windows is awkward.

Windows 10, if set up normally, will be a UEFI boot.

After setup start up, enter "SHIFT + F10" and start the console.
Then, enter the following command.

diskpart

list disk

select disk 0

clean

exit

You can install it as an MBR.

 

In Windows 10, it seems that QLE 2460 is not recognized and startup fails.

From here, download "Fiber Channel STOR Miniport Driver for Windows 2012 (x64)" driver, load the driver, run it by setting up.

 

It is a benchmark in Windows 10.

 

With this, we completed the ultra high-speed Home NAS project.