NFS and cron inside a jail

Fireball81

Explorer
Joined
Apr 24, 2016
Messages
51
Hello guys,

i want to use a jail to mount a bunch of nfs shares, coming from my synology nas so that i can backup my datasets via borg backup to my BackupNAS.
I set up the jail and everything seemed to work, until i wanted to mount the NFS shares of my synology nas inside the jail. (On FreeNAS itself they work fine)
Another issue i ran into is, that i apparently can`t run any cronjobs from inside the jail as well. Regardless of what i do, they seem to be ignored.
When i looked around here in the forums i couldn`t find any up2date information about this, so if you don`t mind i would like to ask this one more time.

1.) Is it somehow possible to mount NFS shares inside a FreeNAS jail (FreeNAAS 11.2-U5)
2.) Is it furthermore possible to run cronjobs from inside the jail? (FreeNAAS 11.2-U5)

Thank you in advance for clarifiying.
 

Fredda

Guru
Joined
Jul 9, 2019
Messages
608
You can not mount nfs inside a jail, you can check with the command lsvfs, only filesystems with
the flag jail can be mounted. But you can mount from FreeNAS a NFS share into the jail, but be aware that this is
not an intended operation mode.

Cronjobs run here perfectly in a jail (11.2-U5). The commands need to be given with absolute path, maybe you did an error there?
 
Last edited:

Fireball81

Explorer
Joined
Apr 24, 2016
Messages
51
Thank you for your reply Fredda.
Mounting the nfs shares of my synology NAS from Freenas into the jail is the way i do it currently.
I just let a small script run post init to mount the shares @ /mnt of the jail.

Unfortunately the small synology nas is way to slow for a pull backup configuration with borg.
I made various tests with a pull backup from the synology nas and a push configuration from inside the jail of my FreeNAS server and the performance difference was absolutely significant.

What would be the best practice to achieve what i have in mind in your opinion. Is there a way to mount the synology shares in my jail by using a different protocol maybe? (iscsi for example?)

Thank you
 

Fredda

Guru
Joined
Jul 9, 2019
Messages
608
Hmm, I'm not really familiar with borg-backup. So I just did a very quick read and maybe I don't 100% understand your setup.

If you've mounted your syno-share into the jail, you can run your backup in the jail, in that case only the NFS speed of
your remote NAS is the limiting factor.
 

Fireball81

Explorer
Joined
Apr 24, 2016
Messages
51
Well that is correct but as you said earlier, that approach would force me to mount the nfs shares of the synology nas from outside the jail, which you considered not an "intended operation mode" and doesn`t seem ideal to me either. So i was looking for a better approach to make it work (hence i was thinking about connecting to my shares via iscsi but that doesn`t seem to work either inside a jail as far as i can tell)
 

Fredda

Guru
Joined
Jul 9, 2019
Messages
608
Ah, OK, I see. Mounting stuff from a jail is not really supported for most types (see lsvfs).
rsync might be a good option. You can directly setup rsync tasks from the GUI.
 
Top