SC101T Linux Cluster

I recently aquired a Netgear SC101T Network storage device. After discovering that the device is not a NAS and instead was a SAN device I was at first a little disappointed. Furthermore the device uses a proprietry file system and a proprietry protocol called zSAN to access the device. Well fortunately someone has developed an SC101-NBD linux userspace driver that translates the proprietry zSAN protocol into linux nbd (Network Block Device) protocol. After downloading and compiling the driver at first nothing worked, and I found the reason to be that the driver was developed for the SC101 not the SC101T. After a bit of hunting around I found that someone had posted the following fix in on the driver support group forum.

The fix is pretty simple. In psan.c the functions ‘psan_query_disk’ and ‘psan_query_root’ pass an info’ value of ‘1’ into the ‘psan_get_t’ struct. Doing so seems to cause the ‘select’ to fail in the ‘wait_for_packet’ function. Changing the value passed into ‘info’ to ‘0’ seems to allow the device, disks and partitions to be discovered fine – I’m now currently watching my linux box mkfs.ext3 /dev/nbd0

I followed the instructions and re-compiled the driver, this time it worked. Issuing a

sudo ut listall

Gave the following output

===============================================================================
VERSION : 1.1.3 ROOT IP ADDR : 192.168.2.5
TOTAL(MB): 610480 # PARTITIONS : 1
FREE (MB): 64
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PARTITION LABEL IP ADDR SIZE (MB)
F1A2F2EA-7C87-11DE-ACB7-0013A9D715B7 linux1 192.168.2.6 610407
===============================================================================
VERSION : 1.1.3 ROOT IP ADDR : 192.168.2.3
TOTAL(MB): 610480 # PARTITIONS : 1
FREE (MB): 133594
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PARTITION LABEL IP ADDR SIZE (MB)
2B4F7D24-67FE-11DE-8CC5-0013A9D715B7 linux0 192.168.2.4 476877
===============================================================================

This lists the partitions on the device that had been previously created using the Windows™ software. A partition can be attached by issuing

sudo ut attach F1A2F2EA-7C87-11DE-ACB7-0013A9D715B7 /dev/nbd0

So this provides block device access to the partition, to use the partition obviously one has to put a file system on it. The difference with this SAN based device and say a local hard disk device, is that a local harddisk is only accessed by one machine at a time. Since I wanted to access the device from multiple machines something like ext2fs is not suitable. What is much more suitable is gfs2 which is actually designed for SAN storage devices. To install gfs2 on debian based distributions you can run

sudo apt-get install gfs2-tools

mkfs.gfs2 -j 5 -t storage:linux0 /dev/nbd0

To actually mount the device the lock manager also has to be configured.

<?xml version="1.0"?>
<cluster name="storage" config_version="1">
<clusternodes>
<clusternode name="korma" nodeid="1">
<fence>
<method name="human">
<device name="last_resort" ipaddr="korma"/>
</method>
</fence>
</clusternode>
<clusternode name="tikka" nodeid="2">
<fence>
<method name="human">
<device name="last_resort" ipaddr="tikka"/>
</method>
</fence>
</clusternode>
</clusternodes>
<fencedevices>
<fencedevice name="last_resort" agent="fence_manual"/>
</fencedevices>
</cluster>

Continue reading SC101T Linux Cluster

Advertisement