Hi Dulux-Oz, CephFS is not designed to deal with mobile clients such as laptops that can lose connectivity at any time. And I am not talking about the inconveniences on the laptop itself, but about problems that your laptop would cause to other clients. The problems stem from the fact that MDSes give out "caps" to clients, which are, essentially, licenses to do local caching. If another client wants to access the same file, the MDS would need to contact the laptop and tell it to release the caps - which is no longer possible. Result: a health warning and delays/hangs on other clients. The proper solution here is to use NFSv3 (ideally with a userspace client instead of a kernel mount). NFSv3, because v4 has leases which bring the problem back. And this means that you cannot use cephadm to deploy this NFS server, as cephadm-deployed NFS-Ganesha is hard-coded to speak only NFSv4. SAMBA server with oplocks disabled, and, again, a userspace client could be another solution. If you decide to disregard this advice, here are some tips. With systemd, configuring autofs is as easy as adding "x-systemd.automount,x-systemd.idle-timeout=1min,noauto,nofail,_netdev" to your /etc/fstab line. This applies both to CephFS and NFS. For kernel-based NFSv3 mounts, consider adding "nolock". Another CephFS-specific mount option that somewhat helps with reconnects is "recover_session=clean". On Sat, Mar 23, 2024 at 2:12 PM duluxoz <duluxoz@xxxxxxxxx> wrote: > > Hi All, > > I'm looking for some help/advice to solve the issue outlined in the heading. > > I'm running CepfFS (name: cephfs) on a Ceph Reef (v18.2.2 - latest > update) cluster, connecting from a laptop running Rocky Linux v9.3 > (latest update) with KDE v5 (latest update). > > I've set up the laptop to connect to a number of directories on CephFS > via the `/etc/fstab' folder, an example of such is: > `ceph_user@.cephfs=/my_folder /mnt/my_folder ceph noatime,_netdev 0 0`. > > Everything is working great; the required Ceph Key is on the laptop > (with a chmod of 600), I can access the files on the Ceph Cluster, etc, > etc, etc - all good. > > However, whenever the laptop is in sleep or hibernate mode (ie when I > close the laptop's lid) and then bring the laptop out of > sleep/hibernation (ie I open the laptop's lid) I've lost the CephFS > mountings. The only way to bring them back is to run `mount -a` as root > (or sudo). This is, as I'm sure you'll agree, not a long-term viable > options - especially as this is a running as a pilot-project and the > eventual end-users won't have access to root/sudo. > > So I'm seeking the collective wisdom of the community in how to solve > this issue. > > I've taken a brief look at autofs, and even half-heartedly had a go at > configuring it, but it didn't seem to work - honestly, it was late and I > wanted to get home after a long day. :-) > > Is this the solution to my issue, or is there a better way to construct > the fstab entries, or is there another solution I haven't found yet in > the doco or via google-foo? > > All help and advice greatly appreciated - thanks in advance > > Cheers > > Dulux-Oz > _______________________________________________ > ceph-users mailing list -- ceph-users@xxxxxxx > To unsubscribe send an email to ceph-users-leave@xxxxxxx -- Alexander E. Patrakov _______________________________________________ ceph-users mailing list -- ceph-users@xxxxxxx To unsubscribe send an email to ceph-users-leave@xxxxxxx