硬盘故障后将 RAID1 转移到新主板,并且未找到“超级块”

硬盘故障后将 RAID1 转移到新主板,并且未找到“超级块”

首先是 OS SDD 故障,然后是主板故障,后来是新的主板/cpu/ram,我有一个带有单个工作磁盘的 RAID1,我试图重新安装它,以便我可以添加新的替换磁盘。

但要做到这一点,我需要使用 mdadm 来组装它....但 mdadm 报告超级块不起作用。(顺便说一句,我不是程序员或系统管理员,只是一个业余爱好者,我不知道这些东西到底意味着什么)

以下是我的 mdadm.conf 的内容:


# mdadm.conf
#
# !NB! Run update-initramfs -u after updating this file.
# !NB! This will ensure that initramfs has an uptodate copy.
#
# Please refer to mdadm.conf(5) for information about this file.
#
# by default (built-in), scan all partitions (/proc/partitions) and all
# containers for MD superblocks. alternatively, specify devices to scan, using
# wildcards if desired.
#DEVICE partitions containers
# automatically tag new arrays as belonging to the local system
HOMEHOST <system>
# instruct the monitoring daemon where to send mail alerts
MAILADDR root
# definitions of existing MD arrays
ARRAY /dev/md/0  metadata=1.2 UUID=1a544a98:559ba1df:81b67841:7640bf5d name=lovelace:0
# This configuration was auto-generated on Sat, 21 Jan 2023 18:40:25 -0600 by mkconf

遵循此建议这里我决定运行以下命令并得到以下输出:

┌─      ~                                               
└─➤ mdadm --assemble --scan --verbose /dev/md0 /dev/sdb
mdadm: must be super-user to perform this action
┌─      ~                                                
└─➤ sudo !!
sudo mdadm --assemble --scan --verbose /dev/md0 /dev/sdb
[sudo] password for aslan:
mdadm: looking for devices for /dev/md0
mdadm: No super block found on /dev/loop16 (Expected magic a92b4efc, got b94e0a62)
mdadm: no RAID superblock on /dev/loop16
mdadm: No super block found on /dev/loop15 (Expected magic a92b4efc, got 89924e23)
mdadm: no RAID superblock on /dev/loop15
mdadm: No super block found on /dev/loop14 (Expected magic a92b4efc, got 89ab2deb)
mdadm: no RAID superblock on /dev/loop14
mdadm: No super block found on /dev/loop13 (Expected magic a92b4efc, got 3e22646e)
mdadm: no RAID superblock on /dev/loop13
mdadm: No super block found on /dev/loop12 (Expected magic a92b4efc, got 3e22646e)
mdadm: no RAID superblock on /dev/loop12
mdadm: No super block found on /dev/loop10 (Expected magic a92b4efc, got 08e76eab)
mdadm: no RAID superblock on /dev/loop10
mdadm: No super block found on /dev/loop11 (Expected magic a92b4efc, got 448ff4ed)
mdadm: no RAID superblock on /dev/loop11
mdadm: No super block found on /dev/loop9 (Expected magic a92b4efc, got 6042ae44)
mdadm: no RAID superblock on /dev/loop9
mdadm: No super block found on /dev/loop8 (Expected magic a92b4efc, got 6405001a)
mdadm: no RAID superblock on /dev/loop8
mdadm: /dev/sdb is busy - skipping
mdadm: No super block found on /dev/sda (Expected magic a92b4efc, got 000005d3)
mdadm: no RAID superblock on /dev/sda
mdadm: No super block found on /dev/nvme0n1p2 (Expected magic a92b4efc, got 00000476)
mdadm: no RAID superblock on /dev/nvme0n1p2
mdadm: No super block found on /dev/nvme0n1p1 (Expected magic a92b4efc, got 00000000)
mdadm: no RAID superblock on /dev/nvme0n1p1
mdadm: No super block found on /dev/nvme0n1 (Expected magic a92b4efc, got 00000000)
mdadm: no RAID superblock on /dev/nvme0n1
mdadm: No super block found on /dev/loop7 (Expected magic a92b4efc, got 6405001a)
mdadm: no RAID superblock on /dev/loop7
mdadm: No super block found on /dev/loop6 (Expected magic a92b4efc, got c4b43b1a)
mdadm: no RAID superblock on /dev/loop6
mdadm: No super block found on /dev/loop5 (Expected magic a92b4efc, got c4b43b1a)
mdadm: no RAID superblock on /dev/loop5
mdadm: No super block found on /dev/loop4 (Expected magic a92b4efc, got 3a23b8f9)
mdadm: no RAID superblock on /dev/loop4
mdadm: No super block found on /dev/loop3 (Expected magic a92b4efc, got 3a23b8f9)
mdadm: no RAID superblock on /dev/loop3
mdadm: No super block found on /dev/loop2 (Expected magic a92b4efc, got 764c0e15)
mdadm: no RAID superblock on /dev/loop2
mdadm: No super block found on /dev/loop1 (Expected magic a92b4efc, got 764c0e15)
mdadm: no RAID superblock on /dev/loop1
mdadm: /dev/loop0 is too small for md: size is 8 sectors.
mdadm: no RAID superblock on /dev/loop0
mdadm: /dev/sdb not identified in config file.

lsblk 读数:

┌─      ~                                                 
└─➤ lsblk
NAME MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
loop0
       7:0    0     4K  1 loop /snap/bare/5
loop1
       7:1    0  55.6M  1 loop /snap/core18/2667
loop2
       7:2    0  55.6M  1 loop /snap/core18/2679
loop3
       7:3    0    62M  1 loop /snap/core20/1587
loop4
       7:4    0  63.3M  1 loop /snap/core20/1778
loop5
       7:5    0 238.7M  1 loop /snap/firefox/2277
loop6
       7:6    0 239.1M  1 loop /snap/firefox/2311
loop7
       7:7    0 400.8M  1 loop /snap/gnome-3-38-2004/112
loop8
       7:8    0 346.3M  1 loop /snap/gnome-3-38-2004/119
loop9
       7:9    0  91.7M  1 loop /snap/gtk-common-themes/1535
loop10
       7:10   0 263.8M  1 loop /snap/nextcloud/33054
loop11
       7:11   0 265.6M  1 loop /snap/nextcloud/33493
loop12
       7:12   0  45.9M  1 loop /snap/snap-store/582
loop13
       7:13   0  45.9M  1 loop /snap/snap-store/638
loop14
       7:14   0  49.8M  1 loop /snap/snapd/17950
loop15
       7:15   0   284K  1 loop /snap/snapd-desktop-integration/14
loop16
       7:16   0   304K  1 loop /snap/snapd-desktop-integration/49
sda    8:0    0   3.6T  0 disk /media/aslan/archive1
sdb    8:16   0   2.7T  0 disk 
└─md0
       9:0    0     0B  0 md   
nvme0n1
     259:0    0 931.5G  0 disk 
├─nvme0n1p1
│    259:1    0   512M  0 part /boot/efi
└─nvme0n1p2
     259:2    0   931G  0 part /var/snap/firefox/common/host-hunspell 

blkdid 输出:

┌─      ~                                                 
└─➤ blkid
/dev/nvme0n1p1: UUID="A220-90FF" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="0c5cbefa-f89b-4a6b-9fb3-af849a49a342"
/dev/nvme0n1p2: UUID="e1011499-b5df-4a86-b6ba-0ce0aa1df65b" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="d370bb37-a2eb-4b1b-991b-22cc25cf2a48"
/dev/sdb: UUID="1a544a98-559b-a1df-81b6-78417640bf5d" UUID_SUB="6aa3c8b4-fd85-548f-629b-1207ce00114b" LABEL="lovelace:0" TYPE="linux_raid_member"
/dev/sda: LABEL="archive1" UUID="64e34e9d-427c-4ece-bf97-6e1475229e2e" BLOCK_SIZE="4096" TYPE="ext4"

编辑:我复制了该驱动器,并尝试运行 fsck 来修复新驱动器,并得到以下结果:

sudo fsck.ext4 -v /dev/md0
[sudo] password for aslan: 
e2fsck 1.46.5 (30-Dec-2021)
fsck.ext4: Invalid argument while trying to open /dev/md0

The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem.  If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>
 or
    e2fsck -b 32768 <device>

添加 mdadm 详细信息:

┌─      ~                                                                                                                        
└─➤ sudo !!
sudo mdadm --detail /dev/md0
/dev/md0:
           Version : 1.2
        Raid Level : raid1
     Total Devices : 1
       Persistence : Superblock is persistent

             State : inactive
   Working Devices : 1

              Name : lovelace:0  (local to host lovelace)
              UUID : 1a544a98:559ba1df:81b67841:7640bf5d
            Events : 4286

    Number   Major   Minor   RaidDevice

       -       8        0        -        /dev/sda
sudo mdadm --examine /dev/sda
/dev/sda:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x1
     Array UUID : 1a544a98:559ba1df:81b67841:7640bf5d
           Name : lovelace:0  (local to host lovelace)
  Creation Time : Tue Jul 31 13:49:48 2018
     Raid Level : raid1
   Raid Devices : 2

 Avail Dev Size : 5860268976 sectors (2.73 TiB 3.00 TB)
     Array Size : 2930134464 KiB (2.73 TiB 3.00 TB)
  Used Dev Size : 5860268928 sectors (2.73 TiB 3.00 TB)
    Data Offset : 264192 sectors
   Super Offset : 8 sectors
   Unused Space : before=264112 sectors, after=1953504048 sectors
          State : clean
    Device UUID : 6aa3c8b4:fd85548f:629b1207:ce00114b

Internal Bitmap : 8 sectors from superblock
    Update Time : Sun Nov  6 21:19:33 2022
  Bad Block Log : 512 entries available at offset 24 sectors
       Checksum : 9ad9915f - correct
         Events : 4286


   Device Role : Active device 0
   Array State : AA ('A' == active, '.' == missing, 'R' == replacing)

相关内容