[Samba] Shutdown hangs since setting up Samba
Andrew Masterson
andrew.masterson at nuvistaenergy.com
Fri Jun 10 10:33:43 MDT 2011
-----Original Message-----
From: samba-bounces at lists.samba.org
[mailto:samba-bounces at lists.samba.org] On Behalf Of beweta at gmx.com
Sent: Friday, June 10, 2011 9:42 AM
To: samba at lists.samba.org
Subject: Re: [Samba] Shutdown hangs since setting up Samba
Am 04.06.2011 16:40, schrieb Harry Jede:
> On 16:30:33 wrote beweta at gmx.com:
>> Am 03.06.2011 23:50, schrieb Chris Weiss:
>>> On Fri, Jun 3, 2011 at 4:11 PM, <beweta at gmx.com> wrote:
>>>> I get this error messages on boot:
>>>>
>>>> CIFS VFS: Error connecting to socket. Aborting operation
>>>> CIFS VFS: cifs_mount failed w/return code = -101
>>>
>>> I have seen these before.
>>
>> OK, I'm not the only one.
>>
>>> as I recall, it's trying to mount before the network comes fully
>>> up, and downing the network before unmounting the cifs.
>>
>> I have the same suspicion, but don't know how to fix it.
>>
>>> I do not recall the solution, and I don't use cifs in fstab anymore.
>>
>> What are you using instead of CIFS?
> Use the pam mount helper. They run, when a user is logging in.
>
> man pam_mount
> man pam_mount.conf
I followed this step-by-step guide [1], but it doesn't work.
The error messages in /var/log/auth.log look quite familiar to me:
pam_mount(mount.c:72): mount error(101): Network is unreachable
pam_mount(mount.c:72): Refer to the mount.cifs(8) manual page (e.g. man
mount.cifs)
pam_mount(pam_mount.c:521): mount of ben failed
---------------------------------
In my experience the switch to udev or some other parallel booting
process (not sure what did it) in more recent linux distros has caused
the init sequence to be violated. So no longer can you count on S1
being finished before S99 starts. I have had to do one of two things to
resolve this
RHEL: all mounting commands are put into /etc/rc.d/rc.local, because
that file is explicitely called after all other startup scripts have
completed. (although on Fedora 14 this doesn't even seem to be the case
anymore...?)
SLES: Create a startup script that waits for your network interface to
come up before executing mounting commands. Here's a simple, non-robust
one (where "do_network_mounts" actually does the mounting commands):
#!/bin/bash
# wait for a network interface to come up if we're running scripts in
parallel mode
while [ `ifconfig | grep 192.168 | wc -l` -eq 0 ]; do
sleep 5
done
/mnt/do_network_mounts
-=Andrew
More information about the samba
mailing list