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. Im my case I have a 250GB disk which used to be GPT and split in some 10-12 partitions, some of which - 3 or 4 - were iSCSI exported; the rest were used by NVMM virtual machines. Lately I destroyed these and created a zpool in their place, now I am using zvols for the same purpose, e.g. my targets file is: ... extent0 /dev/zvol/rdsk/pail/iscsia 0 30GB extent1 /dev/zvol/rdsk/pail/nbsd 0 4GB # target flags storage netmask target0 rw extent0 0.0.0.0/0 target1 rw extent1 0.0.0.0/0 The rest of the volumes are for VMs: ... zfs list -t volume [12:57:24] NAME USED AVAIL REFER MOUNTPOINT pail/f12 4.13G 13.6G 1.24G - pail/iscsia 30.9G 16.3G 25.4G - pail/lxmint 24.8G 20.5G 15.0G - pail/mxlinux 24.8G 16.3G 19.2G - pail/nbsd 4.13G 14.2G 714M - pail/omnios 24.8G 34.7G 785M - pail/openbsd 4.13G 14.1G 832M - pail/truecommand 20.6G 26.5G 4.90G - pail/w10 44.8G 37.7G 11.8G - pail/w19 30.9G 28.0G 13.7G - ... > target1.... > > How can I configure extent1 to begin just after extent0 ? > > Regards, > > JKB -- ----