I had some recent computer issues and somehow one of my disks ended up not being recognized in my array anymore. It identifies fine, and both smart and some other disk checking utils all say its fine, but somehow the UUID is different.

as a result, mdadm says there is a 'removed' disk. Ideally I'd like to just update it so that it detects it again, but since this is raid-5 I don't see why I couldn't just remove it from the array and then re-add it and let it rebuild.

unfortuntely every command I see wants me to refer to it as a device when removing it, but as far as md is concerned its just a uuid that is no longer available. How can I remove a disk that is currently set as "removed"?

-- Edit: More info, as requested. I'm currently running in an ubuntu live cd without networking, so these are hand typed. Sorry if theres any spacing issues.

Personalities : [raid0] [raid1] [raid6] [raid5] [raid4]
md0 : inactive sdd1[0] sdc[3] sde1[1]
       3907034368 blocks

mdadm --detail /dev/md0
Version : 00.90
Creation Time : Wed May 26 22:59:21 2004
Raid Level : raid5
Used Dev Size : 976759936 (931.51 GiB 1000.20 GB)
Raid Devices: 4
Total Devices: 3
Prefered Minor : 0
Persistence: Superblock is persistent

Update Time: Sat Nov 27 1:03:17 2010
State : active, degraded, Not Started
Active Devices: 3
Working Devices: 3
Failed Devices: 0
Spare Devices: 0

Layout : left-symmetric
Chunk Size: 64K

UUID: 5a4d2b61:9c5c6ad5:aea414d0:5f8dbc13
Events: 0.2169805

Number Major Minor Raiddevice State
     0     8    49  0          active sync /dev/sdd1
     1     8    65  1          active sync /dev/sde1
     2     0    0   2          removed
     3     8    32  3          active sync /dev/sdc
  • Can you please provide mode details possibly from "cat /proc/mdadm" and "mdadm --detail /dev/mdx"? – Khaled Nov 27 '10 at 10:54
  • Updated with that info – semi Nov 27 '10 at 11:09
  • Did you try "mdadm /dev/md0 --re-add /dev/sdb1"? Check your drive name /dev/sda or /dev/sdb. – Khaled Nov 27 '10 at 13:03
  • It adds it as a spare, leaving the old removed entry – semi Nov 27 '10 at 19:15
  • I force started it and it seems to be syncing now, we'll know if this worked for sure or not in 10 days. – semi Nov 27 '10 at 20:04

Run the following commands on the removed device:

mdadm --zero-superblock /dev/sdXn
mdadm /dev/md0 --add /dev/sdXn

The first command wipes away the old superblock from the removed disk (or disk partition) so that it can be added back to raid device for rebuilding. Make sure that you run this command on the correct device!!

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.