ZFS and iSCSI
I was asked to share out the pool on the X4500 via NFS and iSCIS. NFS I was familiar with, and have used a fair amount. iSCSI for all its new hotness factor, I’ve never touched.
I was unsurprised, but pleased, with how trivial it is to set up. On the server (the target):
x4500# zfs create tank/iscsi
x4500# zfs set shareiscsi=on tank/iscsi
x4500# zfs create -s -V 25g tank/iscsi/vol001
x4500# zfs create -s -V 25g tank/iscsi/vol002
x4500# zfs create -s -V 25g tank/iscsi/vol003
x4500# zfs create -s -V 25g tank/iscsi/vol004
x4500# zfs create -s -V 25g tank/iscsi/vol005
x4500# zfs create -s -V 25g tank/iscsi/vol006
x4500# zfs list tank
tank 1.39G 13.3T 53.3K /tank
tank/iscsi 1.54M 13.3T 44.8K /tank/iscsi
tank/iscsi/vol001 246K 13.3T 246K -
tank/iscsi/vol002 246K 13.3T 246K -
tank/iscsi/vol003 247K 13.3T 247K -
tank/iscsi/vol004 262K 13.3T 262K -
tank/iscsi/vol005 263K 13.3T 263K -
tank/iscsi/vol006 264K 13.3T 264K -
tank/nfs 1.39G 13.3T 1.39G /tank/nfs
This will start the iSCSI service (iscsigtd) and share not only the parent volume (tank/iscsi) but all the children as well.
Accessing and using the disks on the client (the initiator) is just as easy:
client# iscsiadm modify discovery --sendtargets enable
client# iscsiadm add discovery-address 10.0.100.40
client# svcadm enable initiator
client# iscsiadm list target
Target: iqn.1986-03.com.sun:02:7ea6450a-4a26-cfe5-d679-fe0dbabe66b9
Alias: tank/iscsi/vol001
TPGT: 1
ISID: 4000002a0000
Connections: 1
Target: iqn.1986-03.com.sun:02:61d314ce-f4b3-ed1f-9891-e0c6c52f5601
Alias: tank/iscsi/vol002
TPGT: 1
ISID: 4000002a0000
Connections: 1
Target: iqn.1986-03.com.sun:02:eaea5a32-f54a-6d04-a453-888a580504c2
Alias: tank/iscsi/vol003
TPGT: 1
ISID: 4000002a0000
Connections: 1
Target: iqn.1986-03.com.sun:02:05272769-bd4a-6b54-8d6f-f525af20ad08
Alias: tank/iscsi/vol004
TPGT: 1
ISID: 4000002a0000
Connections: 1
Target: iqn.1986-03.com.sun:02:fb296689-109e-cb6d-9515-a07f581a81ce
Alias: tank/iscsi/vol005
TPGT: 1
ISID: 4000002a0000
Connections: 1
Target: iqn.1986-03.com.sun:02:ec71ac8e-e417-ce3f-891c-ee1febdf9120
Alias: tank/iscsi/vol006
TPGT: 1
ISID: 4000002a0000
Connections: 1
client# format < /dev/null
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c0d0 <DEFAULT cyl 4174 alt 2 hd 255 sec 63>
/pci@0,0/pci-ide@1,1/ide@0/cmdk@0,0
1. c1t600144F04B66BAA30000144F21056400d0 <DEFAULT cyl 3261 alt 2 hd 255 sec 63>
/scsi_vhci/disk@g600144f04b66baa30000144f21056400
2. c1t600144F04B66BAA40000144F21056400d0 <DEFAULT cyl 3261 alt 2 hd 255 sec 63>
/scsi_vhci/disk@g600144f04b66baa40000144f21056400
3. c1t600144F04B66BAA50000144F21056400d0 <DEFAULT cyl 3261 alt 2 hd 255 sec 63>
/scsi_vhci/disk@g600144f04b66baa50000144f21056400
4. c1t600144F04B66BAA60000144F21056400d0 <DEFAULT cyl 3261 alt 2 hd 255 sec 63>
/scsi_vhci/disk@g600144f04b66baa60000144f21056400
5. c1t600144F04B66BAA80000144F21056400d0 <DEFAULT cyl 3261 alt 2 hd 255 sec 63>
/scsi_vhci/disk@g600144f04b66baa80000144f21056400
6. c1t600144F04B66BAA90000144F21056400d0 <DEFAULT cyl 3261 alt 2 hd 255 sec 63>
/scsi_vhci/disk@g600144f04b66baa90000144f21056400
client# zpool create tank \
raidz c1t600144F04B66BAA30000144F21056400d0 c1t600144F04B66BAA40000144F21056400d0 c1t600144F04B66BAA50000144F21056400d0 \
raidz c1t600144F04B66BAA60000144F21056400d0 c1t600144F04B66BAA80000144F21056400d0 c1t600144F04B66BAA90000144F21056400d0
client# zpool status -v tank
pool: tank
state: ONLINE
scrub: none requested
config:
NAME STATE READ WRITE CKSUM
tank ONLINE 0 0 0
raidz1 ONLINE 0 0 0
c1t600144F04B66BAA30000144F21056400d0 ONLINE 0 0 0
c1t600144F04B66BAA40000144F21056400d0 ONLINE 0 0 0
c1t600144F04B66BAA50000144F21056400d0 ONLINE 0 0 0
raidz1 ONLINE 0 0 0
c1t600144F04B66BAA60000144F21056400d0 ONLINE 0 0 0
c1t600144F04B66BAA80000144F21056400d0 ONLINE 0 0 0
c1t600144F04B66BAA90000144F21056400d0 ONLINE 0 0 0
errors: No known data errors
Very nice.