2

Edit: Both /dev/sdd and /dev/sde are missing super blocks. I assume this cannot be fixed. I am whipping the drives and starting over.

I just finished coping 8TB worth of data to a new raid5 array. I just turned off TPM in my bios, and this array was no longer readable. I would like to fix this rather than starting over. I tried to reassemble it, and got this error.

$ sudo mdadm --assemble /dev/md0 /dev/sda /dev/sdb /dev/sdd /dev/sde -f
mdadm: No super block found on /dev/sdd (Expected magic a92b4efc, got 00000000)
mdadm: no RAID superblock on /dev/sdd
mdadm: /dev/sdd has no superblock - assembly aborted

Here's what examining /sdd resulted in.

$sudo mdadm -E /dev/sdd
/dev/sdd:
   MBR Magic : aa55
Partition[0] :   4294967295 sectors at            1 (type ee)

Here's some more diagnostics:

sudo mdadm --examine /dev/sd*
/dev/sda:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x1
     Array UUID : 7844a579:00996056:06c4e1dd:0e70ebcb
           Name : scott-LinuxMint:0  (local to host scott-LinuxMint)
  Creation Time : Thu Jan  2 12:50:26 2025
     Raid Level : raid5
   Raid Devices : 4

 Avail Dev Size : 7813772976 sectors (3.64 TiB 4.00 TB)
     Array Size : 11720659392 KiB (10.92 TiB 12.00 TB)
  Used Dev Size : 7813772928 sectors (3.64 TiB 4.00 TB)
    Data Offset : 264192 sectors
   Super Offset : 8 sectors
   Unused Space : before=264112 sectors, after=48 sectors
          State : clean
    Device UUID : 0febcd7e:7581f3c8:7b5962c5:cbddee7c

Internal Bitmap : 8 sectors from superblock
    Update Time : Fri Jan  3 22:05:37 2025
  Bad Block Log : 512 entries available at offset 24 sectors
       Checksum : 852d7efe - correct
         Events : 6116

         Layout : left-symmetric
     Chunk Size : 64K

   Device Role : Active device 0
   Array State : AAAA ('A' == active, '.' == missing, 'R' == replacing)
/dev/sdb:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x1
     Array UUID : 7844a579:00996056:06c4e1dd:0e70ebcb
           Name : scott-LinuxMint:0  (local to host scott-LinuxMint)
  Creation Time : Thu Jan  2 12:50:26 2025
     Raid Level : raid5
   Raid Devices : 4

 Avail Dev Size : 7813772976 sectors (3.64 TiB 4.00 TB)
     Array Size : 11720659392 KiB (10.92 TiB 12.00 TB)
  Used Dev Size : 7813772928 sectors (3.64 TiB 4.00 TB)
    Data Offset : 264192 sectors
   Super Offset : 8 sectors
   Unused Space : before=264112 sectors, after=48 sectors
          State : clean
    Device UUID : d2280c55:cf16ae93:aaa5e4a0:71e30dbb

Internal Bitmap : 8 sectors from superblock
    Update Time : Fri Jan  3 22:05:37 2025
  Bad Block Log : 512 entries available at offset 24 sectors
       Checksum : 3fc7a3f1 - correct
         Events : 6116

         Layout : left-symmetric
     Chunk Size : 64K

   Device Role : Active device 1
   Array State : AAAA ('A' == active, '.' == missing, 'R' == replacing)
/dev/sdc:
   MBR Magic : aa55
Partition[0] :   4294967295 sectors at            1 (type ee)
/dev/sdc1:
   MBR Magic : aa55
Partition[0] :   1836016416 sectors at   1936269394 (type 4f)
Partition[1] :    544437093 sectors at   1917848077 (type 73)
Partition[2] :    544175136 sectors at   1818575915 (type 2b)
Partition[3] :        54974 sectors at   2844524554 (type 61)
/dev/sdd:
   MBR Magic : aa55
Partition[0] :   4294967295 sectors at            1 (type ee)
mdadm: No md superblock detected on /dev/sdd1.
/dev/sde:
   MBR Magic : aa55
Partition[0] :   4294967295 sectors at            1 (type ee)
mdadm: No md superblock detected on /dev/sde1.

And the drive seems healthy.

$sudo smartctl -d ata -a /dev/sdd
smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.8.0-51-generic] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Seagate Skyhawk
Device Model:     ST4000VX007-2DT166
Serial Number:    ZDH61N4Z
LU WWN Device Id: 5 000c50 0b4cf0507
Firmware Version: CV11
User Capacity:    4,000,787,030,016 bytes [4.00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    5980 rpm
Form Factor:      3.5 inches
Device is:        In smartctl database 7.3/5528
ATA Version is:   ACS-3 T13/2161-D revision 5
SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Fri Jan  3 23:01:40 2025 EST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x82) Offline data collection activity
                    was completed without error.
                    Auto Offline Data Collection: Enabled.
Self-test execution status:      (   0) The previous self-test routine completed
                    without error or no self-test has ever 
                    been run.
Total time to complete Offline 
data collection:        (  591) seconds.
Offline data collection
capabilities:            (0x7b) SMART execute Offline immediate.
                    Auto Offline data collection on/off support.
                    Suspend Offline collection upon new
                    command.
                    Offline surface scan supported.
                    Self-test supported.
                    Conveyance Self-test supported.
                    Selective Self-test supported.
SMART capabilities:            (0x0003) Saves SMART data before entering
                    power-saving mode.
                    Supports SMART auto save timer.
Error logging capability:        (0x01) Error logging supported.
                    General Purpose Logging supported.
Short self-test routine 
recommended polling time:    (   1) minutes.
Extended self-test routine
recommended polling time:    ( 633) minutes.
Conveyance self-test routine
recommended polling time:    (   2) minutes.
SCT capabilities:          (0x50bd) SCT Status supported.
                    SCT Error Recovery Control supported.
                    SCT Feature Control supported.
                    SCT Data Table supported.

SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x000f   075   064   044    Pre-fail  Always       -       30305794
  3 Spin_Up_Time            0x0003   094   093   000    Pre-fail  Always       -       0
  4 Start_Stop_Count        0x0032   100   100   020    Old_age   Always       -       276
  5 Reallocated_Sector_Ct   0x0033   100   100   010    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x000f   095   060   045    Pre-fail  Always       -       3166340513
  9 Power_On_Hours          0x0032   069   069   000    Old_age   Always       -       27536h+49m+43.964s
 10 Spin_Retry_Count        0x0013   100   100   097    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   020    Old_age   Always       -       104
184 End-to-End_Error        0x0032   100   100   099    Old_age   Always       -       0
187 Reported_Uncorrect      0x0032   100   100   000    Old_age   Always       -       0
188 Command_Timeout         0x0032   100   099   000    Old_age   Always       -       7864440
189 High_Fly_Writes         0x003a   100   100   000    Old_age   Always       -       0
190 Airflow_Temperature_Cel 0x0022   081   047   040    Old_age   Always       -       19 (Min/Max 19/19)
191 G-Sense_Error_Rate      0x0032   100   100   000    Old_age   Always       -       0
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       117
193 Load_Cycle_Count        0x0032   099   099   000    Old_age   Always       -       2608
194 Temperature_Celsius     0x0022   019   053   000    Old_age   Always       -       19 (0 6 0 0 0)
197 Current_Pending_Sector  0x0012   100   100   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0010   100   100   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x003e   200   200   000    Old_age   Always       -       0
240 Head_Flying_Hours       0x0000   100   253   000    Old_age   Offline      -       27376h+00m+21.311s
241 Total_LBAs_Written      0x0000   100   253   000    Old_age   Offline      -       247975821685
242 Total_LBAs_Read         0x0000   100   253   000    Old_age   Offline      -       124682775664

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
No self-tests have been logged.  [To run self-tests, use: smartctl -t]

SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.

The above only provides legacy SMART information - try 'smartctl -x' for more

Let me know if you can help. I am very new to this.

Edit: added this fdisk test. I do have another unrelated drive, /dev/sdc.

$ sudo fdisk -l /dev/sd?       
The primary GPT table is corrupt, but the backup appears OK, so that will be used.
Disk /dev/sda: 3.64 TiB, 4000787030016 bytes, 7814037168 sectors
Disk model: ST4000VX007-2DT1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 0384604C-4E8B-4E0A-8423-2139A918120C

Device     Start        End    Sectors  Size Type
/dev/sda1   2048 7814035455 7814033408  3.6T Linux filesystem
The primary GPT table is corrupt, but the backup appears OK, so that will be used.


Disk /dev/sdb: 3.64 TiB, 4000787030016 bytes, 7814037168 sectors
Disk model: ST4000VX007-2DT1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: C079AF04-F6C8-4FB3-9E12-FEFCC65D008F

Device     Start        End    Sectors  Size Type
/dev/sdb1   2048 7814035455 7814033408  3.6T Linux filesystem


Disk /dev/sdc: 7.28 TiB, 8001563222016 bytes, 15628053168 sectors
Disk model: HGST HDN728080AL
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 5237C016-4DE9-408A-A37B-F1F59F33776E

Device     Start         End     Sectors  Size Type
/dev/sdc1   2048 15627233279 15627231232  7.3T Microsoft basic data


Disk /dev/sdd: 3.64 TiB, 4000787030016 bytes, 7814037168 sectors
Disk model: ST4000VX007-2DT1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 56B6E76B-3B41-486B-8857-AD2BEA8D589A

Device     Start        End    Sectors  Size Type
/dev/sdd1   2048 7814035455 7814033408  3.6T Linux filesystem


Disk /dev/sde: 3.64 TiB, 4000787030016 bytes, 7814037168 sectors
Disk model: ST4000VX007-2DT1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: B306782C-5C23-4C41-A6B9-79AF1FCC6F0E

Device     Start        End    Sectors  Size Type
/dev/sde1   2048 7814035455 7814033408  3.6T Linux filesystem
6
  • 2
    Why is everybody wiping their mdadm metadata today? You have a partition table there, so check the partitions. If you used unpartitioned drives and wiped metadata by creating a partition table, then re-create is your only option. In the future, never use unpartitioned drives for anything. If you want to stick partitionless, wipe GPT backup at end of disk so nothing will feel compelled to repair the start-of-disk header. Commented Jan 4 at 8:37
  • @frostschutz Are you saying this cannot be fixed? I just followed this guide exactly. I have no illusions of being competent at this, I just follow instructions I find online. If I were to start over, what should I do different? Commented Jan 4 at 16:33
  • Have you tried to start the array without sdd and re-add it afterwards? Commented Jan 7 at 2:34
  • @AdrianZaugg No. How would I do that? Commented Jan 7 at 17:03
  • mdadm --assemble --run /dev/md0 /dev/sd[a-c] ...and check it's running: cat /proc/mdstat. Then re-add /dev/sdd: mdadm --add /dev/md0 /dev/sdd Commented Jan 8 at 18:25

1 Answer 1

2

You claimed you followed this guide which had you create partitions and use those in the raid device. In particular it says:

sudo mdadm --create /dev/md0 --chunk=64 --level=5 --raid-devices=3 /dev/sdb1 /dev/sdc1 /dev/sdd1

However, from your question, you are trying to assemble from the raw device:

$ sudo mdadm --assemble /dev/md0 /dev/sda /dev/sdb /dev/sdd /dev/sde -f

If you followed that guide correctly then you should be assembling from the partitions. This might work better:

$ sudo mdadm --assemble /dev/md0 /dev/sda1 /dev/sdb1 /dev/sdd1 /dev/sde1

You can verify the partition entries with fdisk -l /dev/sd?

The problem you appear to be having is that sd[ab] may be raw disks (you can check that with mdadm) but sdd and sde has a partition on it. So maybe there's a combination:

$ sudo mdadm --assemble /dev/md0 /dev/sda /dev/sdb /dev/sdd1 /dev/sde1

If you've destroyed the headers on 2 of the 4 disks then the array may not be recoverable.

4
  • Assembling with /dev/sda1 ... gives "mdadm: cannot open device /dev/sda1: No such file or directory. mdadm: /dev/sda1 has no superblock - assembly aborted" fdisk -l gives a long reply that cannot fit here as a comment. It all seems normal, but sda1 and sdb1 gives this warning in red: "The primary GPT table is corrupt, but the backup appears OK, so that will be used." I can add the full response to my original question. If this is unrecoverable, what should I do different from the guide next time? Commented Jan 4 at 17:51
  • You didn't follow the guide properly last time. The fact you have sda as a component and not sda1 is evidence of this. Commented Jan 4 at 19:46
  • But it seems I do have an sda1, the fdisk referenced it. Also, this was perfectly functional before I changed a bios setting (changing it back didn't fix it). Commented Jan 4 at 20:29
  • fdisk tells you it used the backup GPT table at the end of the disk (The primary GPT table is corrupt, but the backup appears OK, so that will be used.). You overwrote the primary table by using sda in your MD create command. The Linux kernel doesn't use that, which is why you see mdadm: cannot open device /dev/sda1: No such file or directory. Commented Jan 5 at 2:50

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.