Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Create iSCSI in Firewall
- firewall-cmd --permanent --new-service=iscsi-target
- #Edit /etc/firewalld/services/iscsi-target.xml to allow 3260/tcp
- #Reload the complete firewall to enable the created service
- firewall-cmd --complete-reload
- #Add the rule to the firewall zone
- sudo firewall-cmd --permanent --zone=public --add-service=iscsi-target
- #And reload the firewall
- sudo firewall-cmd --reload
- #Check if firewall is updated
- sudo iptables -nvL | grep 3260
- # Create iSCSI Block Device of 200GB
- zfs create -V 200g zfs/erik-desktop-iscsiblockdevice01.iscsi /dev/zvol/zfs/erik-desktop-iscsiblockdevice01.iscsi
- #Store the iSCSI files in a certain place
- zfs create zfs/iscsifs
- #Install the iSCSI commandline for admining the iSCSI sub system. Modules are built-in the kernel already
- yum install targetcli
- #Enter the iSCSI sub system
- targetcli
- #Create the storage with fileio
- cd /backstores/fileio/
- create name=erik-desktop-iscsi01 file_or_dev=/zfs/iscsifs/erik-desktop-iscsi01.iscsi size=10G
- #Create the storage with block device
- cd /backstores/block
- create name=erik-desktop-iscsiblockdevice01.iscsi dev=/dev/zvol/zfs/erik-desktop-iscsiblockdevice01.iscsi
- #Move to the iSCSI
- cd /iscsi
- #Create target
- create iqn.2015-02.nl.eastnet.zastron:sn.iscsifs
- #Create LUN
- cd iqn.2015-02.nl.eastnet.zastron:sn.iscsifs
- cd tpg1/luns
- create /backstores/fileio/erik-desktop-iscsi01
- #Setup access permissions
- cd ../acls
- # does not work:
- create iqn.2015-02.nl.eastnet:erik-desktop
- # this will work
- create iqn.1991-05.com.microsoft:erik-desktop
- #Create portal
- cd ../portals
- create
- Using default IP port 3260
- Binding to INADDR_ANY (0.0.0.0)
- Created network portal 0.0.0.0:3260.
- #Logging
- /var/log/messages
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement