From 3e4a638c931a5198aca74dc4037d0b03d5e563ba Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 6 Dec 2018 10:02:35 -0600 Subject: [PATCH] ceph-volume: Micron SSDs don't include vendor name in ID_SERIAL Signed-off-by: Sage Weil --- src/ceph-volume/ceph_volume/util/device.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ceph-volume/ceph_volume/util/device.py b/src/ceph-volume/ceph_volume/util/device.py index 9b1ae6a5ab5..1569682ae2d 100644 --- a/src/ceph-volume/ceph_volume/util/device.py +++ b/src/ceph-volume/ceph_volume/util/device.py @@ -198,6 +198,9 @@ class Device(object): dev_id = '_'.join(p['ID_MODEL'], p['ID_SERIAL_SHORT']) elif 'ID_SERIAL' in p: dev_id = p['ID_SERIAL'] + if dev_id.startswith('MTFD'): + # Micron NVMes hide the vendor + dev_id = 'Micron_' + dev_id else: # the else branch should fallback to using sysfs and ioctl to # retrieve device_id on FreeBSD. Still figuring out if/how the -- 2.39.5