Difference between revisions of "ISCSI target"
Jump to navigation
Jump to search
(→Setup) |
|||
Line 29: | Line 29: | ||
<source lang="sh"> | <source lang="sh"> | ||
tgtadm --lld iscsi --mode target --op bind --tid 1 -I ALL | tgtadm --lld iscsi --mode target --op bind --tid 1 -I ALL | ||
+ | </source> | ||
+ | |||
+ | Save config | ||
+ | <source lang="sh"> | ||
+ | tgt-admin --dump > /etc/tgt/targets.conf | ||
</source> | </source> |
Latest revision as of 00:06, 27 April 2016
Setup
Install:
emerge tgt
Start service:
/etc/init.d/tgtd start
rc-update add tgtd default
Create a target:
tgtadm --lld iscsi --mode target --op new --tid=1 --targetname iqn.2007-01.be.hacks:nexus1
List targets:
tgtadm --lld iscsi --mode target --op show
Add a LUN to the target:
tgtadm --lld iscsi --mode logicalunit --op new --tid 1 --lun 1 -b /dev/vg0/iscsi1
Grant public access:
tgtadm --lld iscsi --mode target --op bind --tid 1 -I ALL
Save config
tgt-admin --dump > /etc/tgt/targets.conf