Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Map network drives on restart

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
jbeeker
Posts: 1
Joined: 2012-05-30 01:18

Map network drives on restart

#1 Post by jbeeker »

Hello, obviously I am new at this, and I have set up a machine running Debian as a media server in my house (frees up the PCs for the kids to mess up). The media collection is located on a NAS. I mount the network drives via fstab, and a reboot will remount the drives, so cool.

But here is the problem; the rare power outage brings down the Debian box and the NAS, but the Debian box boots faster, doesn’t find the NAS, and therefore doesn’t map the drives. A reboot will remount the drives, so everything works still.

I guess I can write a script to check for the NAS, and if not there wait and then check again, but there must me a simpler solution to this (besides buying a battery backup!).

Thanks, Jon

Aris Veresie
Posts: 562
Joined: 2011-06-02 15:55
Location: Limassol, Cyprus

Re: Map network drives on restart

#2 Post by Aris Veresie »

Instead of a reboot you could mount -a. A simple solution is to apply that command after a minute or two via a script (I think cron or anacron will do, but I do not know how to use those).
Being anonymous is the same as being an idiot.

admoore
Posts: 93
Joined: 2010-05-17 14:29

Re: Map network drives on restart

#3 Post by admoore »

I don't have much personal experience with it, but it sounds like autofs might be useful here. See http://wiki.debian.org/AutoFs

Post Reply