On Fri, 21 Feb 2020 at 13:20, BERTRAND Joël <joel.bertr...@systella.fr> wrote: > > Chavdar Ivanov a écrit : > > On Fri, 21 Feb 2020 at 12:41, BERTRAND Joël <joel.bertr...@systella.fr> > > wrote: > >> > >> With > >> > >> # extent file or device start length > >> extent0 /dev/rwd0 0 32GB > >> > >> # target flags storage netmask > >> target0 rw extent0 192.168.10.103/32 > >> > >> iscsid seems to run as expected. But if I want to export a second > >> target, how can I modify targets file ? I suppose I have to add > >> > >> extent1 /dev/rwd0 32GB+1sector 32GB > > > > You export raw partition device; if you want to have many targets from > > one physical disk, you split the disk in any way you can - fdisk, > > gpt/dkctl or ZFS zvols and export the raw varieties of those. > > I have tried to export /dev/rwd0e to only export a slice (created by > disklabel). It doesn't work (and initiator is unable to use target). I > haven't tested with a partition created by fdisk.
If you have a good reason not to use zfs and zvols, then I'd suggest gpt slices, wich definitely work. Zvols are best, IMHO, as you can snapshot them and send/receive them elsewhere for backup. > > JKB -- ----