[pve-devel] applied: [PATCH manager] Allow setting device class on osd create

Thomas Lamprecht t.lamprecht at proxmox.com
Fri Jul 24 11:54:10 CEST 2020


Am 7/24/20 um 11:46 AM schrieb Alwin Antreich:
> On Fri, Jul 24, 2020 at 11:34:33AM +0200, Thomas Lamprecht wrote:
>> Am 7/23/20 um 3:25 PM schrieb Alwin Antreich:
>>> In some situations Ceph's auto-detection doesn't recognize the device
>>> class correctly. The option allows to set it directly on osd create,
>>> instead of altering it afterwards. This way the cluster doesn't need to
>>> shift data back and forth unnecessarily.
>>>
>>> Signed-off-by: Alwin Antreich <a.antreich at proxmox.com>
>>> ---
>>>  PVE/API2/Ceph/OSD.pm | 7 +++++++
>>>  1 file changed, 7 insertions(+)
>>>
>>
>> applied, thanks - comments still inline
>>
>>> diff --git a/PVE/API2/Ceph/OSD.pm b/PVE/API2/Ceph/OSD.pm
>>> index ceaed129..f1f39bf9 100644
>>> --- a/PVE/API2/Ceph/OSD.pm
>>> +++ b/PVE/API2/Ceph/OSD.pm
>>> @@ -260,6 +260,11 @@ __PACKAGE__->register_method ({
>>>  		default => 0,
>>>  		description => "Enables encryption of the OSD."
>>>  	    },
>>> +	    'crush-device-class' => {
>>> +		optional => 1,
>>> +		type => 'string',
>>> +		description => "Set the device class of the OSD in crush."
>>> +	    },
>>
>> why not having an enum with 'nvme', 'ssd', and 'hdd' here?
> Ceph allows the class to be an arbitrary string, eg. my-very-fast-disk.
> 

Is it then "auto-generated" or has ceph an index of known ones floating
around?

We could also add this to the UI, to advanced as editable KVCombobox which is
emptyText "auto", and has "hdd", "nvme" and "ssd" as convenience selectors.
If we can get all currently available ones also (relatively) cheaply we could
add them too.





More information about the pve-devel mailing list