Jails storage disappearing

Status
Not open for further replies.

jefferai

Cadet
Joined
Nov 15, 2016
Messages
4
Hello. New to FreeNAS and FreeBSD in general although I have a decent amount of Linux experience. I'm running FreeNAS-9.10.1-U4 (ec9a7d3).

I created some plugins, works fine. I added some storage to those jails via the FreeNAS UI, and that works *mostly* fine. What happens is that when I start the jail the storage is mounted into the jail as expected, but for reasons I haven't figured out, at some point that mount sometimes becomes unmounted.

This isn't consistent across jails, e.g. I have the same directory mounted into two jails, and in one it's still mounted and in the other it's disappeared.

I'm not sure where to begin debugging this...hence the post here!

Thanks in advance.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
You cannot share the mount points like you have been doing.

The work around example is:
Directory Path: /mnt/pool/media/media/music/(music stored here)

Jail1 mount point: /mnt/pool/media/
Jail2 mount point: /mnt/pool/media/media/
Jail3 mount point: /mnt/pool/media/media/music/

As long as the mount points are not used more than once in FreeNAS, all is good.
 

jefferai

Cadet
Joined
Nov 15, 2016
Messages
4
I'll give that a try, thanks. Just curious, is that a FreeBSD/nullfs limitation or a FreeNAS limitation?
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
You cannot share the mount points like you have been doing.

The work around example is:
Directory Path: /mnt/pool/media/media/music/(music stored here)

Jail1 mount point: /mnt/pool/media/
Jail2 mount point: /mnt/pool/media/media/
Jail3 mount point: /mnt/pool/media/media/music/

As long as the mount points are not used more than once in FreeNAS, all is good.
What are you taking about? You can mount the same dataset into a jail as many times as you want. I have my media dataset mounted into the jails right now.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
What are you taking about? You can mount the same dataset into a jail as many times as you want. I have my media dataset mounted into the jails right now.

Really? I'd be curious the specific setup you have because that has been an issue for years that you could not share the same mount point. Maybe it's fixed but I suspect what I've advised will solve the problem at hand.
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
I have had the same mount points connected to different jails for a LOOOONG time. It's perfectly fine if you understand what your jail is doing to the files located there. You don't want 2 applications trying to modify the same files at the same time.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Well crap, I'm learning something new again. This needs to stop! :D I would have the same issue as the OP back years ago and so did others.

@jefferai Could you be very clear on the path names you are mounting for the jails? Maybe I'm thinking of something else.

Cheers!
 

jefferai

Cadet
Joined
Nov 15, 2016
Messages
4
Hi there,

At this point I changed the path names to be unique and things seem to be working although it's still early. I did have two jails modifying files on the mount concurrently although never the same file.

The other thing I can think of is that there seem to be two ways to stop/start services -- one is stopping/starting the jail, and the other is stopping/starting the plugin. I wonder if stopping the plugin unmounts the binds but starting it again doesn't. It's possible I did that at some point instead of stopping and starting the jail.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
stopping/starting the plugin does not mount it unmount anything
 
Status
Not open for further replies.
Top