Hello, On Fri, Feb 16, 2024 at 01:16:59AM -0500, gene heskett wrote: > On 2/15/24 16:20, Andy Smith wrote: > > Suppose you have the MD array /dev/md42. What are you conceptually > > wanting to do with that in relation to labels of some kind? What > > information is it that you want? > > > > Support you have LVM logical volume /dev/myvg/mylv. What are you > > conceptually wanting to do with that in relation to labels of some > > kind? What information is it that you want? > > > I want to know with absolute certainty, with of the 4 drives in that raid10, > actually has a belly ache. When it has a belly ache.
So this is an example of you moving the goal posts. You started off by saying you needed to identify something just from the array device name, but now you say you need to identify which drive in the array has a problem (exact problem not specified). The /proc/mdstats file shows all the devices that are in all the MD arrays. Any time the kernel has problems with a device it logs the name of the actual device (not the array etc.) in the system log. If the problems are bad enough then the MD driver notices and removes the device from the array. This is normal-looking content of /proc/mdstat: $ cat /proc/mdstat Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4] [raid10] md1 : active raid1 sda3[1] nvme0n1p3[0] 243316736 blocks super 1.2 [2/2] [UU] bitmap: 1/2 pages [4KB], 65536KB chunk Where it says [UU] it would say [_U] or [U_] if one of those devices had been removed, and in the list of devices the one that's failed would have an (F) after it. But I'm fairly sure that in all your posts about your RAID-10 people have been through this with you multiple times, so this must not actually be the information that you are after. Furthermore I do not understand how your idea of labelling drives (or partitions or filesystems) would ever give you this information even if it had worked. If you mean that you have system logs that say for example that sda1 has problems, and you want to find out what sda1 actually is, well I already showed you one way: by looking in /dev/disk/by-id/. There's also "smartctl -i /dev/sda", and others have posted other ways. If you don't mean that, then tell us what actual information you are starting from, and what you hope to get from there. "My array has problems, how do I find the problem drive within it" is too vague because we don't know what "my array has problems" actually means. Thanks, Andy -- https://bitfolk.com/ -- No-nonsense VPS hosting