According to Ryan Meredith <rmeredith@micron.com>, the NVMes begin with
MTFD, but their other devices use the standard Micron_$model_$serial.
Signed-off-by: Sage Weil <sage@redhat.com>
device_id = id_model + '_' + id_serial_short;
} else if (id_serial.size()) {
device_id = id_serial;
+ if (device_id.substr(0, 4) == "MTFD") {
+ // Micron NVMes hide the vendor
+ device_id = "Micron_" + device_id;
+ }
}
if (device_id.size()) {
std::replace(device_id.begin(), device_id.end(), ' ', '_');
--- /dev/null
+P: /devices/pci0000:00/0000:00:02.1/0000:04:00.0/nvme/nvme0/nvme0n1
+N: nvme0n1
+S: disk/by-id/nvme-MTFDHBG800MCG-1AN1ZABYY_ZF1000MT
+E: DEVLINKS=/dev/disk/by-id/nvme-MTFDHBG800MCG-1AN1ZABYY_ZF1000MT
+E: DEVNAME=/dev/nvme0n1
+E: DEVPATH=/devices/pci0000:00/0000:00:02.1/0000:04:00.0/nvme/nvme0/nvme0n1
+E: DEVTYPE=disk
+E: ID_PART_TABLE_TYPE=gpt
+E: ID_PART_TABLE_UUID=c206417c-54fd-4938-8223-32343c5d1057
+E: ID_SERIAL=MTFDHBG800MCG-1AN1ZABYY_ZF1000MT
+E: ID_SERIAL_SHORT=ZF1000MT
+E: MAJOR=259
+E: MINOR=0
+E: SUBSYSTEM=block
+E: TAGS=:systemd:
+E: USEC_INITIALIZED=2455622
--- /dev/null
+Micron_MTFDHBG800MCG-1AN1ZABYY_ZF1000MT