|
Now that iSCSI support is built into ZFS, let's see how to setup some storage with zvols.
On the server, we create a pool, a zvol, and share the zvol over iSCSI:
fsh-suzuki# zpool create iscsistore c0t1d0
fsh-suzuki# zfs create -s -V 10gb iscsistore/zvol
fsh-suzuki# zfs set shareiscsi=on iscsistore/zvol
fsh-suzuki# iscsitadm list target -v
Target: iscsistore/zvol
iSCSI Name: iqn.1986-03.com.sun:02:a7f19760-5d17-ee50-f011-c4c749add692
Alias: iscsistore/zvol
Connections: 0
ACL list:
TPGT list:
LUN information:
LUN: 0
GUID: 0x0
VID: SUN
PID: SOLARIS
Type: disk
Size: 10G
Backing store: /dev/zvol/rdsk/iscsistore/zvol
Status: online
fsh-suzuki#
Now on the client, we need to discover the iSCSI share (192.168.16.135 is the IP of the server):
fsh-weakfish# iscsiadm list discovery
Discovery:
Static: disabled
Send Targets: enabled
iSNS: disabled
fsh-weakfish# iscsiadm modify discovery --sendtargets enable
fsh-weakfish# iscsiadm add discovery-address 192.168.16.135
fsh-weakfish# svcadm enable network/iscsi_initiator
fsh-weakfish# iscsiadm list target
Target: iqn.1986-03.com.sun:02:a7f19760-5d17-ee50-f011-c4c749add692
Alias: iscsistore/zvol
TPGT: 1
ISID: 4000002a0000
Connections: 1
fsh-weakfish#
Now we can create a pool on the client using the iSCSI device:
fsh-weakfish# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c1t1d0
/pci@0,0/pci1022,7450@a/pci17c2,10@4/sd@1,0
1. c2t01000003BAAAE84F00002A0045F86E49d0
/scsi_vhci/disk@g01000003baaae84f00002a0045f86e49
Specify disk (enter its number): ^C
fsh-weakfish# zpool create i c2t01000003BAAAE84F00002A0045F86E49d0
fsh-weakfish# zpool list
NAME SIZE USED AVAIL CAP HEALTH ALTROOT
i 9.94G 89K 9.94G 0% ONLINE -
fsh-weakfish# zpool status
pool: i
state: ONLINE
scrub: none requested
config:
NAME STATE READ WRITE CKSUM
i ONLINE 0 0 0
c2t01000003BAAAE84F00002A0045F86E49d0 ONLINE 0 0 0
errors: No known data errors
fsh-weakfish#
Yep, that's it!
(2007-03-14 16:02:30.0/2007-03-14 15:02:30.0)
Permalink
Trackback: http://blogs.sun.com/erickustarz/en_US/entry/iscsi_storage_with_zvols
|