Multiple mount_smbfs commands fail in bash script

Polytropon freebsd at
Thu Sep 2 14:20:58 UTC 2010

On Thu, 02 Sep 2010 15:52:25 +0200, Bernard Scharp <freebsd-questions at> wrote:
> Neither am I. Hadn't even thought of grepping in /usr/src for the error
> message :-)

It's often a good starting point to see where problems might
be caused from.

> Can I just `rm /dev/nsmbX` them? (messing in /dev/ is a level of FreeBSD
> I'm not familiar with)

Yes, I would guess so. The content of /dev/ is dynamically generated
since FreeBSD 5, if I remember correctly. As the nsmb nodes don't
seem to be in use any longer, it would be no problem to remove
them. The mount_smbfs program will generate them if needed.

Just as an addition: After your script successfully performed the
operations needing the mounted SMB shares, it could remove the
corresponding device files.

Still, this looks like a bug to me, a "can't image anybody needs more
than 1024 of them" kind of bug. I would have imagined that IF a
program needs files in a temporary way, it removes them after use.

Just to be sure, unmount all SMB related things, as I can't predict
what would happen if a nsmb device disappears when in use.

Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...

More information about the freebsd-questions mailing list