Mount Shares on power up

davep1553

Cadet
Joined
Jan 11, 2020
Messages
6
Hello all, first off I apologize if this is the wrong place to ask this but it seamed like the best fit.

I've got my first FreeNas server up and running and am primarily using it as an OS to run Plex on. Everything is working except at least for the time being all my media is on a separate (commercial) NAS, I have successfully setup NFS shares to the old NAS mounted inside the jail and everything works except after a power cycle I have to ssh in and re mount the shares. I want FreeNas to do this for me on power up. I played with putting the command in question into the Tasks/Init Shutdown scripts interface (thru the web portal) and that works nicely unless the old NAS is offline (or in one case FreeNas didn't get an IP when it should have), and FreeNas just sits there retrying the connection infinitely never giving me access to the local terminal or the web portal, I'd prefer it fails and continues to boot so I can fix settings if I need to. Longer term I wouldn't mind having some sort of Python script that kicks off every ~5 minutes and checks if things are mounted and if necessary mounts them.

Sorry for the long rambling explication, what I'm looking for right now is a way to on power up try to mount it ~2 times, then give up and continue with power up.

Here is the command I'm currently manually issuing to mount the remote NAS's folder (both NASs have been configured with static IP addresses in the DHCP server and locally)

mount -v 192.168.0.200:/volume1/video /mnt/pool0/iocage/jails/plex-plexpass/root/mnt/NAS01/video

Any help and suggestions would be appreciated, and thanks in advance.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
With NFS there is the bg option to mount, like "background". That should do the trick ...

HTH,
Patrick
 
Top