I have a software RAID 10 configuration with a couple of failing drives. I bought replacement drives that have the same model number and same firmware version and installed them. First I used fdisk to create a primary partition (all the other drives have one large partition that takes up the entire disk). However, this results in the partition being one cylinder less than the other partitions, making it too small to join the RAID array. Since we needed the array rebuilt ASAP, I deleted the partition and added the block device to the array instead. So far it appears to be working but it makes me nervous knowing that the system is not configured exactly as it was prior to the disk failure.
Code:
root@gluster1:~# mdadm -D /dev/md0
/dev/md0:
Version : 00.90
Creation Time : Fri Nov 25 20:01:48 2011
Raid Level : raid10
Array Size : 2930282304 (2794.54 GiB 3000.61 GB)
Used Dev Size : 976760768 (931.51 GiB 1000.20 GB)
Raid Devices : 6
Total Devices : 6
Preferred Minor : 0
Persistence : Superblock is persistent
Update Time : Mon Jun 11 13:23:21 2012
State : active
Active Devices : 6
Working Devices : 6
Failed Devices : 0
Spare Devices : 0
Layout : near=2, far=1
Chunk Size : 64K
UUID : 71a08ee6:fb932da8:47410f7e:e8606d18
Events : 0.18217457
Number Major Minor RaidDevice State
0 8 1 0 active sync /dev/sda1
1 8 17 1 active sync /dev/sdb1
2 8 32 2 active sync /dev/sdc
3 8 49 3 active sync /dev/sdd1
4 8 64 4 active sync /dev/sde
5 8 81 5 active sync /dev/sdf1
root@gluster1:~# fdisk -l /dev/sdb
Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00097d47
Device Boot Start End Blocks Id System
/dev/sdb1 1 121602 976760832 fd Linux raid autodetect
root@gluster1:~# fdisk -l /dev/sdc
Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/sdc doesn't contain a valid partition table
Note that both /dev/sdb and /dev/sdc have 121601 cylinders. /dev/sdb has a partition that ends on cylinder 121602 but if I create a partition on /dev/sdc and use the default (maximum) values, it ends on cylinder 121601. Why isn't it identical to the other drives? As I said earlier, these new disks are the same model number and have the same firmware version as the existing disks.