SOLVED Folders in fstab mount visible in jail but not outside

Yaguznal

Explorer
Joined
Dec 23, 2013
Messages
63
I am running FreeNAS-11.2-U6

- Installed the deluge plug-in
- Already had the media group with gid 8675309 in freenas
- Already had the deluge user with gid 1010in freenas
- I made a downloads dataset with complete and incomplete datasets inside and gave 7 permission to the media group via UI
- I added my downloads dataset to the fstab of my deluge cage
- Added a "deluge" user with uid 1010 in deluge cage
- Added "media" group with gid 8675309 to the deluge cage
- I put deluge in the media group in deluge cage
- Made sure deluge was running as user "deluge"
- Made sure to chmod -R deluge:media the /media folder in deluge cage and chown a 7 for the group and user

Deluge is running fine. It's downloading as it should without any errors.

Yet, I can not see the folders and files deluge creates from the freenas side but I can see them inside the deluge cage, inside the /media/ mount. I have been playing with the permissions on the downloaded folders and files to no avail. Nothing shows on the freenas side.

What am I missing here?

I'd greatly appreciate some help here because I have never had this happen before.


fstab deluge.PNG
media group wolfnas.PNG
media group deluge.PNG
deluge top.PNG
permissions media folder deluge.PNG
permissions download folder deluge.PNG
root deluge filled download folder.PNG
permissions download folder wolfnas.PNG

root wolfnas empty download folder.PNG
 
Last edited:
D

dlavigne

Guest
Were you able to resolve this? If not, which version of FreeNAS?
 

Yaguznal

Explorer
Joined
Dec 23, 2013
Messages
63
I havn't because I have no idea what else to try.
I'm running FreeNAS-11.2-U6 atm. I didn't read fixes close to this matter in the changelog of U7 so I don't feel the need to update.

Do you see anything wrong with what I did?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
It seems from what you describe that /media inside the jail is an existing and non-empty directory (which would mean the nullfs mount fails when it attemps to take over that directory, leaving you with all your files in the jail instead of the mounted directory outside it. Usually this stops the jail from being started, so maybe that's something new.

I would suggest stopping the jail, copy all the files out from the /media path to the /mnt/ssd/downloads path... then clean out the /media path and start the jail... see how that goes. (you may want to look at permissions before and after to make sure things will still work).
 

Yaguznal

Explorer
Joined
Dec 23, 2013
Messages
63
I kinda figured that might be the problem. Just made a dir in the jail and couldn't see that in freenas. Made a dir in freenas and could see that in the jail. Changed ownerships around a bit but that didn't help at all so I figured it's not privileges.

To be specific, because I am not an expert in mountingpoints at all, before you try to fstab a mountpoint, does the folder in the jail need to exist first or not? The 'media' folder in which I mounted already existed before I mounted something in it. Should I use a subfolder in media to mount stuff? What do you mean by cleaning? Remove everything in it or, to be thorough, just remove the media folder altogether and recreate?
What should I have done in the first place to avoid this?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
before you try to fstab a mountpoint, does the folder in the jail need to exist first or not? The 'media' folder in which I mounted already existed before I mounted something in it. Should I use a subfolder in media to mount stuff? What do you mean by cleaning? Remove everything in it or, to be thorough, just remove the media folder altogether and recreate?
It should exist, but be empty. Recreate it if that's simpler.

What should I have done in the first place to avoid this?
Check the jail structure and see if the target exists or not and if it's empty. (read the documentation)


See this section of the documentation:

quote:
Browse to the Source and Destination, where:

  • Source: is the directory or dataset on the FreeNAS® system which will be accessed by the jail. This directory must reside outside of the volume or dataset being used by the jail. This is why it is recommended to create a separate dataset to store jails, so the dataset holding the jails is always separate from any datasets used for storage on the FreeNAS® system.
  • Destination: select an existing, empty directory within the jail to link to the Source storage area. If that directory does not exist yet, enter the desired directory name and check the Create directory box.
 

Yaguznal

Explorer
Joined
Dec 23, 2013
Messages
63
I first unmounted, then deleted everything and remounted. Magicaly everything reapeared :O. I then first deleted everything, unmounted and recreated the mount. It is working as it should now. Solved.
Thanks for the pointers @sretalla
 
Top