I have a Debian Jessie box that lost the RAID volume that had the OS, so I booted Live USB to try to recover the attached SAS controlled external drive bay which has my data RAID6 and it sees 3 of the 4 like:
>: cat /proc/mdstat
Personalities :
md0 : inactive sda1[0](S) sdc1[2](S) sdb1[1](S)
11718349824 blocks super 1.2
unused devices: <none>
and again:
>: mdadm -D /dev/md0
/dev/md0:
Version : 1.2
Raid Level : raid0
Total Devices : 3
Persistence : Superblock is persistent
State : inactive
Name : backup1:0
UUID : a7946015:259ae101:1fed525f:5766e9d5
Events : 381
Number Major Minor RaidDevice
- 8 1 - /dev/sda1
- 8 17 - /dev/sdb1
- 8 33 - /dev/sdc1
So it thinks it's a weird RAID0? Is there a way to tell it to use this as a RAID6 again, but not delete data and not mark drives as spares? I'm thinking something like:
mdadm --stop /dev/md0
mdadm --create /dev/md0 --level=6 --raid-devices=4 --chunk=64 --name=backup1:0 /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1 --assume-clean
even though /dev/sdd1 isn't being shown. It almost seems like I need to re-assemble with some flags to avoid rewriting data, or manually remove/add each disk from md0 (but you need multiple disks for RAID6 so how do you do that?) fdisk for /dev/sdd shows:
Disk /dev/sdd: 3.7 TiB, 3999999721472 bytes, 7812499456 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
Disklabel type: gpt
Disk identifier: 27419FEB-5830-4C44-9DC9-00828D0F115A
Device Start End Sectors Size Type
/dev/sdd1 2048 7812497407 7812495360 3.7T Linux RAID
So there's a raid partition there like I expect, though when I examine it, it shows:
mdadm --examine /dev/sdd1
mdadm: No md superblock detected on /dev/sdd1.
unlike other drives:
mdadm --examine /dev/sdc1
/dev/sdc1:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x1
Array UUID : a7946015:259ae101:1fed525f:5766e9d5
Name : backup1:0
Creation Time : Tue Jul 19 17:34:55 2016
Raid Level : raid6
Raid Devices : 4
Avail Dev Size : 7812233216 (3725.16 GiB 3999.86 GB)
Array Size : 7812233216 (7450.33 GiB 7999.73 GB)
Data Offset : 262144 sectors
Super Offset : 8 sectors
Unused Space : before=262056 sectors, after=0 sectors
State : active
Device UUID : 4d1d775e:eef629d4:03f15e09:f1762443
Internal Bitmap : 8 sectors from superblock
Update Time : Tue Jul 19 18:17:36 2016
Bad Block Log : 512 entries available at offset 72 sectors
Checksum : 8365777c - correct
Events : 381
Layout : left-symmetric
Chunk Size : 512K
Device Role : Active device 2
Array State : AAAA ('A' == active, '.' == missing, 'R' == replacing)
I guess during the rebuild it could repair /dev/sdd1? Am I approaching this right? I don't want to overwrite data basically.