From owner-freebsd-questions@FreeBSD.ORG Thu Sep 2 08:50:49 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 069C9106570F for ; Thu, 2 Sep 2010 08:50:49 +0000 (UTC) (envelope-from freebsd-questions@itsacon.net) Received: from rs2cruz.nexcess.net (rs2cruz.nexcess.net [69.39.81.230]) by mx1.freebsd.org (Postfix) with ESMTP id A37F68FC18 for ; Thu, 2 Sep 2010 08:50:48 +0000 (UTC) Received: (qmail 18010 invoked by uid 108); 2 Sep 2010 04:24:07 -0400 Received: from unknown (HELO ?10.80.100.183?) (77.60.216.169) by rs2cruz.nexcess.net with SMTP; 2 Sep 2010 04:24:07 -0400 Message-ID: <4C7F5F25.2010604@itsacon.net> Date: Thu, 02 Sep 2010 10:24:05 +0200 From: Bernard Scharp User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.7) Gecko/20100713 Lightning/1.0b2 Thunderbird/3.1.1 MIME-Version: 1.0 To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Multiple mount_smbfs commands fail in bash script X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2010 08:50:49 -0000 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