mdadm error when trying to replace a failed drive in RAID5 array
Quoted 7 lines
-----Original Message-----
From: Neil Brown [mailto:[email protected]]
Sent: 20 January 2008 20:37Quoted 2 lines
md: hdd1 has invalid sb, not importing!
md:md_import_devicereturned -22
Quoted 7 lines
In 2.6.18, the only thing that can return this message without other more explanatory messages are:
2/ If the device appears to be too small.
Maybe it is the later, though that seems unlikely.
[root@space ~]# mdadm /dev/md0 --verbose --add /dev/hdd1
mdadm: added /dev/hdd1
HUGE thanks to Neil, and one white gold plated donkey award to me.
OK. When I created /dev/md1 after creating /dev/md0, I was using a mishmash of disks I had lying around. As this selection of disks used differing block sizes, I chose to create the raid partitions from the first block, to a set size (+250G). When I reinstalled the disk for going into /dev/md0, I partitioned the disk the same way (+500G), which it turns out isn't how I created the partitions when I created that array.
So the device I was trying to add was about 22 blocks too small. Taking Neils suggestion and looking at /proc/partitions showed this up incredibly quickly.
My sincere apologies for wasting all your time on a stupid error, and again many many thanks for the solution...
md0 : active raid5 hdd1[5] sdd1[4] sdc1[2] sdb1[1] sda1[0]
1953535744 blocks level 5, 64k chunk, algorithm 2 [5/4] [UUU_U]
[>....................] recovery = 0.9% (4430220/488383936)finish=1110.8min speed=7259K/sec
Steve.
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.516 / Virus Database: 269.19.7/1233 - Release Date:
19/01/2008 18:37
Quoted 3 lines · Steve Fairbairn
So the device I was trying to add was about 22 blocks too small. Taking Neils suggestion and looking at
/proc/partitionsshowed this up incredibly quickly.
Always leave a little space in the end; it makes sure you don't run into that particular problem when you replace disks and the end of the disk is often significantly slower anyway.
From before the write-intent bitmap stuff I have/had a habit of creating separate raids on relatively small partitions (joined together by LVM). I'd just pick a fixed size (on 500GB disks I'd use 90GB per partition for example) and create however many partitions would fit like that and leave the end for scratch space / experiments / whatever.
- ask
Signature · 1 line
http://develooper.com/ - http://askask.com/