6

I have a NAT drive, that is accessible via SMB. I have an entry in fstab to mount it at boot. But if the drive is not switched on it is not mounted during boot and I have to manually mount later. (The NAT boots a lot slower than my PC and usually is not up at the point PC tries to mount it).

Is there a way to automatically mount the drive when it becomes available in the network? Preferably if it can be done via command line tools, not involving GUI programs.

Using PCLinuxOS with KDE.

  • I'm presuming that you have a NAS drive. – Kevin M Aug 21 '10 at 12:32
7

What you're looking for is AutoFS. Install the RPM, then make sure that it's running at start(RH/etc: chkconfig autofs on). Edit the file /etc/auto.master and add the following line: /media/ /etc/auto.media. If I were you, I would change "media" in both places to be the name of your root-level directory. Then edit the file /etc/auto.media and add finaldirname mount-options \\192.168.1.3\sharename

A quick google gives this page.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.