How to use an installed plugin?! (directories and naming)

Status
Not open for further replies.

yourmate

Contributor
Joined
Apr 4, 2016
Messages
105
I can see now that this won't be easy but rather a steep learning curve... Being a 2nd class citizen and coming from a Windows background it is definitely rough ;)

First off the plugin directory was empty on my fresh install and although many threads were dealing with this seemingly common problem there was no solution. But I solved it to get around the problem and download it first and upload it to the server. [edit: this morning they are just appeared]

Q1: After installing 6-7 plugin (this is my test install to figure out things) I've noticed that the directory was named /mnt/jailname/jails/customplugin_1
Can I rename this for /mnt/jailname/jails/pluginname or this will throw up a lot of issues? Or should I just get on with life?

Q2: When setting up the plugin (e.g. transmission's watch directory) you have to set up it's working directories within the plugin jail. You have directories like bin, boot, dev, etc, etc. - which of these can I use aka which is the equivalent of Windows' user directory where I don't bother the system files? [edit: I have created a dataset called downloads in Volumes for this jail and now it appears as a directory when I edit Transmisson's settings. Is that it?!? But then what about "subdirs"? Should I create a dataset called "incomplete" in "downloads"? Does this mean dataset = win dir?]

Disclaimer: I am sorry if these questions hurt your feelings I totally understand your pain :D
 
Last edited:

FritVetBE

Explorer
Joined
Dec 28, 2013
Messages
87
Hey yourmate

A1: I have the same issue on this moment, wanting to 'rename' a jail seems not that safe to do so ( https://forums.freenas.org/index.php?threads/manually-renaming-plugin-jails.21024/ ). It definately is possible to achieve, but it is discouraged to do on a production machine because of the complexity. I tried to export the jail via warden, and import the exported jail provided with another name and IP address, but it gave me some errors so I gave up on this. If you are on a test environment, you might want to try this: https://bugs.freenas.org/issues/2519

A2: What you would want to do, is to create a dataset (for instance: "Downloads") on your ZFS pool. Then, you assign permissions accordingly, and mount the Downloads dataset inside your Transmission jail. Your source would be something like /mnt/zpoolname/Downloads and your destination could be something like /media/downloads (the destination path is the path where the jail can find the mount).
 

yourmate

Contributor
Joined
Apr 4, 2016
Messages
105
A1: I have the same issue on this moment, wanting to 'rename' a jail seems not that safe to do so ( https://forums.freenas.org/index.php?threads/manually-renaming-plugin-jails.21024/ ). It definately is possible to achieve, but it is discouraged to do on a production machine because of the complexity. I tried to export the jail via warden, and import the exported jail provided with another name and IP address, but it gave me some errors so I gave up on this. If you are on a test environment, you might want to try this: https://bugs.freenas.org/issues/2519

Thanks for the heads up. So for me it's sadly a NO. I could do it by the write up and I am just installing my server but I don't want issues when upgrading to 10 or further down the line. I think I'll just create a subdir in shell naming it __pluginname and that will make it a bit easier (or not)

A2: What you would want to do, is to create a dataset (for instance: "Downloads") on your ZFS pool. Then, you assign permissions accordingly, and mount the Downloads dataset inside your Transmission jail. Your source would be something like /mnt/zpoolname/Downloads and your destination could be something like /media/downloads (the destination path is the path where the jail can find the mount).

I almost understand what you wrote ;) I think I'll have to adjust my mindset as it's a whole different thinking as windows. I've thought my DOS experience will help...
 

depasseg

FreeNAS Replicant
Joined
Sep 16, 2014
Messages
2,874
Q1: After installing 6-7 plugin (this is my test install to figure out things) I've noticed that the directory was named /mnt/jailname/jails/customplugin_1
Can I rename this for /mnt/jailname/jails/pluginname or this will throw up a lot of issues? Or should I just get on with life?
A1-Part1: Don't change the name. It's not worth the hassle.
A1-Part2: I'm not sure why your plugins are being called "customplugin". Mine have the name of the plugin (which I think is what you want). What version are you running, and how exactly did you install them? You can use the windows snipping tool (click the windows button, type "snipping" highlight a screen shot to copy and then paste it into a post).
Q2: When setting up the plugin (e.g. transmission's watch directory) you have to set up it's working directories within the plugin jail. You have directories like bin, boot, dev, etc, etc. - which of these can I use aka which is the equivalent of Windows' user directory where I don't bother the system files? [edit: I have created a dataset called downloads in Volumes for this jail and now it appears as a directory when I edit Transmisson's settings. Is that it?!? But then what about "subdirs"? Should I create a dataset called "incomplete" in "downloads"? Does this mean dataset = win dir?]
Datasets are a special type of folder (they are the container where you can do snapshots and replication, for instance). I'd recommend reading the freenas primer. It's a sticky around here somewhere. FritVetBE has it right. You "add" storage from your main system to your jail. This gives the jail access to a dataset (or multiples if you want) and you can create sub-folders if you'd like. Every change made to that dataset will appear both inside and outside the jail since it's the same data mounted in 2 different places.
 

yourmate

Contributor
Joined
Apr 4, 2016
Messages
105
Thanks for taking the time guys!

A1-Part1: Don't change the name. It's not worth the hassle.
For this morning the plugins mysteriously appeared [freenas.org server problem?] so based on this and your statement 'Mine have the name of the plugin' I just reinstalled the whole NAS. Still long time to go till a 1,000 hours ;) and voila, the plugin jail named as /mnt/poolname/jails/pluginname_1. TBH this is a bit worrying given that I have no experience in this so how the heck I will know next time whether it's a bug or a feature?!

click the windows button, type "snipping" highlight a screen shot to copy and then paste it into a post)
This made my day, I am a only freeNAS/linux noob:D

Datasets are a special type of folder...
So I setup a dataset called Download in my pool. That's fine. Then just go to Transmission settings and set up source & destination directories?

source&destination dir.PNG

If I want a "subdir" called INCOMPLETE inside the Download dataset then what will it be? Another dataset within a dataset or should I just go to shell and issue an 'mkdir' command? Because in transmission settings you need to do these and when I filled in (see pic) the there was no corresponding directory in the pool.

watchdir.PNG

Or this doesn't need a source & dest dir as the "main" transmission dir?

I know it's spoon-feeding :oops:

EDIT: I deleted the bits I got grasp on since yesterday ;)
 
Last edited:

FritVetBE

Explorer
Joined
Dec 28, 2013
Messages
87
Well, the way I used to do this was to go into the shell of the transmission jail, and run mkdir /media/downloads/incomplete

This will (as you would expect :smile: ) create a subdirectory inside the /media/downloads folder in your transmission jail. But since you mounted the dataset directly into your transmission jail, the 'incomplete' folder is actually created on your swimmingpool at the following location: /mnt/swimmingpool/downloads/incomplete. I don't think there would be any benefit of using a dataset inside a dataset in this case.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Well, the way I used to do this was to go into the shell of the transmission jail, and run mkdir /media/downloads/incomplete

This will (as you would expect :) ) create a subdirectory inside the /media/downloads folder in your transmission jail. But since you mounted the dataset directly into your transmission jail, the 'incomplete' folder is actually created on your swimmingpool at the following location: /mnt/swimmingpool/downloads/incomplete. I don't think there would be any benefit of using a dataset inside a dataset in this case.
There actually is a benefit and consequence of having a sub-dataset for transmission's incomplete directory.
PLUS
+ torrents are written in a pretty fragmented way to disk, by writting them initially to a first first dataset, then moving (which rewrites them in this case) to a different dataset files will no longer be fragmented, unless your zpool is already very full and theres no large free sections in a row. Note - if your zpool are all SSDs fragmentation probably isn't as much of an issue.
MINUS
- each dataset must be another mount into the jail
- the move is a physical re-write instead of a pointer change. Though this is the reason for the 'PLUS' above.
 
Status
Not open for further replies.
Top