FST: add smartctl support for device-mapper multipath
Linux FSTs can have externally attached enclosures housing the disks, that are attached to one or more HBAs, with one or more SAS links. Linux multipathd will be used to load balance/HA on those multi-paths devices. Linux devicemapper will create symlinks for the devices, i.e. /dev/mapper/mpathXX -> /dev/dm-NN
- Currently the codepath detects devicenames starting with 'm' as md-raid devices, i.e. expecting /dev/md0
- Additionally, smartctl will have to use the --device=scsi devicetype switch as it will not be able to auto-detect the device type through the symlink device /dev/mapper/mpathXX
Examples from an installation, EOS filesystems mounted on multipath devices:
[root@fst-3 ~]# tail /etc/mtab
/dev/mapper/mpathw /srv/data/data.22 xfs rw,seclabel,noatime,attr2,inode64,noquota 0 0
/dev/mapper/mpathx /srv/data/data.23 xfs rw,seclabel,noatime,attr2,inode64,noquota 0 0
/dev/mapper/mpathaa /srv/data/data.26 xfs rw,seclabel,noatime,attr2,inode64,noquota 0 0
/dev/mapper/mpathz /srv/data/data.25 xfs rw,seclabel,noatime,attr2,inode64,noquota 0 0
/dev/mapper/mpathu /srv/data/data.20 xfs rw,seclabel,noatime,attr2,inode64,noquota 0 0
/dev/mapper/mpathab /srv/data/data.27 xfs rw,seclabel,noatime,attr2,inode64,noquota 0 0
/dev/mapper/mpathj /srv/data/data.09 xfs rw,seclabel,noatime,attr2,inode64,noquota 0 0
smartctl lookup with default options will not work
[root@fst-3 ~]# smartctl --health /dev/mapper/mpathaa
smartctl 7.0 2018-12-30 r4883 [x86_64-linux-3.10.0-1160.el7.x86_64] (local build)
Copyright (C) 2002-18, Bruce Allen, Christian Franke, www.smartmontools.org
/dev/mapper/mpathaa: Unable to detect device type
Please specify device type with the -d option.
[...]
setting the --device
type option will fix this
[root@fst-3 ~]# smartctl --health --device=scsi /dev/mapper/mpathaa
smartctl 7.0 2018-12-30 r4883 [x86_64-linux-3.10.0-1160.el7.x86_64] (local build)
Copyright (C) 2002-18, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF READ SMART DATA SECTION ===
SMART Health Status: OK
[...]
This patch intends to enable smatctl support for multipath devices on Linux, by adressing 1) and 2).