Best not to do that.So i have a ceph cluster, and have a cephfs created.
By if i go to the gui the "create cephfs" button is disabled.
So i cannot create multiple cephfs !!?
So i cant manage to use that subdir.
So i add the external cephfs, and then edit storage.cfg, but the storage stays monted on / of the cephfs.
Tried enable/disable, but its losing the "subdir" keyword.
So the thing is that i add "subdir xxxx" and the cephfs is still mounted, and accesible , but its on / of the cephfs.
You need to create a subdir in cephfs, create a separate Ceph client key and restrict it with namespaces to only that subfolder. Then you need to put this Ceph key on all nodes (the pve config share can be of help here), configure the storage.cfg and mount the cephfs on all nodes. I am not aware of pve currently supports mounting an external cephfs but I am positiv that if it doesn't it will be implemented. Anyways you can just mount cephfs locally (using kernel client/fstab or fuse) and tell pve about that new mount locally.
Don't get me wrong but either you need to learn a bit more about Ceph or you can e.g. checkout croit.io which provides a good gui implementation when it comes to handling Ceph settings and configuration of services, permission etc via UI. But even this requires some time to learn. One should understand Ceph at least to some level before throwing production data on it, don't you think?
cephfs: external-cephfs
path /mnt/pve/external-cephfs
content snippets,backup,vztmpl,iso
maxfiles 5
monhost xxx.xxx.xxx.xxx,xxx.xxx.xxx.xxx,xxx.xxx.xxx.xxx
username admin
subdir backups
file /etc/pve/storage.cfg line 36 (section 'external-cephfs') - unable to parse value of 'subdir': invalid format - value does not look like a valid absolute path
I think that this only happened becauase it was previously mounted with the root folder before. If monted correctly you shouldn't receive such error.Well thats interesting.
So i changed "subdir backups" to "subdir /backups".
I then ran pvecm status and i got : "A filesystem is already mounted on /mnt/pve/external-cephfs".
I then ran "umount /mnt/pve/external-cephfs", and than saw that it was remounted, correctly with the subdir of the cephfs.
So would im guessing that i would need to do this everytime i add or re-add the storage right ?
I think that this only happened becauase it was previously mounted with the root folder before. If monted correctly you shouldn't receive such error.
Cool that you could solve this. Would be interessting though if subfolders would be possible to configure via ui, with the ui correctly configuring the required slashed etc.
Subfolder mounts are not often needed, that's why they aren't on the GUI. The subdir needs a slash in front to be an absolute path, eg.And i really think this will surely make its way in the gui.
/backups
.Yup, that was it.Subfolder mounts are not often needed, that's why they aren't on the GUI. The subdir needs a slash in front to be an absolute path, eg./backups
.
I don't know your use cases but with the project we work with they most certainly always need to be able to use cephfs with more than just one level of access. Since it seems to be integrated to some level it seems okay. Would be nice if the UI also supports this. ThanksSubfolder mounts are not often needed, that's why they aren't on the GUI. The subdir needs a slash in front to be an absolute path, eg./backups
.