How can I tell which drive in my software raid is bad

Posted on 2009-12-21
Last Modified: 2013-12-06
When I do a cat /proc/mdstat I get the following results.

# cat /proc/mdstat
Personalities : [raid6] [raid5] [raid4]
md0 : active raid5 sdd1[4] sdc1[2] sdb1[1] sda1[0]
      4395407808 blocks level 5, 64k chunk, algorithm 2 [4/3] [UUU_]
      [===========>.........]  recovery = 59.5% (871892528/1465135936) finish=949.8min speed=10408K/sec

unused devices: <none>

The question is do the [UUU_] flags match the drives in the order displayed sdd1[4] sdc1[2] sdb1[1] sda1[0]?

If so then sda1 is the bad drive in this scenario, or do I look at the number after the drive device in this case the [4] position would indicate sdd1 as the bad drive.

Thank you in advance.
Question by:PowerToaster
    LVL 5

    Accepted Solution

    Try run a
    mdadm --query --detail /dev/md0

    That should give you the info you are after.  Although it appears from your screendump that the array is ok and is merely recovering from a disk failure?
    LVL 2

    Author Closing Comment

    Exactly right, on all counts. The query detail gave me exactly the info I needed.

    And you are correct the array is just fine and just rebuilding a spare.

    Thank you

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Suggested Solutions

    Problem description :  Some external hard disks / USB flash drives do not show actual space as mentioned in the factory settings. This is a common problem when you use an 8 GB USB drive to make it bootable to install a firmware/ driver on a serv…
    AWS Glacier is Amazons cheapest storage option and is their answer to a ‘Cold’ storage service.  Customers primarily use this service for archival purposes and storage of infrastructure backups.  Its unlimited storage potential and low storage cost …
    This video teaches viewers how to encrypt an external drive that requires a password to read and edit the drive. All tasks are done in Disk Utility. Plug in the external drive you wish to encrypt: Make sure all previous data on the drive has been …
    This tutorial will walk an individual through the process of installing the necessary services and then configuring a Windows Server 2012 system as an iSCSI target. To install the necessary roles, go to Server Manager, and select Add Roles and Featu…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now