You are not logged in.

#1 2017-10-23 10:21:34

Pr0Wolf29
Member
Registered: 2012-03-30
Posts: 25

[SOLVED] Encrypted RAID 1 mdadm no longer recognized

I had a motherboard failure causing the system to reboot over and over again. Now my drives show it's a RAID 1 but doesn't see the LUKs on it. The drives appear to be fine otherwise. Any way I can fix? I have the passwords still. Happened on Arch and Ubuntu.

Last edited by Pr0Wolf29 (2017-10-25 00:02:17)

Offline

#2 2017-10-23 11:01:58

frostschutz
Member
Registered: 2013-11-15
Posts: 1,409

Re: [SOLVED] Encrypted RAID 1 mdadm no longer recognized

Provide more info.

file -s /dev/sd* /dev/md*

mdadm --examine /dev/sd*

cryptsetup luksDump /dev/md*

You need a valid LUKS header. If it's damaged, that's the end of it.

Last edited by frostschutz (2017-10-23 11:02:23)

Offline

#3 2017-10-23 14:28:12

Pr0Wolf29
Member
Registered: 2012-03-30
Posts: 25

Re: [SOLVED] Encrypted RAID 1 mdadm no longer recognized

I'll collect the output after work. If I don't have a LUKs header, can I use one from a drive that is the same size and key?

Offline

#4 2017-10-23 20:08:33

Pr0Wolf29
Member
Registered: 2012-03-30
Posts: 25

Re: [SOLVED] Encrypted RAID 1 mdadm no longer recognized

/dev/sda:   DOS/MBR boot sector
/dev/sda1:  Linux/i386 swap file (new style), version 1 (4K pages), size 1572863 pages, no label, UUID=32c2cdf2-255a-4988-a8fd-10a895ad44a5
/dev/sda2:  Linux rev 1.0 ext4 filesystem data, UUID=193eaf09-cedf-4213-a937-172c2de55f02 (needs journal recovery) (extents) (64bit) (large files) (huge files)
/dev/sdb:   Linux Software RAID version 1.2 (1) UUID=852880c8:c65f1ebc:b487cbe4:7afc00b6 name=Server2:6 level=1 disks=2
/dev/sdc:   Linux Software RAID version 1.2 (1) UUID=852880c8:c65f1ebc:b487cbe4:7afc00b6 name=Server2:6 level=1 disks=2
/dev/md127: empty
/dev/sda:
   MBR Magic : aa55
Partition[0] :     12582912 sectors at         2048 (type 82)
Partition[1] :    475812208 sectors at     12584960 (type 83)
/dev/sdb:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x0
     Array UUID : 852880c8:c65f1ebc:b487cbe4:7afc00b6
           Name : Server2:6
  Creation Time : Tue Jun  7 21:33:55 2016
     Raid Level : raid1
   Raid Devices : 2

 Avail Dev Size : 7813775024 (3725.90 GiB 4000.65 GB)
     Array Size : 3906887488 (3725.90 GiB 4000.65 GB)
  Used Dev Size : 7813774976 (3725.90 GiB 4000.65 GB)
    Data Offset : 262144 sectors
   Super Offset : 8 sectors
   Unused Space : before=262056 sectors, after=48 sectors
          State : clean
    Device UUID : 6f0a14b1:6ac2863b:ab131547:ae6c4f5b

    Update Time : Sun Oct 22 11:50:57 2017
  Bad Block Log : 512 entries available at offset 72 sectors
       Checksum : 5cc6b9cd - expected 5cc6b9cc
         Events : 34556


   Device Role : Active device 0
   Array State : AA ('A' == active, '.' == missing, 'R' == replacing)
/dev/sdc:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x1
     Array UUID : 852880c8:c65f1ebc:b487cbe4:7afc00b6
           Name : Server2:6
  Creation Time : Tue Jun  7 21:33:55 2016
     Raid Level : raid1
   Raid Devices : 2

 Avail Dev Size : 7813775024 (3725.90 GiB 4000.65 GB)
     Array Size : 3906887488 (3725.90 GiB 4000.65 GB)
  Used Dev Size : 7813774976 (3725.90 GiB 4000.65 GB)
    Data Offset : 262144 sectors
   Super Offset : 8 sectors
   Unused Space : before=262056 sectors, after=48 sectors
          State : clean
    Device UUID : d35cab6e:2f03e8ee:e88d8011:9646ff68

Internal Bitmap : 8 sectors from superblock
    Update Time : Sun Oct 22 11:50:57 2017
  Bad Block Log : 512 entries available at offset 72 sectors
       Checksum : a5daa11c - correct
         Events : 34556


   Device Role : Active device 1
   Array State : AA ('A' == active, '.' == missing, 'R' == replacing)
cryptsetup luksDump /dev/md*

Showed nothing

Edit:
I Googled how to find a LUKS header, and stumbled upon this post showing how to find the header: https://ubuntuforums.org/showthread.php … st10228047 Later in the thread, I found this this post by frostschutz (who replied in this thread earlier, though the post he made is 7 years ago) and was able to mount by the offset. I'm so glad, nearly lost many TBs of stuff,

Last edited by Pr0Wolf29 (2017-10-25 00:01:24)

Offline

Board footer

Powered by FluxBB