Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 02 Sep 2010 10:24:05 +0200
From:      Bernard Scharp <freebsd-questions@itsacon.net>
To:        freebsd-questions@freebsd.org
Subject:   Multiple mount_smbfs commands fail in bash script
Message-ID:  <4C7F5F25.2010604@itsacon.net>

next in thread | raw e-mail | index | archive | help
Hi all,

I'm having some problems with a bash script.

It's a backup script that periodically checks if a list of systems is
online, and if so, uses samba to mount a specified list of shares,
rsyncs them to a local directory and unmounts again.

This used to run fine till a few months ago (I don't know what the
trigger was that caused them to first fail).

Now, when the script is run, it gives the following error when mounting
the shares:

mount_smbfs: can't get handle to requester (no /dev/nsmb* device)

Which is strange, as there are (by last count) 1170 /dev/nsmb* devices
in /dev/ (is that normal?)

Searching the internet, FreeBSD and Samba mailing lists gave me no
recent info, and the old info wasn't helpful.

I've narrowed it down to the point where I think it's caused by one
process trying to open two (or more) shares at the same time. (a simple
script mounting two shares gives the same error).

I can mount the shares from the command line without problems, it's only
in the bash script it gives me problems.

~/.nsmbrc and /etc/nsmb.conf are correct, smbd, nmbd and winbindd are
running. The system is FreeBSD 8.0 Stable.

Anyone got any suggestions?

Regards,
Bernard



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4C7F5F25.2010604>