Hello!
I need to mount automatically cephfs on KVM VM boot .
I tried to follow recommendations mentioned at http://docs.ceph.com/docs/master/cephfs/fstab/ but in
both cases (kernel mode or fuse) as well as by specifying mounting command in /etc/rc.local it
always fails to get mounted cephfs share on VM boot. There are lines in /var/log/messages like below:
.......
Jan 31 17:56:54 10-93-221-35 systemd: Reached target Remote File Systems (Pre).
Jan 31 17:56:54 10-93-221-35 systemd: Starting Remote File Systems (Pre).
Jan 31 17:56:54 10-93-221-35 systemd: MESSAGE=Failed to check directory /mnt/cephfs: No such file or
directory
Jan 31 17:56:54 10-93-221-35 systemd: Mounting /mnt/cephfs...
Jan 31 17:56:54 10-93-221-35 systemd: Started OpenSSH server daemon.
Jan 31 17:56:54 10-93-221-35 kernel: FS-Cache: Loaded
Jan 31 17:56:54 10-93-221-35 htcondor: Not changing GLOBAL_MAX_FDS (/proc/sys/fs/file-max): new
value (32768) <= old value (400704).
Jan 31 17:56:54 10-93-221-35 kernel: Key type ceph registered
Jan 31 17:56:54 10-93-221-35 kernel: libceph: loaded (mon/osd proto 15/24)
Jan 31 17:56:54 10-93-221-35 mount: mount error 2 = No such file or directory
Jan 31 17:56:54 10-93-221-35 systemd: mnt-cephfsshare.mount mount process exited, code=exited status=2
Jan 31 17:56:54 10-93-221-35 kernel: FS-Cache: Netfs 'ceph' registered for caching
Jan 31 17:56:54 10-93-221-35 kernel: ceph: loaded (mds proto 32)
Jan 31 17:56:54 10-93-221-35 systemd-vconsole-setup: /usr/bin/setfont failed with error code 71.
Jan 31 17:56:54 10-93-221-35 systemd: Failed to mount /mnt/cephfs.
Jan 31 17:56:54 10-93-221-35 systemd: Dependency failed for Remote File Systems.
Jan 31 17:56:54 10-93-221-35 systemd: Job remote-fs.target/start failed with result 'dependency'.
Jan 31 17:56:54 10-93-221-35 systemd: Unit mnt-cephfsshare.mount entered failed state.
..... or in case of fuse ....
Jan 31 17:42:18 10-93-221-35 rc.local: fuse: bad mount point `/mnt/cephfs/': No such file or directory
Jan 31 17:42:18 10-93-221-35 rc.local: 2018-01-31 17:42:18.056464 7ff0f09b3040 -1 fuse_parse_cmdline
failed.
Jan 31 17:42:18 10-93-221-35 rc.local: ceph-fuse[1043]: fuse failed to initialize
Jan 31 17:42:18 10-93-221-35 systemd: Started /etc/rc.d/rc.local Compatibility.
But /mnt/cephfs dir exists on the host:
$ ls -al /mnt/
total 4
drwxr-xr-x. 2 root root 4096 Nov 15 16:12 cephfs
I tried various entries in /etc/fstab:
#none /mnt/cephfs fuse.ceph
ceph.id=cephfsshare,ceph.conf=/etc/ceph/ceph.conf,ceph.client_mountpoint=/service/cephfsshare,_netdev,defaults
0 0
#192.168.1.11:6789,192.168.1.12:6789,192.168.1.13:6789:/service/cephfsshare /mnt/cephfs
ceph name=cephfsshare,secretfile=/root/ceph.cephfsshare.keyring,noatime,_netdev 0 0
192.168.1.11:6789:/service/cephfsshare /mnt/cephfs ceph
name=cephfsshare,secretfile=/root/ceph.cephfsshare.keyring,noatime,_netdev 0 0
In all cases I was able successfully mount cephfs share manually as soon as VM booted.
On the cephfs client with CentOS 7 x64 I have
$ rpm -qa|grep -i ceph
ceph-fuse-12.2.2-0.el7.x86_64
ceph-release-1-1.el7.noarch
libcephfs2-12.2.2-0.el7.x86_64
python-cephfs-12.2.2-0.el7.x86_64
ceph-common-12.2.2-0.el7.x86_64
$ uname -r
4.15.0-1.el7.elrepo.x86_64
Ceph release is Luminous (12.2.2).
I would appreciate any help on that issue.
_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com