FreeBSD hdd "export" - SAN protocol

Hello fellas,

For learning purposes only, I would like to use my FreeBSD box like a SAN box in the way that I would "export" an entire hdd (for instance /dev/da0) and I would "see" it in the other FreeBSD box "as is" and be able to mount it just as a local hdd.

The idea came from work, where we have dedicated SAN environment, and all our AIX machines have SAN disks. I would create a box with a bunch of disks and from there I would like to have, let's say 5 diskless machines, booting off, of the main one with disks.

I know the pc architecture doesn't allow this (PXE comes into mind) but in the end, I would like to have 1 disk from 1 machine "viewable" as "/dev/whatever" on the other machines.

I do not have FSC adapters. I am just curious if this is possible via LAN or something else
 
ah ... you are right. I was thinking about SAN but for some reason I wrote NAS ... original post corrected
 
You are looking for iSCSI. There are a couple of iSCSI targets available in the ports tree. These are used to export block devices from one system (the target) to another (the initiator). FreeBSD includes iSCSI initiator support in the base.
 
Use net/istgt from ports.
You cannot boot directly off an iscsi target though, as your bios doesn't know iscsi.

Instead of dedicating physical disks to initiators I would pool the disks with zfs and create luns as files in an ordinary zfs filesystem (zfs currently doesn't support sharing raw devices over iscsi).
 
Reading the TODO list at http://wiki.freebsd.org/ZFS gave me the impression that sharing zvols over iscsi isn't supported.
If I'm wrong zvols are indeed the way to do it. It gives you the the option of using thin provisioning as well (zfs create -s -V)
 
It works quite nicely in the testing we've done, with FreeBSD and Linux iSCSI initiators (clients). It even works well for creating combined ZFS pool, where the block devices for the vdevs are iSCSI targets. :)
 
Back
Top