Tgt
Zur Navigation springen
Zur Suche springen
Installieren von TGT
Ubuntu/Debian
- sudo apt-get update
- sudo apt-get install tgt
Fedora/Redhat
- sudo yum install scsi-target-utils
Erstellen der Images
- dd if=/dev/zero of=/mnt/target1.img bs=1G count=5
- dd if=/dev/zero of=/mnt/target2.img bs=1G count=5
- dd if=/dev/zero of=/mnt/target3.img bs=1G count=5
Erstellen des iSCSI-Target
- tgtadm --lld iscsi --mode target --op new --tid 1 --targetname iqn.2023-06.com.tuxmen:target1
- tgtadm --lld iscsi --mode target --op new --tid 2 --targetname iqn.2023-06.com.tuxmen:target2
- tgtadm --lld iscsi --mode target --op new --tid 3 --targetname iqn.2023-06.com.tuxmen:target3
Binden iSCSI-Targets
- tgtadm --lld iscsi --mode logicalunit --op new --tid 1 --lun 1 --backing-store /mnt/target1.img
- tgtadm --lld iscsi --mode logicalunit --op new --tid 2 --lun 2 --backing-store /mnt/target2.img
- tgtadm --lld iscsi --mode logicalunit --op new --tid 3 --lun 3 --backing-store /mnt/target3.img
Aktivieren Sie das iSCSI-Target
- tgtadm --lld iscsi --mode target --op bind --tid 1 --initiator-address ALL
- tgtadm --lld iscsi --mode target --op bind --tid 2 --initiator-address ALL
- tgtadm --lld iscsi --mode target --op bind --tid 3 --initiator-address ALL
Überprüfen des iSCSI-Target
- tgtadm --lld iscsi --mode target --op show