Re: Creare iscsi target

Diego Zuccato <[email protected]>
Newsgroups gmane.linux.debian.user.italian
Message-ID <[email protected]>
Dovrei aver risolto, finalmente.

Il problema era l'installazione di tgt (indicata in tutte le guide che 
ho trovato). tgt *non* va installato, e infatti quando l'ho rimosso sono 
riuscito a creare il portale.

Da quel che mi pare di capire (ma posso sbagliarmi di grosso):
- tgt è il sistema "vecchio" per esportare LUN iSCSI, permette di usare 
RDMA e RoCE ma si basa su file di configurazione sotto /etc/tgt/conf.d/
- targetcli-fb è il sistema "nuovo", che esporta direttamente da 
kernel-mode e permette una riconfigurazione a caldo; la configurazione è 
in /etc/rtslib-fb-target/saveconfig.json

La cosa strana è che non risulta nulla in ascolto sulla 3260:
# lsof -nP -iTCP -sTCP:LISTEN
COMMAND  PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
sshd    1319 root    3u  IPv4  17900      0t0  TCP *:22 (LISTEN)
sshd    1319 root    4u  IPv6  17902      0t0  TCP *:22 (LISTEN)
master  4542 root   13u  IPv4  35667      0t0  TCP *:25 (LISTEN)
master  4542 root   14u  IPv6  35668      0t0  TCP *:25 (LISTEN)

Eppure dall'initiator di test mi collego e vedo la LUN.

Diego

Il 09/01/2025 07:39, Diego Zuccato ha scritto:
> Buongiorno a tutti!
> 
> E' da prima delle ferie che sbatto contro un muro nel tentativo di 
> creare un server (target) iSCSI da usare come storage per la 
> virtualizzazione.
> 
> Ho installato tgt e targetcli-fb, poi:
> $ sudo targetcli
> targetcli shell version 2.1.53
> Copyright 2011-2013 by Datera, Inc and others.
> For help on commands, type 'help'.
> 
> /> /backstores/block create name=oph-data dev=/dev/md0
> Created block storage object oph-data using /dev/md0.
> /> /iscsi create
> Created target iqn.2003-01.org.linux-iscsi.ophnas.x8664:sn.46e1951acaca.
> Created TPG 1.
> Default portal not created, TPGs within a target cannot share ip:port.
> /> /iscsi/iqn.2003-01.org.linux-iscsi.ophnas.x8664:sn.46e1951acaca/tpg1/ 
> acls create iqn.1993-08.org.debian:01:a**8
> Created Node ACL for iqn.1993-08.org.debian:01:a**8
> /> /iscsi/iqn.2003-01.org.linux-iscsi.ophnas.x8664:sn.46e1951acaca/tpg1/ 
> luns create /backstores/block/oph-data
> Created LUN 0.
> Created LUN 0->0 mapping in node ACL iqn.1993-08.org.debian:01:a**8
> /> /iscsi/iqn.2003-01.org.linux-iscsi.ophnas.x8664:sn.46e1951acaca/tpg1/ 
> portals create
> Using default IP port 3260
> Binding to INADDR_ANY (0.0.0.0)
> Could not create NetworkPortal in configFS
> /> ls
> o- / ......................................................................................................................... [...]
>    o- 
> backstores .............................................................................................................. [...]
>    | o- 
> block .................................................................................................. [Storage Objects: 1]
>    | | o- oph- 
> data ........................................................................ [/dev/md0 (58.2TiB) write-thru activated]
>    | |   o- 
> alua ................................................................................................... [ALUA Groups: 1]
>    | |     o- 
> default_tg_pt_gp ....................................................................... [ALUA state: Active/optimized]
>    | o- 
> fileio ................................................................................................. [Storage Objects: 0]
>    | o- 
> pscsi .................................................................................................. [Storage Objects: 0]
>    | o- 
> ramdisk ................................................................................................ [Storage Objects: 0]
>    o- 
> iscsi ............................................................................................................ [Targets: 1]
>    | o- iqn.2003-01.org.linux- 
> iscsi.ophnas.x8664:sn.46e1951acaca .......................................................... [TPGs: 1]
>    |   o- 
> tpg1 ............................................................................................... [no-gen-acls, no-auth]
>    |     o- 
> acls .......................................................................................................... [ACLs: 1]
>    |     | o- 
> iqn.1993-08.org.debian:01:a**8 ............................................................... [Mapped LUNs: 1]
>    |     |   o- 
> mapped_lun0 .............................................................................. [lun0 block/oph-data (rw)]
>    |     o- 
> luns .......................................................................................................... [LUNs: 1]
>    |     | o- 
> lun0 ................................................................... 
> [block/oph-data (/dev/md0) (default_tg_pt_gp)]
>    |     o- 
> portals .................................................................................................... [Portals: 0]
>    o- 
> loopback ......................................................................................................... [Targets: 0]
>    o- 
> vhost ............................................................................................................ [Targets: 0]
>    o- xen- 
> pvscsi ....................................................................................................... [Targets: 0]
> /> /iscsi/iqn.2003-01.org.linux-iscsi.ophnas.x8664:sn.46e1951acaca/tpg1/ 
> portals create 0.0.0.0
> Using default IP port 3260
> Binding to INADDR_ANY (0.0.0.0)
> Could not create NetworkPortal in configFS
> 
> Non ci sono portali definiti e non me ne fa creare... Any hint? Ho già 
> provato a cancellare il portale su 0.0.0.0 ma ovviamente mi dice che non 
> esiste...
> 
> Grazie
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.