Cifs share cant be found, then appears ~1minute later?

Status
Not open for further replies.

nick779

Contributor
Joined
Dec 17, 2014
Messages
189
Over the past few days Ive noticed that when I access my CIFS shares for the first time in a few hours, im getting "windows cannot connect to \\Homenas" messages. The funny thing is that if I try a few more times, it will eventually come up.

I thought that it may be related to drive spindown, but all of my power saving options are disabled and HDD standby is set to "always on."

Ive checked it in the past with the camcontrol scripts and the drives do not appear to be spinning down.

Im going to check if its a potential DNS issue by changing my shortcut to be the IP of the device, but other than that im at a bit of a loss.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,553
Sounds like NetBIOS name resolution is being wonky. Make sure that freenas is configured as local master browser. If you have Linux/freebsd boxes on your lan then make sure they're not configures as local master. If all else fails you can do some auxiliary parameters to force freenas to win master browser elections. You can look at the smb.conf documentation to find the exact parameter as I can't remember off the top of my head.

Oh, and if you're using jails, make sure CIFS is only bound to the IP of your freenas host (ie not jails).
 

nick779

Contributor
Joined
Dec 17, 2014
Messages
189
Sounds like NetBIOS name resolution is being wonky. Make sure that freenas is configured as local master browser. If you have Linux/freebsd boxes on your lan then make sure they're not configures as local master. If all else fails you can do some auxiliary parameters to force freenas to win master browser elections. You can look at the smb.conf documentation to find the exact parameter as I can't remember off the top of my head.

Oh, and if you're using jails, make sure CIFS is only bound to the IP of your freenas host (ie not jails).

It is configured as the master, however it was under a different workgroup than the computers im accessing it from.
Im gonna put it back under WORKGROUP and test that.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,553
It is configured as the master, however it was under a different workgroup than the computers im accessing it from.
Im gonna put it back under WORKGROUP and test that.
They should be in same workgroup. Alternatively, you can set up proper DNS for your LAN. Another option is to use hosts file on clients. Overall DNS > NBNS.
 

nick779

Contributor
Joined
Dec 17, 2014
Messages
189
They should be in same workgroup. Alternatively, you can set up proper DNS for your LAN. Another option is to use hosts file on clients. Overall DNS > NBNS.

I'll have to play around with it. It's funny though, I can easily set up an ad domain, but I've never ever used a workgroup before.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,553
I'll have to play around with it. It's funny though, I can easily set up an ad domain, but I've never ever used a workgroup before.
That's because an AD domain has proper DNS. Countless man-hours of times past were wasted trying to resolve NetBIOS name resolution problems.

You should review entries in
/var/log/samba4/log.nmbd
And
/var/log/samba4/log.smbd

You may want to increase log level. log.nmbd should indicate contention for master browser.

And as mentioned above improper configuration of the combination ofsamba and jails can make samba go nuts.
 
Last edited:

nick779

Contributor
Joined
Dec 17, 2014
Messages
189
That's because an AD domain has proper DNS. Countless man-hours of times past were wasted trying to resolve NetBIOS name resolution problems.

You should review entries in
/var/log/samba4/log.nmbd
And
/var/log/samba4/log.smbd

You may want to increase log level. log.nmbd should indicate contention for master browser.

And as mentioned above improper configuration of the combination ofsamba and jails can make samba go nuts.
I changed the workgroup back to the default and it seems to be instant now.
 
Status
Not open for further replies.
Top