mdadm:打开 /dev/md 时出错?*:

mdadm:打开 /dev/md 时出错?*:

我有一个 Ubuntu 22.04 LTS Jammy Jellyfish 系统,带有 2x 2TB 硬盘上的 RAID0 和 LVM。

重启后,服务器状态为initramfs

mdadm: No devices listed in conf file were found. 
mdadm: error opening /dev/md?*: No such file or directory
mdadm: No devices listed in conf file were found.
mdadm: No devices listed in conf file were found.
mdadm: No devices listed in conf file were found.
mdadm: No devices listed in conf file were found.
mdadm: No devices listed in conf file were found.
mdadm: No devices listed in conf file were found.
mdadm: No devices listed in conf file were found.
mdadm: No devices listed in conf file were found.
mdadm: No devices listed in conf file were found.
mdadm: No devices listed in conf file were found.
mdadm: No devices listed in conf file were found.

Gave up waiting for root device. Common problems:
- Boot args (cat /dev/cmdline)
  - Check rootdelay= (did the system wait long enough?)
  - Check root= (did the system wait for the right device?)
- Missing modules (cat /proc/modules; ls /dev)
ALERT! /dev/mapper/vg0-root/ does not exist.
Droping to a shell!

BusyBox v1.30.1 (Ubuntu 1:1.30.1-7ubuntu3) build-in shel (ash)
Enter 'help' for a list of build-in commands.

(initramfs)

键盘不工作,无法接受任何输入。

sudo fdisk -l

Disk /dev/ram0: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram1: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram2: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram3: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram4: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram5: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram6: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram7: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram8: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram9: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram10: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram11: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram12: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram13: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram14: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram15: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/loop0: 2.53 GiB, 2711329792 bytes, 5295566 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sda: 1.82 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: WDC WD2000FYYZ-0
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: 0x1a989c2d

Device     Boot   Start        End    Sectors  Size Id Type
/dev/sda1          2048    1050623    1048576  512M fd Linux raid autodetect
/dev/sda2       1050624 3907027119 3905976496  1.8T fd Linux raid autodetect


Disk /dev/sdb: 1.82 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: WDC WD2000FYYZ-0
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: 0xeed759f8

Device     Boot   Start        End    Sectors  Size Id Type
/dev/sdb1          2048    1050623    1048576  512M fd Linux raid autodetect
/dev/sdb2       1050624 3907027119 3905976496  1.8T fd Linux raid autodetect


Disk /dev/md0: 511 MiB, 535822336 bytes, 1046528 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/md1: 3.64 TiB, 3999449219072 bytes, 7811424256 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


Disk /dev/mapper/vg0-root: 3.64 TiB, 3999445024768 bytes, 7811416064 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.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=2c712e31:959bf135:16f8ff59:4beacb76 name=rescue:0
ARRAY /dev/md/1  metadata=1.2 UUID=c9460c69:2c8d4a2d:904b8915:1c032bea name=rescue:1
# This configuration was auto-generated on Tue, 26 Apr 2022 15:43:25 +0200 by mk 

cat /etc/fstab

proc /proc proc defaults 0 0
# /dev/md/0
UUID=9582fd06-83e3-4edd-bc72-b35482722a78 /boot ext3 defaults 0 0
# /dev/md/1 belongs to LVM volume group 'vg0'
/dev/vg0/root  /  ext4  defaults 0 0

mdadm --detail --scan

ARRAY /dev/md/0 metadata=1.2 name=rescue:0 UUID=2c712e31:959bf135:16f8ff59:4beacb76
ARRAY /dev/md/1 metadata=1.2 name=rescue:1 UUID=c9460c69:2c8d4a2d:904b8915:1c032bea

cat /proc/mdstat

Personalities : [raid1] [raid0]
md1 : active raid0 sda2[0] sdb2[1]
      3905712128 blocks super 1.2 512k chunks

md0 : active raid1 sda1[0] sdb1[1]
      523264 blocks super 1.2 [2/2] [UU]

unused devices: <none>   

blkid

/dev/sdb2: UUID="c9460c69-2c8d-4a2d-904b-89151c032bea" UUID_SUB="99c874d6-7bca-4cd1-e1dd-7a8b6a871956" LABEL="rescue:1" TYPE="linux_raid_member" PARTUUID="eed759f8-02"
/dev/sdb1: UUID="2c712e31-959b-f135-16f8-ff594beacb76" UUID_SUB="4d6caa46-ce7b-0662-cca9-ac7b028a2559" LABEL="rescue:0" TYPE="linux_raid_member" PARTUUID="eed759f8-01"
/dev/md0: UUID="9582fd06-83e3-4edd-bc72-b35482722a78" SEC_TYPE="ext2" BLOCK_SIZE="1024" TYPE="ext3"
/dev/loop0: UUID="3811e8a1-a77a-41ed-b915-faafa1020c63" BLOCK_SIZE="4096" TYPE="ext2"
/dev/mapper/vg0-root: UUID="41446ccb-fa8d-4289-927b-336a17045a15" BLOCK_SIZE="4096" TYPE="ext4"
/dev/sda2: UUID="c9460c69-2c8d-4a2d-904b-89151c032bea" UUID_SUB="659a73ab-1422-f262-dc43-0342037fc90f" LABEL="rescue:1" TYPE="linux_raid_member" PARTUUID="1a989c2d-02"
/dev/sda1: UUID="2c712e31-959b-f135-16f8-ff594beacb76" UUID_SUB="c2644229-aca5-2aef-bec0-25ef5ac5c842" LABEL="rescue:0" TYPE="linux_raid_member" PARTUUID="1a989c2d-01"
/dev/md1: UUID="XmEeIE-3pfH-cpO5-iil3-DTz1-RHst-GxVRYO" TYPE="LVM2_member"

vgdisplay

  --- Volume group ---
  VG Name               vg0
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  2
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               1
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               <3.64 TiB
  PE Size               4.00 MiB
  Total PE              953542
  Alloc PE / Size       953542 / <3.64 TiB
  Free  PE / Size       0 / 0
  VG UUID               QF358I-pbnx-cWfS-98qY-Rb3m-ZmVU-Su328j

ls -Al /dev/disk/by-uuid

total 0
lrwxrwxrwx 1 root root 11 Jan  1 13:40 3811e8a1-a77a-41ed-b915-faafa1020c63 -> ../../loop0
lrwxrwxrwx 1 root root 10 Jan  1 13:40 41446ccb-fa8d-4289-927b-336a17045a15 -> ../../dm-0
lrwxrwxrwx 1 root root  9 Jan  1 13:40 9582fd06-83e3-4edd-bc72-b35482722a78 -> ../../md0

我需要做什么才能将其取回?

相关内容