Find your RAID MD Device Name from a Member Device
So you've got a bajillion RAID arrays; that's okay, really. Thing is, if you need to find its mdX device, it can get tricky. vGrep taxing the eyes? Mine too, and I haven't had much luck with an alternative. I know there's one out there, but I have yet to trip over it.
Here's what I've started doing:
Here's what I've started doing:
mdadm --detail --scan |\Substitute in your own values for /dev/sde3.
awk '/'`mdadm -E /dev/sde3|awk '/UUID/{print $NF}'`'/{print $2}'
/dev/md6
<< Home