[SOLVED] Unable to mount CephFS on Proxmox VMs

lama

New Member
Aug 28, 2022
8
7
3
Hello,

I'm trying to mount use CephFS as a shared storage location for Proxmox-hosted VMs but I'm encountering issues mounting the CephFS on Proxmox VMs, with the VMs hosted on the same nodes that Ceph are installed on.

I've followed https://pve.proxmox.com/pve-docs/chapter-pveceph.html to install Ceph Quincy on each of my ProxMox nodes to install Ceph and setup & configure the various Ceph components (e.g. monitors, managers, OSDs, MDS, pools and a CephFS). Whilst I can access this shared storage from each ProxMox node in /mnt/pve/cephfs, I can't mount CephFS using the Kernel Driver on any of the Proxmox-hosted VMs.

Following https://docs.ceph.com/en/quincy/cephfs/mount-prerequisites/:
  • I've created a minimal conf file on each VM
  • Created a CephX user and obtained the associated secret key.
Using the following command
mount -t ceph user@d8367345-23df-4sdd-b233-dccae02203a0.cephfs=/ -o mon_addr=192.168.10.30:6789,secret=AQBX/wljacvdIhAAUgeMY9z4d3kKzi7ngzl4iA== gives the following error message:
Code:
mount: user@d8367345-23df-4sdd-b233-dccae02203a0.cephfs=/: can't find in /etc/fstab.

Would anyone be able to provide any guidance on how I can fix this? Thank you.
 
  • Like
Reactions: Circenn
Solved.

For reference, enter the following commands within the VM

sudo apt install ceph-common sudo mkdir /etc/ceph ssh root@[node] "sudo ceph config generate-minimal-conf" | sudo tee /etc/ceph/ceph.conf sudo chmod 644 /etc/ceph/ceph.conf ssh root@[node] "sudo ceph fs authorize cephfs client.[user] / rw" | sudo tee /etc/ceph/ceph.client.[user].keyring sudo chmod 600 /etc/ceph/ceph.client.[user].keyring sudo mkdir /mnt/cephfs sudo su mount -t ceph [mon1]:6789,[mon2]:6789:/ /mnt/cephfs -o name=[user]
 
Thank you so much for providing the steps that worked. I'd been struggling with this as well and settled on bind mounts
 
  • Like
Reactions: lama
for reference, the fstab (/etc/fstab) entry will correspond to :
[mon1]:6789,[mon2]:6789:/ /mnt/cephfs ceph name=[user]
 
  • Like
Reactions: lama

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!