From: Sage Weil Date: Thu, 6 Dec 2018 16:02:35 +0000 (-0600) Subject: ceph-volume: Micron SSDs don't include vendor name in ID_SERIAL X-Git-Tag: v13.2.5~144^2~16^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7d066829e3d5dd6f2609e360e5592bc38ff7f9eb;p=ceph.git ceph-volume: Micron SSDs don't include vendor name in ID_SERIAL Signed-off-by: Sage Weil (cherry picked from commit 3e4a638c931a5198aca74dc4037d0b03d5e563ba) --- diff --git a/src/ceph-volume/ceph_volume/util/device.py b/src/ceph-volume/ceph_volume/util/device.py index 470237532ac4..f46576e5284f 100644 --- a/src/ceph-volume/ceph_volume/util/device.py +++ b/src/ceph-volume/ceph_volume/util/device.py @@ -188,6 +188,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