auto-mount cifs partition via samba
Brian McKee
brian.mckee at gmail.com
Mon Mar 23 18:33:21 UTC 2009
On Mon, Mar 23, 2009 at 11:02 AM, John Hubbard <ender8282 at yahoo.com> wrote:
> Derek Broughton wrote:
>> Noah wrote:
>>> I have a cifs partition that is exported via samba from another server.
>>> From time to time I need to reboot that server.
>>>
>>> I have to manually remount the cifs partition on my ubuntu server. is
>>> there something that can automount the cifs partition when the server
>>> comes back after reboot?
>>>
>>
>> Cron? I suppose a Windows machine must broadcast _something_ when it comes
>> up,
{insert humour here - the possibilites are endless :-}
>> and it could be caught, but even Windows machines don't automount
>> shares when a server comes online. (However, I just have to click on
>> them).
>>
> If the cifs mount is listed in /etc/fstab and set to mount on boot, then
> whenever the client reboots it will try to mount. It might delay the
> boot for a while if the server is not available
The way I read this - his Ubuntu box is the client in this case, and
the server is rebooted, not the other way around.
> The other option would
> be to use autofs (apt-get autofs). Auto-fs waits until you try to read
> the remote mount to mount it. If you have a fast network it is pretty
> quick.
It'll also drop unused mounts after a while if you like.
I'm using it with NFS mounts, and you can't tell it's there - it
automounts fast enough on a regular 100bT LAN you can't tell if it's
already mounted or not.
I'm fairly sure it's what Apple uses in OSX as well. I found the docs
confusing, but once it was up it's been perfect.
Brian
More information about the ubuntu-users
mailing list