Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

Mount Shares on power up

Joined
Jan 11, 2020
Messages
2
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

FreeNAS Guru
Joined
Nov 25, 2013
Messages
569
With NFS there is the bg option to mount, like "background". That should do the trick ...

HTH,
Patrick
 
Top