This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
fileservices:zfs_ubuntu [2013/09/17 13:02] tschulz created |
fileservices:zfs_ubuntu [2013/09/17 13:27] (current) tschulz [Create iSCSI Target] |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== ZFS on Ubuntu ====== | ====== ZFS on Ubuntu ====== | ||
+ | ===== Install ZFS ===== | ||
- make sure add-apt-repository is installed <file> | - make sure add-apt-repository is installed <file> | ||
apt-get install python-software-properties | apt-get install python-software-properties | ||
Line 10: | Line 11: | ||
- install zfs package<file> | - install zfs package<file> | ||
apt-get install ubuntu-zfs | apt-get install ubuntu-zfs | ||
+ | </file> | ||
+ | |||
+ | ===== Create Pool and datasets ===== | ||
+ | - create pool<file> | ||
+ | zpool create tank /dev/<DISK> | ||
+ | </file> | ||
+ | - create dataset<file> | ||
+ | zfs create tank/vol1 | ||
+ | </file> | ||
+ | - create volume<file> | ||
+ | zfs create -V 2g tank/v1 | ||
+ | </file> | ||
+ | |||
+ | ===== Create iSCSI Target ===== | ||
+ | - Install iscsitarget<file> | ||
+ | apt-get install iscsitarget iscsitarget-dkms | ||
+ | </file> | ||
+ | - enable iscsitarget, edit /etc/default/iscsitarget<file> | ||
+ | ISCSITARGET_ENABLE=true | ||
+ | </file> | ||
+ | - Add Target: add to /etc/iet/ietd.conf<file> | ||
+ | Target iqn.zfs.sebekaschools.net:storage.sys0 | ||
+ | Lun 0 Path=tank/v1,Type=blockio,ScsiId=lun0,ScsiSN=lun0 | ||
</file> | </file> |