[SOLVED] How to delay folder export on startup.

This forum is for discussion about general software issues.

[SOLVED] How to delay folder export on startup.

Postby Guidobelix » Mon Dec 21, 2015 9:23 am

I am struggling since a while with a problem and I couldn't find any help in mainline wiki, so I hope somebody in the forum can help me.
I am using as a family NAS a PP4 with 4x2TB RAID5 (using an external Sata box) which is holding all the data (the root fs is on an SD card), and I am exporting in NFS some sub-directories below the mount-point of the RAID (e.g. the RAID5 is mounted on /mnt and I want to export /mnt/Video and /mnt/Pictures).
What happens is that, when I reboot the PP4, it takes too long to mount the RAID 5 and when nfsd starts it doesn't find the subdirectories and returns an error message. As a consequence, every time I reboot the machine, I need to remember to log in afterwards and restarts the nfsd daemon.
I am pretty sure there is probably a way to explain systemd to delay the start up of nfsd daemon until the RAID5 is mounted, but I couldn't find it myself.
Any help is much appreciated.

Regards
Guido
Last edited by Guidobelix on Mon Dec 28, 2015 8:49 pm, edited 1 time in total.
Guidobelix
 
Posts: 45
Joined: Fri Jun 21, 2013 6:52 am

Re: How to delay folder export on startup.

Postby Thymo » Mon Dec 21, 2015 9:36 am

Thymo
 
Posts: 6
Joined: Tue Dec 15, 2015 9:09 am

Re: How to delay folder export on startup.

Postby Guidobelix » Mon Dec 21, 2015 12:55 pm

That's exactly where I got stuck.
I understand I can ask systemd to start nfsd after some other process (and I am already using that feature on other unit files), but I don't understand which one is actually that other process.
Guidobelix
 
Posts: 45
Joined: Fri Jun 21, 2013 6:52 am

Re: How to delay folder export on startup.

Postby Thymo » Sat Dec 26, 2015 12:15 am

Take a look at:
$this->bbcode_second_pass_code('', 'systemctl | grep mount')

Systemd also provides .mount files which you can set as required instead of a unit.
Thymo
 
Posts: 6
Joined: Tue Dec 15, 2015 9:09 am

Re: How to delay folder export on startup.

Postby Guidobelix » Mon Dec 28, 2015 8:49 pm

That's exactly the hint I needed! :)
Thank you so much!
Guidobelix
 
Posts: 45
Joined: Fri Jun 21, 2013 6:52 am


Return to General

Who is online

Users browsing this forum: No registered users and 5 guests