Forum Discussion

damian_19221's avatar
damian_19221
Icon for Nimbostratus rankNimbostratus
Mar 11, 2014

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