From 4c9d86bd86954cbee25a3ea2a60af063114f7790 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 8 Aug 2017 13:59:41 -0400 Subject: [PATCH] os/filestore: fix device/partition metadata detection The UUID thing (a) relies on partition labels to work, which isn't always true (and won't be true for ceph-volume going forward), and (b) reportedly doesn't work anyway. The fd-based helper works just fine (even for vstart). Fixes: http://tracker.ceph.com/issues/20944 Signed-off-by: Sage Weil (cherry picked from commit e62862be0b68a17763e19ed8453436c457294505) --- src/os/filestore/FileStore.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/os/filestore/FileStore.cc b/src/os/filestore/FileStore.cc index b097a3c18a61..caac76ec4140 100644 --- a/src/os/filestore/FileStore.cc +++ b/src/os/filestore/FileStore.cc @@ -687,8 +687,7 @@ void FileStore::collect_metadata(map *pm) (*pm)["filestore_f_type"] = ss.str(); if (cct->_conf->filestore_collect_device_partition_information) { - rc = get_device_by_uuid(get_fsid(), "PARTUUID", partition_path, - dev_node); + rc = get_device_by_fd(fsid_fd, partition_path, dev_node, PATH_MAX); } else { rc = -EINVAL; } -- 2.47.3