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.
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:
Want to share this "disk" via iSCSI?
First, install the iSCSI target system if not done yet:
Just enter:
Result:
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:
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:
And now, turn NFS sharing on:
or - with CIFS -
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.
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/myblockdeviceResult: 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:/SUNWiscsitgtNow 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.

Leave a comment