[SOLVED] CephFS and pool device class selection

lifeboy

Renowned Member
Creating a new MDS for a cephfs automatically creates a pool and storage class, but here it selects the wrong class.

We have two CRUSH rules:
ssd_rule, id 0
hdd_rule, id 1

CephFS gets created with id 0, but I want to have it use id 1. We can't create the cephfs_metadate and cephfs_data pool in advance, since ceph fs new cephfs metadata data then complains that pool 'cephfs_data' (id '5') has a non-CephFS application enabled.

How can the pool be select for CephFS?
 
I found that I can pre-create the pools and simply change the application. (It helps to read the man page! :) )

Bash:
:~# ceph fs new cephfs cephfs_metadata cephfs_data
Error EINVAL:  pool 'cephfs_data' (id '9') has a non-CephFS application enabled.
:~# ceph osd pool application get cephfs_data
{
    "rbd": {}
}
:~# ceph osd pool application enable cephfs_data cephfs --yes-i-really-mean-it
enabled application 'cephfs' on pool 'cephfs_data'
:~# ceph osd pool application get cephfs_data
{
    "cephfs": {},
    "rbd": {}
}
:~# ceph osd pool application disable cephfs_data rbd --yes-i-really-mean-it
disable application 'rbd' on pool 'cephfs_data'
:~# ceph osd pool application get cephfs_data
{
    "cephfs": {}
}
:~# ceph osd pool application disable cephfs_metadata rbd --yes-i-really-mean-it
disable application 'rbd' on pool 'cephfs_metadata'
:~# ceph osd pool application enable cephfs_metadata cephfs --yes-i-really-mean-it
enabled application 'cephfs' on pool 'cephfs_metadata'
:~# ceph osd pool application get cephfs_metadata
{
    "cephfs": {}
}
:~# ceph fs new cephfs cephfs_metadata cephfs_data
new fs with metadata pool 10 and data pool 9

That did it.
 
There remains a little problem however. The pools we created manually now show as storage locations in the Proxmox GUI

1575992851482.png

In the above, cephfs_data and cephfs_metadata should not show up in this list. How do we tell them to not show here?
 
Last edited:
In Datacenter -> Storage you should see the corresponding storage entries.

I found that I can pre-create the pools and simply change the application.
Yes, you can do that. Or specify the rule to use for the pool(s) afterwards.
 

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!