Tgt: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
Zeile 5: Zeile 5:
 
=Create a LUN for the target=
 
=Create a LUN for the target=
 
*tgtadm --lld iscsi --op new --mode logicalunit --tid 1 --lun 1 -b /mnt/md0/iscsi/disk-1.img
 
*tgtadm --lld iscsi --op new --mode logicalunit --tid 1 --lun 1 -b /mnt/md0/iscsi/disk-1.img
 +
=Set/Add a new ACL rule=
 +
*tgtadm --lld iscsi --op bind --mode target --tid 1 -I 10.80.0.0/13
 
=Show Targets=
 
=Show Targets=
 
*tgtadm --lld iscsi --op show --mode target
 
*tgtadm --lld iscsi --op show --mode target
Zeile 47: Zeile 49:
 
</pre>
 
</pre>
  
=Set/Add a new ACL rule=
+
 
*tgtadm --lld iscsi --op bind --mode target --tid 1 -I 10.80.0.0/13
 
  
 
=Links=
 
=Links=
 
*http://inqbus-hosting.de/support/dokumentation/docs/target-daemon-tgtd-tgtadm
 
*http://inqbus-hosting.de/support/dokumentation/docs/target-daemon-tgtd-tgtadm
 
*https://www.cyberciti.biz/tips/howto-setup-linux-iscsi-target-sanwith-tgt.html
 
*https://www.cyberciti.biz/tips/howto-setup-linux-iscsi-target-sanwith-tgt.html

Version vom 18. Oktober 2017, 20:27 Uhr

Install

  • apt-get install tgt

Create an empty target

  • tgtadm --lld iscsi --op new --mode target --tid 1 -T iqn.2021-10.xinux.lan:disks

Create a LUN for the target

  • tgtadm --lld iscsi --op new --mode logicalunit --tid 1 --lun 1 -b /mnt/md0/iscsi/disk-1.img

Set/Add a new ACL rule

  • tgtadm --lld iscsi --op bind --mode target --tid 1 -I 10.80.0.0/13

Show Targets

  • tgtadm --lld iscsi --op show --mode target
Target 1: iqn.2021-10.xinux.lan:disks
    System information:
        Driver: iscsi
        State: ready
    I_T nexus information:
    LUN information:
        LUN: 0
            Type: controller
            SCSI ID: IET     00010000
            SCSI SN: beaf10
            Size: 0 MB, Block size: 1
            Online: Yes
            Removable media: No
            Prevent removal: No
            Readonly: No
            SWP: No
            Thin-provisioning: No
            Backing store type: null
            Backing store path: None
            Backing store flags:
        LUN: 1
            Type: disk
            SCSI ID: IET     00010001
            SCSI SN: beaf11
            Size: 21475 MB, Block size: 512
            Online: Yes
            Removable media: No
            Prevent removal: No
            Readonly: No
            SWP: No
            Thin-provisioning: No
            Backing store type: rdwr
            Backing store path: /mnt/md0/iscsi/disk-1.img
            Backing store flags:
    Account information:
    ACL information:
         10.80.0.0/13


Links