
On Mon, May 21, 2018 at 12:16:18AM +1000, Russell Coker wrote:
One recent thing I've done is to fork the "mon" monitoring system and significantly improve a lot of the monitoring scripts. [...] /proc/mdstat doesn't have the UUID of the RAID array, so checking by UUID would add some overhead to the process. Would that be a useful feature?
probably, sounds useful but I'm not using mon at the moment. BTW, I mostly use blkid when I need to find out a UUID or LABEL. Very parseable output format, and you can use '-o' and '-s' to get only the field(s) you want. e.g. # blkid -o value -s UUID /dev/md0 833b973d-500a-40af-833c-22f40ebae75b or # blkid -s TYPE -s UUID /dev/nvme1n1p3: UUID="b0483380-ca6f-abb3-aeeb-94793439a630" TYPE="linux_raid_member" /dev/nvme1n1p4: UUID="3da01c47-78ea-4959-9fdd-49c5b3b8bb3c" TYPE="swap" /dev/nvme1n1p5: UUID="1278363117254169428" TYPE="zfs_member" /dev/nvme0n1p3: UUID="b0483380-ca6f-abb3-aeeb-94793439a630" TYPE="linux_raid_member" /dev/nvme0n1p4: UUID="990a9dbf-0679-4b94-8af9-ba961bb2fb0a" TYPE="swap" /dev/nvme0n1p5: UUID="1278363117254169428" TYPE="zfs_member" /dev/md0: UUID="833b973d-500a-40af-833c-22f40ebae75b" TYPE="ext4" lsblk is also useful, but I find blkid's output easier to use in shell scripts. craig -- craig sanders <cas@taz.net.au>