[Samba] Samba4 alpha >20 version: Samba & smbd daemons !
abartlet at samba.org
Mon May 28 16:51:05 MDT 2012
On Mon, 2012-05-28 at 20:17 +0400, oooo1 at front.ru wrote:
> In Samba4 alpha 21 and 22 Smbd daemon has to be run except Samba
> daemon to get access to your shared NetBios resources (folders) .That
> is in case of alpha versions after 20, Samba daemon starts in its own
> smbd daemon automatically and with with some parameters such as
> --configfile and --foreground (but without -D parametr that is not as
> daemon) .After Samba is started there are 2 processes: Samba & smbd.1.
> So, after killing of Samba process samba doesn' t delete samba.pid &
> smb-fileserver.conf.pid, is it riht behaivour of its daemons ?As I
> remembered nmbd daemon does - it deletes nmbd.pid file.Does Samba
> daemon have to delete its pid file and pid files of all other
> processes started by it, in particular smbd process or not ?
It certainly should, or if not, a new startup of the internally-managed
smbd should override it, noticing that the previous smbd is no longer
> 2. When Samba are not run and smbd hsa been started without Samba
> daemon, there 2 processes in memory, but smbd only, not Samba &
> smbd.And these processes can not be killed by killall command, can be
> killed by kill -9 # pid only.
I wonder why that is. If you get them under gdb (gdb -p <pid>) where
are they stuck?
> But after that if start Samba normally (Samba and smbd are started)
> users can' t get access to NetBios resources before full server reboot
> and there are messages such as this address are already in use for
> port 139, this address are already in use for port 445 in log file
> after restart Samba daemon after ru of kill -9 #pid. Th same situation
> if Samba starts not correctly and smbd couldn' t be started with Samba
> and it needs to start smbd manually.
You should never need to start smbd manually - it should always be
managed within the 'samba' process.
> I have got this situation too, but at the time couldn' t investigate
> why it is so.May be to make impossible to start smbd daemon without
> Samba daemon or make possible to correctly unload its process.
Certainly I'm thinking we should fail to start when we cannot bind to
our key ports. I'll work on a patch to do that - move the bind of port
139 and 445 into 'samba', and have it then terminate the whole server if
it cannot start up.
Making 'smbd' fail to start on it's own will be trickier, but may also
> In Samba4 alpha up to 20 version Samba daemon served as authorization
> as AD services as file access - all in one and it didn' t need to run
> smbd and smbd wasn' t started, smbd wasn' t in memory at all.
The 's3fs' project is responsible for these issues, and I've seen some
of them before, but as they are making life painful for our users, I'll
give them a new priority.
See https://wiki.samba.org/index.php/Samba4/s3fs for what we are trying
to do and why.
Andrew Bartlett http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org
More information about the samba