mount cephfs using fstab

DynFi User

Renowned Member
Apr 18, 2016
147
16
83
49
dynfi.com
I have a PBS system where I need to mount a CephFS FS.

I have managed to mount this using this command:
mount -t ceph 192.168.215.4,192.168.215.3,192.168.215.2,192.168.215.1:/ /mnt/mycephfs -o name=bob,secret=xxxxxxxxxxxxxxxxxxxxxxx==

This is working like a charm and I have access to my CephFS with very good performances:
Code:
root@dc1-pbs01:/etc/ceph# mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,relatime)
[…]
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
sunrpc on /run/rpc_pipefs type rpc_pipefs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
[…]
192.168.215.4,192.168.215.3,192.168.215.2,192.168.215.1:/ on /mnt/mycephfs type ceph (rw,relatime,name=bob,secret=<hidden>,acl)

When I am trying to input this into /etc/fstab using this:
192.168.15.4,192.168.15.3,192.168.15.2,192.168.15.1:/ /mnt/mycephfs ceph name=gregober,secretfile=/etc/ceph/secret.key,rw,noatime,_netdev 0 0

I am ending with this:
Code:
root@dc1-pbs01:/etc/ceph# mount -a
mount: /mnt/mycephfs: wrong fs type, bad option, bad superblock on 192.168.215.4,192.168.215.3,192.168.215.2,192.168.215.1:/, missing codepage or helper program, or other error.

I have tried different options, but I can't seem to find the right options or I am missing somethings… ??
 
well i just tested here, and your example (ip, path, etc. replaced) works without problems...
what kernel and ceph version do you use ?
 
A little feedback on this one.

If you want to simply use :
192.168.15.4,192.168.15.3,192.168.15.2,192.168.15.1:/ /mnt/mycephfs ceph name=gregober,secret=your_secret,rw,noatime,_netdev 0 0

You will only need the package ceph-fuse to be installed.

But if you want or need secretfile option:
192.168.15.4,192.168.15.3,192.168.15.2,192.168.15.1:/ /mnt/mycephfs ceph name=gregober,secretfile=/etc/ceph/secret.key,rw,noatime,_netdev 0 0

Then you need ceph-common package to be installed.
 
  • Like
Reactions: ph0x

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!