[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: cifs share is not mounted during boot

Γιώργος Πάλλας <gpall@ccf.auth.gr> wrote:
> I have this cif share in my /etc/fstab which is not mounted during boot
> and I can't figure out why:

> After boot, giving a "mount -a" as root mounts it without problem.

I appreciate that you think you've found the root of this problem (another
post). But I'm wondering if this might be better achieved with
autofs? Personally, I give *all* remote mounts to autofs, so that my
local system doesn't hang at boot time if one or more of the remote
devices is unavailable. IMO the easiest method is to use /etc/auto.misc...

1. Edit /etc/auto.master and then "invoke-rc.d autofs restart". My
personal preference is to have these two lines:

    /var/autofs/misc    /etc/auto.misc          --timeout 60
    /var/autofs/net     /etc/auto.net           --timeout 60

2. Edit /etc/auto.misc and add this single line:

    myserver_data1 -fstype=cifs,rw,exec,async,uid=1000,gid=1000,credentials=/home/gpall/Documents/samba_credentials.txt ://myserver/myData/data1

3. Symlink the (invisible) mount into your prefered target

    ln -s /var/autofs/misc/myserver_data1 /media/cifs-shares/dat1  

Of course, if you have /etc/auto.cifs, or would like to have it, then you may prefer to read the insructions at http://www.howtoforge.com/accessing_windows_or_samba_shares_using_autofs


Reply to: