Nethserver 8 - Temporarily disabling individual or all shares

Dear community,

I need to perform certain maintenance work on a Nethserver 8 share and disable it beforehand – but without shutting down the other services and, above all, without shutting down the samba-ad as a whole.

Is there a planned solution for this?

For my maintenance, I need to temporarily unmount a specific file system – which I mounted to /home/samba1/.local/share/containers/storage/volumes/shares/_data/MYSHARE.

According to “lsof,” the mount isn’t blocked, but the samba1 container at least logically continues to use the path.

I know how to perform my maintenance, but I’m not entirely sure how to temporarily disable individual shares – apparently, only “removal” is provided. “Removing” is not only impractical but perhaps also risky, because the container might then remove the share path, which I’ll need to remount later.

Any advice is welcome.

As far as I can tell, it would be more practical for my project to have a completely separate Samba-AD container here and the Samba shares in another one. I don’t know if that’s possible, but it might not be the worst goal.

Regards, Yummiweb

I think it’s the simplest way to remove it from the configuration and readd it again after the maintenance.
This could be done using net conf in the samba-dc container.
Another approach could be to set permissions so clients can’t access the share anymore but I think it’s cleaner when the share isn’t available at all.

Enter the samba-dc container:

runagent -m samba1 podman exec -ti samba-dc bash

Remove share testfolder from config:

net conf delshare testfolder

Readd testfolder to config: (The description could be empty like “” but is required to list the shares in the cluster-admin without error)

net conf addshare testfolder /srv/shares/testfolder writeable=y guest_ok=N "Description"

Please test it on a testshare first…

2 Likes

You can also consider the share “available” parameter. We leverage it in the acl reset procedure:

2 Likes