For some reason the CIFS mounts of Volumes and backups get disconnected sometimes but it seems there is no automatic discovery of this disconnect and an automatic reconnect. There is also no button in the GUI to reconnect, worse the mount "icon" is Green but that's not correct regarding the connection.
- how to reconnect manually?
- is it feasible to auto-discover a disconnect and reconnect?
@imc67 I was also debugging a backup issue with cifs. The problem there is, that is it quite hard to figure out if the mountpoint went bad. Essentially sometimes read operations work, maybe because still in cache or for other reasons, but then a link creation will fail. I am still trying to figure out how to determine the proper state of such mount points in order to improve the Cloudron logic dealing with them. Do we have some cifs experts here on how to debug such rather random failures?
stat -f /mnt/cloudronbackup/ File: "/mnt/cloudronbackup/" ID: 4f634e9e00000000 Namelen: 255 Type: smb2 Block size: 1024 Fundamental block size: 1024 Blocks: Total: 471125220 Free: 250861330 Available: 250861330 Inodes: Total: 0 Free: 0
echo $? 0
Now I simulate an CIFS outage by just disabling CIFS.
stat -f /mnt/cloudronbackup/ stat: cannot read file system information for '/mnt/cloudronbackup/': Key has been revoked
echo $? 1
Maybe we can use this?
@brutalbirdie yeah I thought so as well, but I am currently debugging a storage where this leads to:
root:~# stat -f /mnt/cloudronbackup/ File: "/mnt/cloudronbackup/" ID: f19c4e9e00000000 Namelen: 255 Type: smb2 Block size: 1024 Fundamental block size: 1024 Blocks: Total: 524288000 Free: 426313712 Available: 426313712 Inodes: Total: 0 Free: 0 root:~# echo $? 0 root:~#
All read and most write commands work, however not all They will work fine after a remount
There is also no button in the GUI to reconnect, worse the mount "icon" is Green but that's not correct regarding the connection.
@nebulon If a person can figure manually that it is not mounted, why can we not figure out in code that it is not mounted ?
We can always put some cron timer for CIFS mounts to check if it's mounted and if not re-mount (i.e based on your answer for above). Ideally, this should of course come from the CIFS driver.