두 개의 디스크를 사용하여 RAID 0 어레이를 설치할 때 문제가 발생합니다.

두 개의 디스크를 사용하여 RAID 0 어레이를 설치할 때 문제가 발생합니다.

부팅되지 않은 Ubuntu 시스템에서 데이터를 백업하려고 합니다. 데이터는 두 개의 SSD 디스크(/dev/nvme0n1p3 및 /dev/nvme1n1p3)가 있는 raid0 어레이의 ext4 파티션에 있습니다. 그러나 파티션을 마운트할 수 없으며 마운트하는 동안 "잘못된 파일 시스템 유형, 잘못된 옵션, /dev/md2의 잘못된 슈퍼블록, 누락된 코드 페이지 또는 도우미 또는 기타 오류"가 발생합니다.

# mdadm --assemble --run /dev/md2 /dev/nvme0n1p3 /dev/nvme1n1p3
mdadm: /dev/md2 has been started with 2 drives.

# mount /dev/md2 /mnt/md2
mount: /mnt/md2: wrong fs type, bad option, bad superblock on /dev/md2, missing codepage or helper program, or other error.

# mount -t ext4 /dev/md2 /mnt/md2
mount: /mnt/md2: wrong fs type, bad option, bad superblock on /dev/md2, missing codepage or helper program, or other error.

# dmesg | tail
[Thu Nov 24 19:55:31 2022] md2: detected capacity change from 0 to 1928589312
[Thu Nov 24 20:28:26 2022] EXT4-fs (md2): VFS: Can't find ext4 filesystem

fsck /dev/md2잘못된 매직 넘버에 대해 불평하고 있습니다. 복구를 사용하여 슈퍼블록을 백업하려고 시도했지만 e2fsck도움이 되지 않았습니다.

fsck /dev/md2
fsck from util-linux 2.36.1
e2fsck 1.46.2 (28-Feb-2021)
ext2fs_open2: Bad magic number in super-block
fsck.ext2: Superblock invalid, trying backup blocks...
fsck.ext2: Bad magic number in super-block while trying to open /dev/md2

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>

# mke2fs -n /dev/md2
mke2fs 1.46.2 (28-Feb-2021)
Creating filesystem with 241073664 4k blocks and 60268544 inodes
Filesystem UUID: 83d3f317-85ad-43df-986e-98edac27b774
Superblock backups stored on blocks:
    32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
    4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
    102400000, 214990848

# e2fsck -b 98304 /dev/md2
e2fsck 1.46.2 (28-Feb-2021)
e2fsck: Bad magic number in super-block while trying to open /dev/md2

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>

...

이 문제를 해결하는 데 도움이 되는 조언을 주시면 감사하겠습니다!

내 설정에 대한 추가 정보는 다음과 같습니다.

# fdisk -l

Disk /dev/nvme1n1: 476.94 GiB, 512110190592 bytes, 1000215216 sectors
Disk model: SAMSUNG MZVL2512HCJQ-00B00
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: dos
Disk identifier: 0x32c47eba

Device         Boot    Start        End   Sectors   Size Id Type
/dev/nvme1n1p1          2048   33556479  33554432    16G fd Linux raid autodetect
/dev/nvme1n1p2 *    33556480   35653631   2097152     1G ef EFI (FAT-12/16/32)
/dev/nvme1n1p3      35653632 1000213167 964559536 459.9G fd Linux raid autodetect


Disk /dev/nvme0n1: 476.94 GiB, 512110190592 bytes, 1000215216 sectors
Disk model: SAMSUNG MZVL2512HCJQ-00B00
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: dos
Disk identifier: 0x9fd0f1b0

Device         Boot    Start        End   Sectors   Size Id Type
/dev/nvme0n1p1          2048   33556479  33554432    16G fd Linux raid autodetect
/dev/nvme0n1p2 *    33556480   35653631   2097152     1G ef EFI (FAT-12/16/32)
/dev/nvme0n1p3      35653632 1000213167 964559536 459.9G fd Linux raid autodetect


Disk /dev/md2: 919.62 GiB, 987437727744 bytes, 1928589312 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 524288 bytes / 1048576 bytes

# mdadm --detail /dev/md2
/dev/md2:
           Version : 1.2
     Creation Time : Thu Nov 24 18:06:43 2022
        Raid Level : raid0
        Array Size : 964294656 (919.62 GiB 987.44 GB)
      Raid Devices : 2
     Total Devices : 2
       Persistence : Superblock is persistent

       Update Time : Thu Nov 24 18:06:43 2022
             State : clean
    Active Devices : 2
   Working Devices : 2
    Failed Devices : 0
     Spare Devices : 0

            Layout : -unknown-
        Chunk Size : 512K

Consistency Policy : none

              Name : rescue:3  (local to host rescue)
              UUID : 56fc7c67:5c505f86:36efce2c:4a04073d
            Events : 0

    Number   Major   Minor   RaidDevice State
       0     259        7        0      active sync   /dev/nvme1n1p3
       1     259        3        1      active sync   /dev/nvme0n1p3

# cat /proc/mdstat
Personalities : [raid1] [raid0]
md2 : active raid0 nvme1n1p3[0] nvme0n1p3[1]
      964294656 blocks super 1.2 512k chunks

unused devices: <none>

# fsck.ext4 -v /dev/md2
e2fsck 1.46.2 (28-Feb-2021)
ext2fs_open2: Bad magic number in super-block
fsck.ext4: Superblock invalid, trying backup blocks...
fsck.ext4: Bad magic number in super-block while trying to open /dev/md2

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>

# lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
loop0         7:0    0   2.5G  1 loop
nvme1n1     259:0    0 476.9G  0 disk
├─nvme1n1p1 259:5    0    16G  0 part
├─nvme1n1p2 259:6    0     1G  0 part
└─nvme1n1p3 259:7    0 459.9G  0 part
  └─md2       9:2    0 919.6G  0 raid0
nvme0n1     259:4    0 476.9G  0 disk
├─nvme0n1p1 259:1    0    16G  0 part
├─nvme0n1p2 259:2    0     1G  0 part
└─nvme0n1p3 259:3    0 459.9G  0 part
  └─md2       9:2    0 919.6G  0 raid0

# parted -lm
BYT;
/dev/nvme0n1:512GB:nvme:512:512:msdos:SAMSUNG MZVL2512HCJQ-00B00:;
1:1049kB:17.2GB:17.2GB:::raid;
2:17.2GB:18.3GB:1074MB:xfs::boot, esp;
3:18.3GB:512GB:494GB:::raid;

Error: /dev/md2: unrecognised disk label
BYT;
/dev/md2:987GB:md:512:512:unknown:Linux Software RAID Array:;

BYT;
/dev/nvme1n1:512GB:nvme:512:512:msdos:SAMSUNG MZVL2512HCJQ-00B00:;
1:1049kB:17.2GB:17.2GB:::raid;
2:17.2GB:18.3GB:1074MB:::boot, esp;
3:18.3GB:512GB:494GB:::raid;

# file -sL /dev/md2
/dev/md2: data

관련 정보