Hello,
A few days ago I received a SMART error on one of the drives in my raid so I removed the drive and had a replacement (it was still under warranty) sent to me. Yesterday I attempted to add the new drive to the raid array and goofed up. I believe my issue was with the partitioning of the new drive.
The raid array is raid5 and is made up of five 2 TB drives. /dev/sdc is the drive that failed. Last night the raid was working but missing the failed drive. I partitioned the new drive and ran "mdadm --add /dev/md0 /dev/sdc". The process ran and this morning when I checked the status it showed two failed drives and the raid no longer working.
Below is the current mdadm --detail:
Code:
#sudo mdadm --detail /dev/md0
/dev/md0:
Version : 0.90
Creation Time : Fri Dec 31 17:20:12 2010
Raid Level : raid5
Array Size : 7814047744 (7452.06 GiB 8001.58 GB)
Used Dev Size : 1953511936 (1863.01 GiB 2000.40 GB)
Raid Devices : 5
Total Devices : 4
Preferred Minor : 0
Persistence : Superblock is persistent
Update Time : Thu Apr 18 07:43:28 2013
State : clean, FAILED
Active Devices : 3
Working Devices : 3
Failed Devices : 1
Spare Devices : 0
Layout : left-symmetric
Chunk Size : 256K
UUID : 99f44a81:c204bc31:cced5de7:ca715931 (local to host NAS)
Events : 0.63481
Number Major Minor RaidDevice State
0 8 65 0 active sync /dev/sde1
1 8 17 1 active sync /dev/sdb1
2 0 0 2 removed
3 0 0 3 removed
4 8 81 4 active sync /dev/sdf1
5 8 1 - faulty spare /dev/sda1
And the current fdisk -l:
Code:
#sudo fdisk -l
Disk /dev/sda: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xa2a226e5
Device Boot Start End Blocks Id System
/dev/sda1 * 63 3907024064 1953512001 fd Linux raid autodetect
Disk /dev/sdc: 2000.4 GB, 2000398934016 bytes
81 heads, 63 sectors/track, 765633 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00064ce9
Device Boot Start End Blocks Id System
/dev/sdc1 2048 3907029167 1953513560 fd Linux raid autodetect
Disk /dev/sdd: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000e80a1
Device Boot Start End Blocks Id System
/dev/sdd1 2048 499711 248832 83 Linux
/dev/sdd2 501758 488396799 243947521 5 Extended
/dev/sdd5 501760 488396799 243947520 8e Linux LVM
Disk /dev/sde: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xc744f265
Device Boot Start End Blocks Id System
/dev/sde1 63 3907024064 1953512001 fd Linux raid autodetect
WARNING: GPT (GUID Partition Table) detected on '/dev/sdf'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sdf: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdf1 64 3907029167 1953514552 fd Linux raid autodetect
Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x086bff60
Device Boot Start End Blocks Id System
/dev/sdb1 63 3907024064 1953512001 fd Linux raid autodetect
Disk /dev/md0: 8001.6 GB, 8001584889856 bytes
2 heads, 4 sectors/track, 1953511936 cylinders, total 15628095488 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 262144 bytes / 1048576 bytes
Disk identifier: 0x00000000
Disk /dev/md0 doesn't contain a valid partition table
Disk /dev/mapper/NAS-root: 245.6 GB, 245647802368 bytes
255 heads, 63 sectors/track, 29864 cylinders, total 479780864 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/NAS-root doesn't contain a valid partition table
Disk /dev/mapper/NAS-swap_1: 4148 MB, 4148166656 bytes
255 heads, 63 sectors/track, 504 cylinders, total 8101888 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/NAS-swap_1 doesn't contain a valid partition table
As you can see, the new drive (/dev/sdc) was not properly added to the raid and now /dev/sda is showing as "faulty spare". Can I simply run the following to rebuild the array minus the missing disk and then attempt to add /dev/sdc again?
Code:
#mdadm --stop /dev/md0
#mdadm --assemble /dev/md0 /dev/sd[a,b,c,e,f]1
Thank you in advance,
-Kendall
Bookmarks