Two jails working on the same dataset?

badbyte

Cadet
Joined
Apr 21, 2020
Messages
5
On my freenas, I have nextcloud running and in my archives , in there I have a large collection of songs. And I want to install mediasonic, and want to enable it to access my music collection.
Is it possible that I point into the dataset of nextcloud?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Is it possible that I point into the dataset of nextcloud?
Certainly it's possible. And if one of those will be accessing that dataset read-only, it's perfectly safe. If both need read-write access, though, there's the chance of some contention--the nullfs mount point doesn't have any file locking mechanism.
 

Yorick

Wizard
Joined
Nov 4, 2018
Messages
1,912
Yes. What you do is decouple the data from the jail, which is An Excellent Idea, Even Best Practice anyway.

If your NextCloud stuff is currently in the jail, do this:
- Create a fresh dataset.
- Shut down NextCloud
- rsync -ha your stuff over into the fresh dataset
- Verify everything is there, then from CLI, empty the original NextCloud dir
- Mount the new dataset, which now contains your data, into the directory where NextCloud expects it
- Restart NextCloud, make sure everything works.

And now you can also mount this dataset into mediasonic, and have it access music.

I am doing this for music with Plex and Logitech Media Server, works great.
 

Yorick

Wizard
Joined
Nov 4, 2018
Messages
1,912
If both need read-write access

Exceedingly unlikely for a music folder. Metadata for the music would be kept outside of the media folder itself, if MediaSonic and NextCloud behave like every other app out there.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Top