Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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.

share|improve this question
    
I'm presuming that you have a NAS drive. –  Kevin M Aug 21 '10 at 12:32

1 Answer 1

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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