two days ago one of my two drives in my software RAID 1 (that was setup using gnome-disks) configuration failed. I could not access the files in the meantime. After short research it seems that I have to replace the failed disk and rebuild the RAID to access my files again. So no problem today I got my replacement disk, removed the old broken drive from the raid and tried to add the new drive to the disk.
(Before I copied the partition layout from the working drive with: sfdisk -d /dev/sdb | sfdisk /dev/sda
)
When I try to add a new disk to my RAID (that shows up in my gnome-disks) with mdadm —manage /dev/md0 —add /dev/sda
, I run into this error:
mdadm: Cannot get array info for /dev/md0
The same thing happens to basically any operation using mdadm
on my /dev/md0.
How can I get my RAID back working?
Some info:
Ubuntu 15.04 (64bit)
mdadm --version
mdadm - v3.3 - 3rd September 2013
uname -a
Linux Z97X 3.19.0-27-generic #29-Ubuntu SMP Fri Aug 14 21:43:37 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md0 : inactive sdb[0](S)
976627383 blocks super 1.2
unused devices: <none>
mdadm -D /dev/md0
/dev/md0:
Version : 1.2
Raid Level : raid0
Total Devices : 1
Persistence : Superblock is persistent
State : inactive
Name : PC:0
UUID : XXXXXXXX:7af47836:XXXXXXX:d7360235
Events : 3569
Number Major Minor RaidDevice
- 8 16 - /dev/sdb
Why is Raid Level : raid0 when I setup this as raid1 in gnome-disks / it's shown as raid1 in gnome disks?
And one question in general: My understanding when I put up my RAID 1 was that if one disk fails I can still access my data because data is mirrored. But when the disk failed this was obviously not the case. Why? Is my understanding of RAID 1 wrong?