]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume: Micron SSDs don't include vendor name in ID_SERIAL 25753/head
authorSage Weil <sage@redhat.com>
Thu, 6 Dec 2018 16:02:35 +0000 (10:02 -0600)
committerAlfredo Deza <adeza@redhat.com>
Wed, 2 Jan 2019 20:25:48 +0000 (15:25 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 3e4a638c931a5198aca74dc4037d0b03d5e563ba)

src/ceph-volume/ceph_volume/util/device.py

index 470237532ac4bf723a23399653e64a78182167c2..f46576e5284fd8224e88bbbae3bd4040e2fafb96 100644 (file)
@@ -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