public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Aaron Lauterer <a.lauterer@proxmox.com>
To: Thomas Lamprecht <t.lamprecht@proxmox.com>,
	Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH manager 1/2] api: osd: return block devices instead of dm node
Date: Wed, 30 Mar 2022 10:19:13 +0200	[thread overview]
Message-ID: <99820a3f-d6f0-b312-c539-65db20585f75@proxmox.com> (raw)
In-Reply-To: <64cc9102-e3c9-ef1e-9e2d-1f64f1e87117@proxmox.com>



On 3/29/22 18:05, Thomas Lamprecht wrote:
> On 28.03.22 13:10, Aaron Lauterer wrote:
>> Returning the block devices is more useful than the device node. The
>> device node usually points to the DM device for bluestore OSDs:
>> /dev/dm-x
>>
>> In almost all situations one will be interested in the physical device
>> underneath, /dev/sdX or /dev/nvmeXnY. In the rare case that someone
>> isn't, then one can get a lot of more information by running
>> `ceph osd metadata <osd nr>`.
>>
>> Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
>> ---
>>   PVE/API2/Ceph/OSD.pm | 6 +++---
>>   1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/PVE/API2/Ceph/OSD.pm b/PVE/API2/Ceph/OSD.pm
>> index 93433b3a..c3d1384e 100644
>> --- a/PVE/API2/Ceph/OSD.pm
>> +++ b/PVE/API2/Ceph/OSD.pm
>> @@ -143,9 +143,9 @@ __PACKAGE__->register_method ({
>>   	    if ($e->{type} eq 'osd' && $osdmd) {
>>   		if ($osdmd->{bluefs}) {
>>   		    $new->{osdtype} = 'bluestore';
>> -		    $new->{blfsdev} = $osdmd->{bluestore_bdev_dev_node};
>> -		    $new->{dbdev} = $osdmd->{bluefs_db_dev_node};
>> -		    $new->{waldev} = $osdmd->{bluefs_wal_dev_node};
>> +		    $new->{blfsdev} = $osdmd->{bluestore_bdev_devices};
>> +		    $new->{dbdev} = $osdmd->{bluefs_db_devices};
>> +		    $new->{waldev} = $osdmd->{bluefs_wal_devices};
>>   		} else {
>>   		    $new->{osdtype} = 'filestore';
>>   		}
> 
> 
> "device_ids" (e.g.:  "sdb=HGST_HDN724040ALE640_PK2334PEGNVD6T") could be also interesting,
> but probably separately as its a bit longer but still, could avoid a extra shell lookup.

"device_ids" will contain a list of all devices used. With a bit of additional logic we could match that against the different devices to determine which is the bluestore, db and wal device and show the second identifier in a tooltip or so.

I would add that as new return values, keeping in mind your other response about changing that one property too much.

> 
> For the UI patch: do we want to hint when the db/wal is on the OSD itself as fallback?

Hmm, let me think and try it out how we can not clutter up that view but still convey the info.

There are a few ways this could be in reality.
If no DB or WAL is set, both are on the bluestore/OSD dev. If a DB dev is set, but no WAL, then the WAL is on the DB dev. If no DB dev is set, but a WAL, then the DB should be on the OSD.




  reply	other threads:[~2022-03-30  8:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-28 11:10 Aaron Lauterer
2022-03-28 11:10 ` [pve-devel] [PATCH manager 2/2] ui: osd: remove NA from wal device column Aaron Lauterer
2022-03-29 16:05 ` [pve-devel] [PATCH manager 1/2] api: osd: return block devices instead of dm node Thomas Lamprecht
2022-03-30  8:19   ` Aaron Lauterer [this message]
2022-03-30  9:46     ` Thomas Lamprecht
2022-03-29 16:08 ` Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=99820a3f-d6f0-b312-c539-65db20585f75@proxmox.com \
    --to=a.lauterer@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    --cc=t.lamprecht@proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal