jail storage mounts under invalid target /mnt...

Status
Not open for further replies.

ikke

Contributor
Joined
Apr 22, 2012
Messages
124
Hi,

I run into a weird problem. My jail has couple of storage points mounted into it's sub-directories. One of them repeatedly mounts into wrong destination.

GUI has this:
source: /mnt/ikraid/ikke/src/nginx-putka/etc
target: /mnt/ikraid/putka/ngingx-10/usr/local/etc

But while I was wondering why the files are not in place in jail /usr/local/etc, I noticed FreeNAS actually mounted it into:

/mnt/ikraid/ikke/src/nginx-putka/etc on /mnt/ikraid/putka/ngingx-10/mnt/ikraid/putka/ngingx-10/usr/local/etc (nullfs, local, read-only)

(yes, I know I typoed ngingx there :))

See how the jail path is doubled in the mount point (/mnt/ikraid/putka/ngingx-10/).

Just to make sure, I updated my FreeNAS to current stable: FreeNAS-9.3-STABLE-201511280648. I tried restarting the jail several times, no difference. The jail has two other mounts set correctly for the nginx /usr/local/www/<mountpoint>. Only this one is giving problems. -> Bug by my opinion. What do you think?

BR,
ikke
 
D

dlavigne

Guest
Were you able to figure this out or did you already make a bug report?
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Your are probably doing something funny. Can you send screen shots of your configuration.
 

ikke

Contributor
Joined
Apr 22, 2012
Messages
124
@dlavigne I did not create bug report yet, as I understood bugs want to be discussed here first. I think it's a bug anyhow, as the jail strorage panel should end up asking mounts relative to jail root, instead of system root. Further mount setup then adds the jail root there twice.

Here's a screenshot from the mount for you @SweetAndLow , you see how the mount panel asks for system paths, not relative paths from inside the jail:
freenas-jail-mount.png
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
When selecting a destination those directories listed in that dropdown are in the jail and you can't select a path outside of the jail. If you delete what you have in the destination text field and use the dropdown to select your folder path does it create the double path? You don't need to specify the full system path to your files you just need to specify the path relative to your jail for your destination.

if you make yours look like this it will be fixed.

source: /mnt/ikraid/ikke/src/nginx-putka/etc
destination: /usr/local/etc
 

ikke

Contributor
Joined
Apr 22, 2012
Messages
124
I thought the same and tried it. It works. The gui is misleading, it only does half of it's job.

The gui should be fixed not to need manual removal of jail path from the mount target. It works now with manual removal like @SweetAndLow described above. That part should be automated in style of destination= strip away the s/$jail_path//
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
You don't have to manually remove anything. If you just use the dropdown it works as expected.
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
Well, this is what I see when I add storage to a jail. Everything shows up as relative to the jail instance itself. I don't have to remove anything.
 

Attachments

  • Screenshot from 2015-12-13 17-53-57.png
    Screenshot from 2015-12-13 17-53-57.png
    12.3 KB · Views: 302

ikke

Contributor
Joined
Apr 22, 2012
Messages
124
That's how it should be. But like you see from my original posting, it did end up having the jail path twice in target path. See the output of mount command in #1 post.
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
That's how it should be. But like you see from my original posting, it did end up having the jail path twice in target path. See the output of mount command in #1 post.
Your mount command only proves that a filepath existed, after you set it to that to be created
 

ikke

Contributor
Joined
Apr 22, 2012
Messages
124
@pirateghost , please look again:
/mnt/ikraid/ikke/src/nginx-putka/etc on /mnt/ikraid/putka/ngingx-10/mnt/ikraid/putka/ngingx-10/usr/local/etc (nullfs, local, read-only)

See how jail path (/mnt/ikraid/putka/ngingx-10/) is there twice? It should be there only once, of course. Like in you case the target path (/mnt/advisor/JAILS/ts1/foobar) would've been: /mnt/advisor/JAILS/ts1/mnt/advisor/JAILS/ts1/foobar.
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
@pirateghost , please look again:
/mnt/ikraid/ikke/src/nginx-putka/etc on /mnt/ikraid/putka/ngingx-10/mnt/ikraid/putka/ngingx-10/usr/local/etc (nullfs, local, read-only)

See how jail path (/mnt/ikraid/putka/ngingx-10/) is there twice? It should be there only once, of course. Like in you case the target path (/mnt/advisor/JAILS/ts1/foobar) would've been: /mnt/advisor/JAILS/ts1/mnt/advisor/JAILS/ts1/foobar.
When you configured the storage, if you MANUALLY put in that path, the addition of the storage will CREATE that path inside your jail. that command doesn't prove anything. We would need to see a fresh jail, and that same behavior where you DIDNT put in that path.
 

ikke

Contributor
Joined
Apr 22, 2012
Messages
124
correction, it's not there twice, but three times. I ment twice in target part.
 

ikke

Contributor
Joined
Apr 22, 2012
Messages
124
I understand this. I removed the storage many times, and recreated it, always the same result having jail path doubled. I tried this several times the other night.

Weird, that now that I try it it doesn't do it. Now it does remove the jail path like it should. This perticular mount used to be ok when I created it for the first time, but then the mount had moved to location having the path there twice. I first thought it was the bug with snapshots and jail mounts dropping, but then I realized it was in the wrong path.

Never the less, I can not reproduce it now, I tried. But I swear that night I tried it several times and couldn't get past the problem. Well, I'll come back if it repeats. For now, thanks for your time and effort to take a look at it, let's forget this case.
 
Status
Not open for further replies.
Top