With the help of a couple of friends, we’ve put a 4.5T RAID-5 machine on our network and I’m trying to figure out how to share the storage with the rest of the hosts. In the past, I have used NFS and CIFS/Samba to provide access to remote hosts. This has generally worked okay so long as the server stays online.
I don’t know if the results are going to be much different, but I am now trying a different approach. I plan to run an iSCSI server, and I’ve already configured AoE (ATA over Ethernet). I’ve exported a block device on the network segment and mounted it on a remote host. This was pretty easy to configure. There is a bit of documentation on the internet already, but I’ll give another quick overview.
I gave the storage server the unoriginal name ’san0′. This host is running debian lenny. I am testing the configuration from my debian sid development host, which has the similarly unoriginal name ‘dev0′. So, think server when you see ’san0′ and client when you see ‘dev0′.
I assume that you’ve already got an LVM volume group set up. Mine is called ‘vg0′. Correct the following examples to account for any differences. You can use disk partitions instead of LVM logical volumes.
Create a logical volume to be exported:
cjac@san0:~$ sudo lvcreate /dev/vg0 -n e0.1 -L 5G
Load the AoE kernel module:
cjac@san0:~$ sudo modprobe aoe
Install the package containing the vblade block device export server:
cjac@san0:~$ sudo apt-get install vblade
Export the block device. Note that the ethernet bridge on which I export the device is called ‘loc’:
cjac@san0:~$ sudo vbladed 0 1 loc /dev/vg0/e0.1
Install the AoE discovery tools on the client:
cjac@dev0:~$ sudo apt-get install aoetools
Load the AoE kernel module:
cjac@dev0:~$ sudo modprobe aoe
Probe for exported AoE devices:
cjac@dev0:~$ sudo aoe-discover
Verify that our exported device was discovered:
cjac@dev0:~$ test -e /dev/etherd/e0.1 && echo "yep"
yep
You can now treat /dev/etherd/e0.1 as you would any other block device. You can format it directly, or partition it and format a partition, use it as a device in your software RAID array, use it as swap space (ha), or something completely different.
Now to figure out this iSCSI stuff…