Re: decompiled crushmap device list after removing osd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 07, 2017 at 07:41:53PM +0000, Sage Weil wrote:
On Tue, 7 Nov 2017, Jan Fajerski wrote:
Hi,
I noticed some weird behaviour of crushtool when decompiling a map after an
osd has been removed. Say I have a cluster with 4 osds. When I remove osd.2,
get and decompile the crushmap, I get this device list in the crushmap:

# devices
device 0 osd.0 class hdd
device 1 osd.1 class hdd
device 2 device2
device 3 osd.3 class hdd

I'd appreciate some info on whether this is intended behaviour and what the
reasoning is. I'd expect the map not to list id 2 at all and afaict the
crushmap doesn't contain the id anymore. If there is no reason for listing
that I'd be happy to make a PR.

There's no good rason to print it.  It comes from

 out << "\n# devices\n";
 for (int i=0; i<crush.get_max_devices(); i++) {
   out << "device " << i << " ";
   print_item_name(out, i, crush);
   print_item_class(out, i, crush);
   out << "\n";
 }

There isn't a convenient way at this point to know whether the device is
used in the hierarchy, so exclusing it is a bit of a hassle.  Happy to
take a PR doing so, though!
https://github.com/ceph/ceph/pull/18901

sage



--
Jan Fajerski
Engineer Enterprise Storage
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton,
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux