mdadm 不会在启动时重组阵列

mdadm 不会在启动时重组阵列

我目前在华硕 UX51VZ 笔记本电脑上使用 arch 已有近一个月。我使用 mdadm 设置了带有两个 256GB SSD 的 fakeraid。我使用此配置没有任何问题。然而,在我意外重新安装了 linux-4.1.6 软件包并重新启动后,我看到一条消息说unable to find root device UUID: ...。(此 UUID 在 fstab 和 lsblk -f 输出中都有)。

我启动了一个实时 USB 形式,我可以成功组装 RAID 设备并查看我的所有数据(chroot 也正常工作)。我检查了 /etc/mkinitcpio.conf(mdadm_udev 在其位置)并运行了 mkinitcpio -p linux(运行无错误)。我还尝试重新安装 grub,但也没有成功。后来我重新安装了 mdadm、dmraid 并更新到 linux-4.2,但没有任何变化。

有人能看出哪里出了问题吗?任何帮助都将不胜感激。

我的 mdadmd.conf:

# mdadm configuration file
#
# mdadm will function properly without the use of a configuration file,
# but this file is useful for keeping track of arrays and member disks.
# In general, a mdadm.conf file is created, and updated, after arrays
# are created. This is the opposite behavior of /etc/raidtab which is
# created prior to array construction.
#
#
# the config file takes two types of lines:
#
#       DEVICE lines specify a list of devices of where to look for
#         potential member disks
#
#       ARRAY lines specify information about how to identify arrays so
#         so that they can be activated
#
# You can have more than one device line and use wild cards. The first
# example includes SCSI the first partition of SCSI disks /dev/sdb,
# /dev/sdc, /dev/sdd, /dev/sdj, /dev/sdk, and /dev/sdl. The second
# line looks for array slices on IDE disks.
#
#DEVICE /dev/sd[bcdjkl]1
#DEVICE /dev/hda1 /dev/hdb1
#
# If you mount devfs on /dev, then a suitable way to list all devices is:
#DEVICE /dev/discs/*/*
#
#
# The AUTO line can control which arrays get assembled by auto-assembly,
# meaing either "mdadm -As" when there are no 'ARRAY' lines in this file,
# or "mdadm --incremental" when the array found is not listed in this file.
# By default, all arrays that are found are assembled.
# If you want to ignore all DDF arrays (maybe they are managed by dmraid),
# and only assemble 1.x arrays if which are marked for 'this' homehost,
# but assemble all others, then use
#AUTO -ddf homehost -1.x +all
#
# ARRAY lines specify an array to assemble and a method of identification.
# Arrays can currently be identified by using a UUID, superblock minor number,
# or a listing of devices.
#
#       super-minor is usually the minor number of the metadevice
#       UUID is the Universally Unique Identifier for the array
# Each can be obtained using
#
#       mdadm -D <md>
#
#ARRAY /dev/md0 UUID=3aaa0122:29827cfa:5331ad66:ca767371
#ARRAY /dev/md1 super-minor=1
#ARRAY /dev/md2 devices=/dev/hda1,/dev/hdb1
#
# ARRAY lines can also specify a "spare-group" for each array.  mdadm --monitor
# will then move a spare between arrays in a spare-group if one array has a failed
# drive but no spare
#ARRAY /dev/md4 uuid=b23f3c6d:aec43a9f:fd65db85:369432df spare-group=group1
#ARRAY /dev/md5 uuid=19464854:03f71b1b:e0df2edd:246cc977 spare-group=group1
#
# When used in --follow (aka --monitor) mode, mdadm needs a
# mail address and/or a program.  This can be given with "mailaddr"
# and "program" lines to that monitoring can be started using
#    mdadm --follow --scan & echo $! > /run/mdadm/mon.pid
# If the lines are not found, mdadm will exit quietly
#MAILADDR [email protected]
#PROGRAM /usr/sbin/handle-mdadm-events

ARRAY /dev/md/imsm0 metadata=imsm UUID=4f9f485d:ad8c1ad3:0f95a3c8:35e49dc6
ARRAY /dev/md/RAID0SYS_0 container=/dev/md/imsm0 member=0 UUID=a703574c:86157ccd:2f213f57:810ea8e5

我的mkinitcpio.conf:

# vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run.  Advanced users may wish to specify all system modules
# in this array.  For instance:
#     MODULES="piix ide_disk reiserfs"
MODULES=""

# BINARIES
# This setting includes any additional binaries a given user may
# wish into the CPIO image.  This is run last, so it may be used to
# override the actual binaries included by a given hook
# BINARIES are dependency parsed, so you may safely ignore libraries
BINARIES="mdmon"

# FILES
# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in any way.  This is useful for config files.
FILES=""

# HOOKS
# This is the most important setting in this file.  The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.
# Order is important, and it is recommended that you do not change the
# order in which HOOKS are added.  Run 'mkinitcpio -H <hook name>' for
# help on a given hook.
# 'base' is _required_ unless you know precisely what you are doing.
# 'udev' is _required_ in order to automatically load modules
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
# Examples:
##   This setup specifies all modules in the MODULES setting above.
##   No raid, lvm2, or encrypted root is needed.
#    HOOKS="base"
#
##   This setup will autodetect all modules for your system and should
##   work as a sane default
#    HOOKS="base udev autodetect block filesystems"
#
##   This setup will generate a 'full' image which supports most systems.
##   No autodetection is done.
#    HOOKS="base udev block filesystems"
#
##   This setup assembles a pata mdadm array with an encrypted root FS.
##   Note: See 'mkinitcpio -H mdadm' for more information on raid devices.
#    HOOKS="base udev block mdadm encrypt filesystems"
#
##   This setup loads an lvm2 volume group on a usb device.
#    HOOKS="base udev block lvm2 filesystems"
#
##   NOTE: If you have /usr on a separate partition, you MUST include the
#    usr, fsck and shutdown hooks.
HOOKS="base udev autodetect block mdadm_udev keyboard fsck resume filesystems shutdown"

# COMPRESSION
# Use this to compress the initramfs image. By default, gzip compression
# is used. Use 'cat' to create an uncompressed image.
#COMPRESSION="gzip"
#COMPRESSION="bzip2"
#COMPRESSION="lzma"
#COMPRESSION="xz"
#COMPRESSION="lzop"
#COMPRESSION="lz4"

# COMPRESSION_OPTIONS
# Additional options for the compressor
#COMPRESSION_OPTIONS=""

我的 fstab:# /dev/md126p3 UUID=41cf124a-3aca-4d61-9b23-5e51cd88445e / ext4 rw,relatime,stripe=64,data=ordered 0 1

# /dev/md126p4
UUID=cbacfa26-0890-46bc-ae68-22d613f0cf5e       /home           ext4            rw,relatime,stripe=64,data=ordered      0 2

# /dev/md126p1
UUID=22B4-3DED          /boot           vfat            rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro    0 2

# /dev/md126p2
UUID=34aeb345-fa3a-4dad-bacd-c97fe5a13a3f       none            swap            defaults        0 0

lsblk -f 来自 USB 驱动器的 chroot 输出:

NAME        FSTYPE LABEL UUID MOUNTPOINT
sda                           
└─md126                       
  ├─md126p1                   /boot
  ├─md126p2                   [SWAP]
  ├─md126p3                   /
  └─md126p4                   /home
sdb                           
└─md126                       
  ├─md126p1                   /boot
  ├─md126p2                   [SWAP]
  ├─md126p3                   /
  └─md126p4                   /home
sdc                           
├─sdc1                        
└─sdc2                        
loop0                         
loop1                         
loop2                         
loop3                         

blkid 输出:

/dev/sda: TYPE="isw_raid_member"
/dev/sdb: TYPE="isw_raid_member"
/dev/sdc1: UUID="2015-07-13-20-38-48-00" LABEL="MJRO0813" TYPE="iso9660" PTUUID="18247d08" PTTYPE="dos" PARTUUID="18247d08-01"
/dev/sdc2: SEC_TYPE="msdos" LABEL="MISO_EFI" UUID="C8E1-3936" TYPE="vfat" PARTUUID="18247d08-02"
/dev/loop0: TYPE="squashfs"
/dev/loop1: TYPE="squashfs"
/dev/loop2: TYPE="squashfs"
/dev/loop3: TYPE="squashfs"
/dev/md126: PTUUID="bdb2552b-bac3-4691-a6e3-8f11574b11a5" PTTYPE="gpt"
/dev/md126p1: UUID="22B4-3DED" TYPE="vfat" PARTLABEL="EFI System" PARTUUID="938e8f67-7259-4c02-a841-b04f7f6fd1e8"
/dev/md126p2: UUID="34aeb345-fa3a-4dad-bacd-c97fe5a13a3f" TYPE="swap" PARTLABEL="Linux swap" PARTUUID="8dc3fde4-ecba-42a0-ac5f-37b11917755d"
/dev/md126p3: UUID="41cf124a-3aca-4d61-9b23-5e51cd88445e" TYPE="ext4" PARTLABEL="Linux filesystem" PARTUUID="cad3a0ba-365e-49de-a117-c526b1fadd8c"
/dev/md126p4: UUID="cbacfa26-0890-46bc-ae68-22d613f0cf5e" TYPE="ext4" PARTLABEL="Linux /home" PARTUUID="6ae8c946-bdbf-4f0d-aabe-9cc3b291ace4"

我还可以发布您需要的任何其他信息。

相关内容