klausmedk
September 9th, 2013, 08:57 PM
Hello
I wanted to test drive failure on my raid1 array.
My array initially looked like this:
/dev/md1p1:
Version : 1.0
Creation Time : Thu Mar 22 15:55:42 2012
Raid Level : raid1
Array Size : 2930265407 (2794.52 GiB 3000.59 GB)
Used Dev Size : unknown
Raid Devices : 2
Total Devices : 2
Persistence : Superblock is persistent
Update Time : Mon Sep 9 21:17:32 2013
State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0
Name : HEV271-NAS:1
UUID : 24f6612a:f9045c3c:a09823be:0a00399b
Events : 18353
Number Major Minor RaidDevice State
0 8 32 0 active sync /dev/sdc
1 8 48 1 active sync /dev/sdd
I then set /dev/sdd faulty and removed it with:
mdadm --manage --set-faulty /dev/md1p1 /dev/sdd
mdadm /dev/md1p1 -r /dev/sdd
Then I wanted to re-add the device with:
mdadm /dev/md1p1 -a /dev/sdd
But got the response: mdadm: /dev/sdd not large enough to join array
Why is that? It's the same disk that was in the array just a second ago?
The detailts for the disks are:
sudo fdisk -l /dev/sdc
WARNING: GPT (GUID Partition Table) detected on '/dev/sdc'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sdc: 3000.6 GB, 3000592982016 bytes
255 heads, 63 sectors/track, 364801 cylinders, total 5860533168 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/sdc1 1 4294967295 2147483647+ ee GPT
Partition 1 does not start on physical sector boundary.
sudo fdisk -l /dev/sdd
WARNING: GPT (GUID Partition Table) detected on '/dev/sdd'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sdd: 3000.6 GB, 3000592982016 bytes
255 heads, 63 sectors/track, 364801 cylinders, total 5860533168 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/sdd1 1 4294967295 2147483647+ ee GPT
Partition 1 does not start on physical sector boundary.
What have I done wrong?
What can I do to correct my mistake without losing data?
Regards
Klaus
I wanted to test drive failure on my raid1 array.
My array initially looked like this:
/dev/md1p1:
Version : 1.0
Creation Time : Thu Mar 22 15:55:42 2012
Raid Level : raid1
Array Size : 2930265407 (2794.52 GiB 3000.59 GB)
Used Dev Size : unknown
Raid Devices : 2
Total Devices : 2
Persistence : Superblock is persistent
Update Time : Mon Sep 9 21:17:32 2013
State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0
Name : HEV271-NAS:1
UUID : 24f6612a:f9045c3c:a09823be:0a00399b
Events : 18353
Number Major Minor RaidDevice State
0 8 32 0 active sync /dev/sdc
1 8 48 1 active sync /dev/sdd
I then set /dev/sdd faulty and removed it with:
mdadm --manage --set-faulty /dev/md1p1 /dev/sdd
mdadm /dev/md1p1 -r /dev/sdd
Then I wanted to re-add the device with:
mdadm /dev/md1p1 -a /dev/sdd
But got the response: mdadm: /dev/sdd not large enough to join array
Why is that? It's the same disk that was in the array just a second ago?
The detailts for the disks are:
sudo fdisk -l /dev/sdc
WARNING: GPT (GUID Partition Table) detected on '/dev/sdc'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sdc: 3000.6 GB, 3000592982016 bytes
255 heads, 63 sectors/track, 364801 cylinders, total 5860533168 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/sdc1 1 4294967295 2147483647+ ee GPT
Partition 1 does not start on physical sector boundary.
sudo fdisk -l /dev/sdd
WARNING: GPT (GUID Partition Table) detected on '/dev/sdd'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sdd: 3000.6 GB, 3000592982016 bytes
255 heads, 63 sectors/track, 364801 cylinders, total 5860533168 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/sdd1 1 4294967295 2147483647+ ee GPT
Partition 1 does not start on physical sector boundary.
What have I done wrong?
What can I do to correct my mistake without losing data?
Regards
Klaus