Search

Doing iSCSI targets on ZFS

January 7th, 2010 by Stargazer

As ZFS did quite well here – even after messing around with disks, I decided to give it another try. This time I am out to use its features on other systems. But to do so, I need to share it. As I am running virtual machines, it would be nice to have iSCSI shares to (ab)use. So let’s do it by starting the service:

# svcadm enable iscsitgt

As my Solaris install is still quite fresh I got a spare disk in it. It should carry my iscsi pool which I will just call ‘iscsistore’. Keeping it on a separate disk allows me to export it independently. So here we go:

# zpool create iscsistore c0t1d0

If you think that I have to mess around with dd now to write containers, you’re wrong. ZFS does this for us elegantly:

# zfs create -s -V 10gb iscsistore/zvol

Now the iSCSI shares:

# zfs set shareiscsi=on iscsistore/zvol

We check:

# iscsitadm list target -v

And that’s it. We’re ready to roll. Simple and easy. Simply ZFS.

This entry was posted on Thursday, January 7th, 2010 at 07:51 and is filed under IT Related stuff. Tags: , , . You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply

For spam filtering purposes, please copy the number 2233 to the field below: