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) server-digest SHA256) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 6A06665D0F for ; Fri, 24 Jul 2020 14:24:40 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 5C386A92E for ; Fri, 24 Jul 2020 14:24:40 +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 251E5A922 for ; Fri, 24 Jul 2020 14:24:39 +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 DAA3F4333C for ; Fri, 24 Jul 2020 14:24:38 +0200 (CEST) Date: Fri, 24 Jul 2020 14:24:37 +0200 From: Alwin Antreich To: Thomas Lamprecht Cc: Proxmox VE development discussion Message-ID: <20200724122437.GD2185009@dona.proxmox.com> Mail-Followup-To: Alwin Antreich , Thomas Lamprecht , Proxmox VE development discussion References: <20200723132514.510051-1-a.antreich@proxmox.com> <20200724094642.GC2185009@dona.proxmox.com> <70de89df-946b-a419-81ad-7f97a94f9181@proxmox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <70de89df-946b-a419-81ad-7f97a94f9181@proxmox.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-SPAM-LEVEL: Spam detection results: 0 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment 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:24:40 -0000 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. > > 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. :)