open-iscsi / targetd

Remote configuration of a LIO-based storage appliance
GNU General Public License v3.0
72 stars 28 forks source link

Is targetd possible to configure multiple target? #77

Closed ogre0403 closed 3 years ago

ogre0403 commented 3 years ago

Hi,

Thanks for this great project.

I see target_name must be configured in targetd.yaml, and can't configure multiple target. I've try to create multiple docker containers for separated targetd, which listen on different port. But I got This _Backstore already exists in configFS when I call export_create method.

Is there any workaround configure different target through targetd ??

Thanks.

tasleson commented 3 years ago

I'm not seeing a way to make this work at the moment. ~Will take a look to see if this is even possible with LIO.~

I'm thinking that the best way to solve this is to provide a command line option to allow each daemon instance it's own configuration directory/file

tasleson commented 3 years ago

I'm not sure if it would work to have multiple targetd services running at the same time using the same configfs. Having multiple processes trying to make changes could be quite racy given that a single configuration is a multi-step process.

@agrover Your thoughts on this?

agrover commented 3 years ago

targetd wraps rtslib-fb which wraps the LIO kernel target, which is configured via configfs. Has LIO's configfs been "namespaced"? i.e. made so that different containers/users can interact with it independently? I've been away from LIO development for a long time so I don't know. If the answer is yes then great, this could be achieved by adding that support in rtslib-fb and then targetd.

I would try asking on the kernel's target-devel mailing list for the current status.

tasleson commented 3 years ago

would try asking on the kernel's target-devel mailing list for the current status.

Question posed: https://lore.kernel.org/target-devel/94b1290f-4713-460a-43b8-ff00402c64dd@redhat.com/T/#u

tasleson commented 3 years ago

The answer is no, not at this time. When it does have this ability, we can then integrate its functionality across the stack.

ref. https://lore.kernel.org/target-devel/1044e9fe-f5ec-d7d8-b6f6-2f0ee9cc0fd7@suse.de/