Linux에서 RAID 1을 재조립하려고 시도 중입니다. 실수로 재조립하는 대신 새 /dev/md0을 생성했지만 이제 마운트되지 않습니다.

Linux에서 RAID 1을 재조립하려고 시도 중입니다. 실수로 재조립하는 대신 새 /dev/md0을 생성했지만 이제 마운트되지 않습니다.

작동하는 RAID 1 어레이를 재조립하려고 했으나 실수로 대체 작업을 수행하여 mdadm --create이제 mdadm --assembleRAID 장치가 마운트되지 않습니다.

오류: 처음에는 불행하게도 다음과 같이 했습니다.

$ sudo mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sdb1 /dev/sdc1

이후 마운트 시도가 /dev/md0실패합니다.

$ sudo mount /dev/md0 /mnt/mirror
mount: /mnt/mirror: wrong fs type, bad option, bad superblock on /dev/md0, missing codepage or helper program, or other error.

이제 이 작업을 시도하면 --assembleRAID 장치가 마운트되지 않습니다.

$ sudo mdadm --assemble /dev/md0 /dev/sdc1
mdadm: /dev/sdc1 is busy - skipping
$ sudo mdadm --stop /dev/md0
mdadm: stopped /dev/md0
sudo mdadm --assemble /dev/md0 /dev/sdb1 /dev/sdc1
mdadm: /dev/md/0 has been started with 2 drives.
$ sudo mount /dev/md0 /mnt/mirror
mount: /mnt/mirror: wrong fs type, bad option, bad superblock on /dev/md0, missing codepage or helper program, or other error.

fs 유형을 RAID 1의 올바른 설정으로 복원하는 방법(포맷이 필요하지 않습니다! - 데이터를 파괴하고 싶지 않습니다!)

$ sudo mdadm --examine /dev/sdb1
/dev/sdb1:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x1
     Array UUID : 409bb846:c04ba3d6:cff546fe:b63ce279
           Name : mojo:0  (local to host mojo)
  Creation Time : Sat Jun  1 14:40:46 2019
     Raid Level : raid1
   Raid Devices : 2

 Avail Dev Size : 977008640 (465.87 GiB 500.23 GB)
     Array Size : 488253440 (465.63 GiB 499.97 GB)
  Used Dev Size : 976506880 (465.63 GiB 499.97 GB)
    Data Offset : 264192 sectors
   Super Offset : 8 sectors
   Unused Space : before=264112 sectors, after=501760 sectors
          State : active
    Device UUID : 36202ff4:4c450b4c:4e45f049:83d16385

Internal Bitmap : 8 sectors from superblock
    Update Time : Sat Jun  1 16:38:50 2019
  Bad Block Log : 512 entries available at offset 16 sectors
       Checksum : 19e7023e - correct
         Events : 719


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

$ cat /proc/mdstat 
Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4] [raid10] 
md0 : active raid1 sdb1[0] sdc1[1]
      488253440 blocks super 1.2 [2/2] [UU]
      [==================>..]  resync = 94.0% (459229248/488253440) finish=7.0min speed=68932K/sec
      bitmap: 1/4 pages [4KB], 65536KB chunk

unused devices: <none>


$ sudo fdisk /dev/sdc

Welcome to fdisk (util-linux 2.33.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p
Disk /dev/sdc: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Disk model: Hitachi HDS72105
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: 0x69ed0c28

Device     Boot Start       End   Sectors   Size Id Type
/dev/sdc1        2048 976773167 976771120 465.8G fd Linux raid autodetect

sudo blkid /dev/sdb1 /dev/sdc1
/dev/sdb1: UUID="409bb846-c04b-a3d6-cff5-46feb63ce279" UUID_SUB="36202ff4-4c45-0b4c-4e45-f04983d16385" LABEL="mojo:0" TYPE="linux_raid_member" PARTUUID="0004e809-01"
/dev/sdc1: UUID="409bb846-c04b-a3d6-cff5-46feb63ce279" UUID_SUB="63ec26cb-7468-8e16-1e32-08e984d3245d" LABEL="mojo:0" TYPE="linux_raid_member" PARTUUID="69ed0c28-01"

sudo mount /dev/md0 /mnt/mirror
mount: /mnt/mirror: wrong fs type, bad option, bad superblock on /dev/md0, missing codepage or helper program, or other error.
sudo blkid /dev/md0

No output from blkid on /dev/md0.

관련 정보