Forum Discussion
Configuration SMB Monitors
Hi, We are looking to load balance CIFS servers using the F5 - the idea is we have two servers, a primary and a secondary. I'd like to only use the secondary when the primary fails (using priority groups), but I'm having trouble getting the Monitor to work. We're running 11.4.1 on our LTM and I've set a health monitor up as follows:
ltm monitor smb /Common/cifs_monitor {
debug yes
defaults-from /Common/smb
destination *:*
get file.txt
interval 10
password mypassword
server longweb03sandbo
service share
time-until-up 0
timeout 31
username myuser
The basic check works, but as soon as I try to put in a "file" to check, the pool is marked as down. It's probably irrelevant, but I'm using Samba on a Linux box for this test - the service is "share" and there is a file called file.txt in the root folder of this share. Regardless of whether I name the file share/file.txt, \share\file.txt, file.txt, etc it won't recognise the file.
Is there something I am doing wrong? Thanks!
It seems as though the issue was due to a missing directory. The message below which was seen in the logs was due to the local directory not being present.
file.txt was not transferred: No such file or directory
The monitoring uses /var/run/monitors as a default directory. This appears to be hardcoded. The get commands are successful and the files are being placed in /var/run as indicated by the preceding lines in the logs.
smbclient //longweb03sandbo/share mypassword -I 10.200.8.28 -p 445 -c cd .; cd; get file.txt file.txt.18261 -U myuser dirstring: Current directory is \ Domain=[LONGWEB03SANDBO] OS=[Unix] Server=[Samba 3.0.33-3.39.el5_8] getting file \file.txt of size 2 as file.txt.18261 (0.5 kb/s) (average 0.5 kb/s) Recvd: 'Current directory is \
Creating /var/run/monitors directory resolved the issue. We now get:
smbclient //longweb03sandbox/share mypassword -I 10.200.8.28 -p 445 -c cd .; cd; get damian.txt damian.txt.24691 -U 101135 dirstring: Current directory is \ Domain=[LONGWEB03SANDBO] OS=[Unix] Server=[Samba 3.0.33-3.39.el5_8] getting file \damian.txt of size 6 as damian.txt.24691 (1.5 kb/s) (average 1.5 kb/s) Recvd: 'Current directory is \ ' up
- Cory_50405Noctilucent
So you are using the full server name 'longwebsandbox' in your manual queries. Try changing the smb server in the monitor to this as well. Any change?
- damian_19221Nimbostratus
Hi, it doesn't seem to make a difference whether I use longweb03sandbo or longweb03sandbox - both test OK from my PC and both fail on the LTM monitor. I think the protocol just truncates the last character anyway.
- Cory_50405Noctilucent
What version of code are you running? Could be you are running into a bug:
http://support.f5.com/kb/en-us/solutions/public/13000/100/sol13172
- damian_19221Nimbostratus
Hmm... it does sound like that bug, but I'm running 11.4.1 which is higher than the fixed version (11.4.0).
The link in that article to a scripted SMB monitor could be used as a workaround I guess, but I think first I'd like to exhaust all options of using the built in smb check.
- aneilsingh_5064NimbostratusHow has Load balancing CIFS been working for you on the LTM ? How much traffic are you pushing through your LTM?
- Cory_50405Noctilucent
It might be best at this point to open a support case. Your configurations should be correct, and buggy behavior is about the only explanation left.
- F50_147262Nimbostratus
It seems as though the issue was due to a missing directory. The message below which was seen in the logs was due to the local directory not being present.
file.txt was not transferred: No such file or directory
The monitoring uses /var/run/monitors as a default directory. This appears to be hardcoded. The get commands are successful and the files are being placed in /var/run as indicated by the preceding lines in the logs.
smbclient //longweb03sandbo/share mypassword -I 10.200.8.28 -p 445 -c cd .; cd; get file.txt file.txt.18261 -U myuser dirstring: Current directory is \ Domain=[LONGWEB03SANDBO] OS=[Unix] Server=[Samba 3.0.33-3.39.el5_8] getting file \file.txt of size 2 as file.txt.18261 (0.5 kb/s) (average 0.5 kb/s) Recvd: 'Current directory is \
Creating /var/run/monitors directory resolved the issue. We now get:
smbclient //longweb03sandbox/share mypassword -I 10.200.8.28 -p 445 -c cd .; cd; get damian.txt damian.txt.24691 -U 101135 dirstring: Current directory is \ Domain=[LONGWEB03SANDBO] OS=[Unix] Server=[Samba 3.0.33-3.39.el5_8] getting file \damian.txt of size 6 as damian.txt.24691 (1.5 kb/s) (average 1.5 kb/s) Recvd: 'Current directory is \ ' up
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com