Update md_iostat_ for '--write-mostly' drives

Doesn't work with '--write-mostly' drives like sde1 in : 
     md94 : active raid1 sde1[1](W)(S) sdd1[2]
I assume to remove everything behind the opening bracket
This commit is contained in:
trollagit 2023-05-03 16:59:45 +02:00 committed by GitHub
parent 863d326b7a
commit ba6595ff2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -130,7 +130,7 @@ while (<MD>) {
# Remove unwanted things like raid device number, partition number
# and sort nicely.
@devs = sort by_dev map { s/\d*\[.*\]$//; $_; } @devs;
@devs = sort by_dev map { s/\d*\[.*$//; $_; } @devs;
# Insert the raid device into the mix.
unshift(@devs,$md);