How to automatically umount a "broken" CIFS mount?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Is there some way to detect if the mount no longer "works"? There
could be many reasons for this: network error, Windows server has been
shut down, etc.

I can of course periodically do this:

> time ls -l /mnt/cifs/
ls: cannot access /mnt/cifs/: Host is down

real    0m10.000s
user    0m0.000s
sys    0m0.000s

And use that error to umount, which is what I'll do if I don't have
any other options.

But I'm hoping for some timeout / auto-umount mechanism or some way to
query if the mount is still "good", that doesn't take 10 seconds pr.
mountpoint...

Peter
--
Peter Valdemar Mørch
http://www.morch.com
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux