ZFS shares part II: iSCSI, NFS and CIFS

| | Comments (0) | TrackBacks (0)
In the first entry about the difference between block based and file based storage sharing I talked about architectural differences between iSCSI/FiberChannel and NFS/CIFS on the other side.

Now it is time to see how easily any OpenSolaris computer running ZFS can be transformed to a storage server/system.

Keep in mind that the Sun Open Storage Servers exactly do that with a nice GUI and a powerful commandline.

At this time, FiberChannel sharing is not yet accomplished, there is still a lack of a FiberChannel target mode driver. So we'll concentrate on offering iSCSI, NFS and CIFS services for the following examples.


iSCSI block based sharing

Now let's create an iSCSI disk in OpenSolaris (snv_111b) for another host which wants to mount it. With ZFS, this is a work of minutes:

# zfs create -V 10G mypool/myblockdevice
Result: This creates a 10 gigabyte block device within the zpool "mypool". This block devices appears just as every other block device in the /dev filesystem:

pascal@savannah:/dev/zvol/dsk/mypool# ls -l
total 1
lrwxrwxrwx   1 root root  35 Aug  1 14:47 myblockdevice -> ../../../../devices/pseudo/zfs@0:3c


Want to share this "disk" via iSCSI?

First, install the iSCSI target system if not done yet:

# pfexec pkg install pkg:/SUNWiscsitgt
Now you may share your new block device:

Just enter:

# zfs set shareiscsi=on mypool/myblockdevice

Result:
# iscsitadm list target
Target: mypool/myblockdevice
    iSCSI Name: iqn.1986-03.com.sun:02:0b356094-de21-65e1-888d-aea8d58d8ecd
    Connections: 0


Now you can use that iSCSI "disk" (with 10 gigabytes) as an iSCSI storage disk on another iSCSI capable system. One command was enough to enable this sharing!



Disk is too small?
Just make it bigger:

# zfs set volsize=20G mypool/myblockdevice

The new Sun OpenStorage servers rely heavily on these OpenSolaris ZFS features.
Imagine a raidz1 or raidz2 zpool and many block volumes like the one above. You're free to alter any block volume size at any time - it is up to the operating system of the connected host whether it can grow/reduce its filesystem on it or not.


2. File based sharing

This is also a "one command solution".
Create a filesystem you want to share:

# zfs create mypool/myshare

And now, turn NFS sharing on:

# zfs set sharenfs=on mypool/myshare

or - with CIFS -

# zfs set sharesmb=on mypool/myshare

Ok, you're right: To really use this feature in Windows environment, you have to do a mapping between Unix user ids and Active Directory entries. But that's possible, even with a separate AD attribute.




0 TrackBacks

Listed below are links to blogs that reference this entry: ZFS shares part II: iSCSI, NFS and CIFS.

TrackBack URL for this entry: http://southbrain.com/mt/mt-tb.cgi/83

Leave a comment

July 2011

Sun Mon Tue Wed Thu Fri Sat
          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 29 30
31            

About

This blog is owned by:

Pascal Gienger
Kanzleistr. 14
78462 Konstanz
Phone +49 7531 584298-0
Fax +49 7531 584298-9

Google+: Profile
YouTube Channel: pascalgienger