[linux-cifs-client] How to recover a cifs mount when the cifs server reboots?

Seb James seb at esfnet.co.uk
Thu Dec 6 15:31:17 GMT 2007


Hi cifs-clienters,

I'm wondering how the cifs-vfs client behaves when a mounted share is
modified, or the server is rebooted.

I'm working on a network appliance which has a system logger on it and
no permanent storage on-board. In order to save logs in a permanent way,
we are storing them to a Windows share. I am well aware that the _right_
way to export these logs is to send the logs over the network to a
syslog daemon running on a machine with a hard disk, but we want to
stick these into environments where all they do is run Windows servers
and where there is reluctance to make changes to the existing IT setup.

The problem here is that the site IT staff might reboot the Windows
server to which our network appliance is storing its system logs. I can
live with losing a few logs, but I need to make sure that the logs
continue to be saved when the Windows server comes back on-line.

The cifs vfs client doesn't appear to "auto-recover" when the share is
disconnected or the server rebooted. At least not on my system where the
syslog daemon is continuously trying to write data to the share.

I have a monitor process, so I can see when the share disappears/gets
disconnected (by statting a file I know should be there), I just can't
work how to unmount and remount it in such a way that when the share is
reconnected, the syslog daemon can carry on writing data to the share.

Can anyone here help, or point me at some information that might help. I
read the README in the Linux source, which didn't help on this
particular issue.

I'm using cifs vfs from the 2.6.11 kernel, and mount.cifs version
1.10-3.0.24.

Seb James
--
Embedded Software Foundry Ltd.
Direct Line: +44 (0)845 4580277




More information about the linux-cifs-client mailing list