[SOLVED] Mount a cephfs to a vm

Donovan Hoare

Active Member
Nov 16, 2017
27
5
43
42
Good day all.
Sorry for all the noob questions.

I have ceph running on my 6node proxmox cluster.
After some other noob questions ive asked over the last few days. its running nicely.
I would like to now add a cephfs share to a vm
Assumption : when i add to a vm, it woule be like mounting a NFS share so when i write to that mount point, all servers with the same mount point can see the data.

So what i have done.
I addeded 3 metatdata servers (don't know why i did 3 but everything in Ceph seems to like 3).
of which now one is active and 2 are in standby. see image attached.

i then added one cephFS, which is what im assuming is the sharename. here iredmailstore


1716481537539.png

Now on a VM i have spun up.
A added a network interface on the bridge of the Ceph client. it can ping the 10.0.45.0-24 range.
I then installed
Code:
apt install ceph-common

on the server i created a key file then moved to the vm.
Code:
ceph auth get-key client.admin > cephfs.secret

i then scp'ed the file to the vm

On the vm i did
Code:
mkdir -p /mnt/iredmailstore
mount -t ceph 10.0.45.24,10.0.45.25,10.0.45.26:/ /mnt/iredmailstore -o name=root,secretfile=/root/iredmailstore.secret,fs=iredmailstore

However this is not working im getting this output
Code:
mount -t ceph 10.0.45.24:6789:/ /mnt/iredmailstore -o name=admin,secretfile=/root/iredmailstore.secret,fs=iredmailstore
did not load config file, using default settings.
2024-05-23T16:20:54.580+0000 7f3fcc53cf40 -1 Errors while parsing config file!

2024-05-23T16:20:54.580+0000 7f3fcc53cf40 -1 can't open ceph.conf: (2) No such file or directory

2024-05-23T16:20:54.580+0000 7f3fcc53cf40 -1 Errors while parsing config file!

2024-05-23T16:20:54.580+0000 7f3fcc53cf40 -1 can't open ceph.conf: (2) No such file or directory

unable to get monitor info from DNS SRV with service name: ceph-mon
2024-05-23T16:20:54.592+0000 7f3fcc53cf40 -1 failed for service _ceph-mon._tcp

2024-05-23T16:20:54.592+0000 7f3fcc53cf40 -1 auth: unable to find a keyring on /etc/ceph/ceph.client.admin.keyring,/etc/ceph/ceph.keyring,/etc/ceph/keyring,/etc/ceph/keyring.bin: (2) No such file or directory

mount error: no mds server is up or the cluster is laggy
mount error: no mds server is up or the cluster is laggy

Any help would be appriciated.

Regards
 
OK i found what i was doing wrong.
When mounting i was trying to connect to the ip address of the metadata servers.

However when i changed it to one of the ipaddresses of the monitor servers. it worked.
 
  • Like
Reactions: UdoB

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!