From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id B66B465D14 for ; Fri, 24 Jul 2020 14:38:52 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id B39AFAAEB for ; Fri, 24 Jul 2020 14:38:52 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 22E34AADE for ; Fri, 24 Jul 2020 14:38:52 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id E1CFE4329A for ; Fri, 24 Jul 2020 14:38:51 +0200 (CEST) To: Alwin Antreich , Proxmox VE development discussion References: <20200723132514.510051-1-a.antreich@proxmox.com> <20200724094642.GC2185009@dona.proxmox.com> <70de89df-946b-a419-81ad-7f97a94f9181@proxmox.com> <20200724122437.GD2185009@dona.proxmox.com> From: Thomas Lamprecht Message-ID: <3dfde35e-61e1-062b-9e7a-ec617caba29d@proxmox.com> Date: Fri, 24 Jul 2020 14:38:50 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200724122437.GD2185009@dona.proxmox.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.176 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment NICE_REPLY_A -0.344 Looks like a legit reply (A) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [osd.pm] Subject: Re: [pve-devel] applied: [PATCH manager] Allow setting device class on osd create X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Jul 2020 12:38:52 -0000 Am 7/24/20 um 2:24 PM schrieb Alwin Antreich: > On Fri, Jul 24, 2020 at 11:54:10AM +0200, Thomas Lamprecht wrote: >> 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 >>>>> --- >>>>> 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? > AFAICT, Ceph check /sys/block and gathers the information from there and > then decides if it is hdd/ssd/nvme. that's not what I meant, talking about existing classes ;-) > >> >> 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. > I think only the active ones. But I guess it wouldn't hurt if we just > hard-code the usual suspects + auto. :) As said, if it's editable one can actually enter all information, the provided ones are just for convenience, check the replication schedule field for what I mean.