Nextcloud can't start if it is mounted into a dataset with an active SMB share

couchbed

Dabbler
Joined
Dec 14, 2022
Messages
19
I have my main dataset "user" with my data in it. I have an SMB share set up, and I also have it mounted as "external storage" in Nextcloud so I can access it from anywhere.
The problem is that Nextcloud won't start if the SMB share is active. When I reboot the server, I have to stop nextcloud because it's stuck at "Deploying 1/2," Turn off the SMB shares, Start Nextcloud, wait for it to fully load, and then start the SMB shares.
This works, but it's very manual and a PITA whenever the power goes out.

Anybody know a fix for this, or a workaround? I suppose it should be possible to write some kind of script to start the SMB shares like 10 minutes after boot so Nextcloud has time to boot up. I'd rather have a proper fix though.
 

couchbed

Dabbler
Joined
Dec 14, 2022
Messages
19
Yes. In Apps settings there is the option to turn off Host Path Validation.
Okay, cool! That worked like a charm. For folks in the future, the exact setting is at Apps > Settings (dropdown at the top of the page near search bar) > Advanced Settings > Enable Host Path Safety Checks

As per the warning when changing this setting, it's there for a reason. What should I be wary of to not cause an issue now that I've disabled the safety check?

Is there a way to do this on a per-app basis? I don't see a setting in the individual apps' settings.
 

HoneyBadger

actually does care
Administrator
Moderator
iXsystems
Joined
Feb 6, 2014
Messages
5,112
There's a plan to make this setting less obtrusive, and even move away from it in the future:


As per the warning when changing this setting, it's there for a reason. What should I be wary of to not cause an issue now that I've disabled the safety check?

Is there a way to do this on a per-app basis? I don't see a setting in the individual apps' settings.

Because the host path setting happens at the "lower level" of ZFS, acting "underneath" the SMB service, it's possible that simultaneous modification of a file through both methods (eg: Nextcloud syncing from a remote copy while the local one is open via SMB) could have unintended effects, because ZFS won't be aware of the SMB-level locking happening "higher up the chain." Having snapshots configured on the dataset will help act as a safety net in case of situations like this arising.

It's not so much a "per app" but a "per dataset" risk - if you're only sharing /mnt/YourPool/NextcloudShare with both services, your files at /mnt/YourPool/MyPrivateData aren't at risk.
 
Top