* I will reference Debian/Ubuntu commands as that is the distribution I use.
1) On your VM install ceph-common package: {sudo} apt install ceph-common
2) On your VM execute: echo "CONTENTS OF A VALID CEPH KEY" > /etc/ceph/[I USED THE SHARENAME].secret
3) Create the mount directory: {sudo} mkdir -p /mnt/[I USED THE SHARE NAME]
4) Test the mount with: {sudo} mount -t ceph [IP ADDRESSES OF YOUR NODE. SEPARATED BY A SINGLE COMMA]:/ [MOUNT DIRECTORY] -o name=[USERNAME TO MOUNT AS],secretfile=[PATH TO KEY FILE],fs=[SHARE NAME]
5) Once working, then un-mount the share using umount [PATH TO MOUNT DIRECTORY]
6) Update your /etc/fstab file as follows: {sudo} nano /etc/fstab
# Mount Ceph storage for [SHARE NAME]
[IP ADDRESSES OF YOUR NODE. SEPARATED BY A SINGLE COMMA]:/ [MOUNT DIRECTORY] ceph name=[USERNAME TO MOUNT AS],secretfile=[PATH TO KEY FILE],fs=[SHARE NAME],noatime,_netdev 0 0
7) run the following to mount the share: (it will be auto mounted when the system boots afterwards)
{sudo} systemctl daemon-reload && {sudo} mount -a
Last question Do I need to perform all 1-7 commands on all VMs that are mounting/accessing to one shared CephFs?This might not be the best way but it is they way I have been doing it to mount my CephFS storage into some VMs:
Code:* I will reference Debian/Ubuntu commands as that is the distribution I use. 1) On your VM install ceph-common package: {sudo} apt install ceph-common 2) On your VM execute: echo "CONTENTS OF A VALID CEPH KEY" > /etc/ceph/[I USED THE SHARENAME].secret 3) Create the mount directory: {sudo} mkdir -p /mnt/[I USED THE SHARE NAME] 4) Test the mount with: {sudo} mount -t ceph [IP ADDRESSES OF YOUR NODE. SEPARATED BY A SINGLE COMMA]:/ [MOUNT DIRECTORY] -o name=[USERNAME TO MOUNT AS],secretfile=[PATH TO KEY FILE],fs=[SHARE NAME] 5) Once working, then un-mount the share using umount [PATH TO MOUNT DIRECTORY] 6) Update your /etc/fstab file as follows: {sudo} nano /etc/fstab # Mount Ceph storage for [SHARE NAME] [IP ADDRESSES OF YOUR NODE. SEPARATED BY A SINGLE COMMA]:/ [MOUNT DIRECTORY] ceph name=[USERNAME TO MOUNT AS],secretfile=[PATH TO KEY FILE],fs=[SHARE NAME],noatime,_netdev 0 0 7) run the following to mount the share: (it will be auto mounted when the system boots afterwards) {sudo} systemctl daemon-reload && {sudo} mount -a
mount -t ceph admin@.cephfs=/ /ceph
This might not be the best way but it is they way I have been doing it to mount my CephFS storage into some VMs:
The traffic is split out on various physical and virtual networks.may want to mention that the vm in question has to have access to the ceph public network in some manner. I imagine this tutorial was written in an environment where all the various traffic types are travelling on a single vmbr; this is bad practice on multiple levels.