如何在重启后恢复并安装我的 RAID 阵列

如何在重启后恢复并安装我的 RAID 阵列

我使用常规 mdadm 过程为两个驱动器 (sde 和 sdf) 创建了一个 raid-1 阵列,并在 md1 下创建了它并将其挂载到 /mnt/storage。重新启动后,md1 不再存在。我的 /mnt/plex 工作正常。我的阵列消失了吗?还是我只需要将分区指向正确的挂载点?

跑步lsblk让我

NAME        MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINTS
loop0         7:0    0  63.4M  1 loop  /snap/core20/1974
loop1         7:1    0  63.5M  1 loop  /snap/core20/2015
loop2         7:2    0  40.8M  1 loop  /snap/snapd/19993
loop3         7:3    0 111.9M  1 loop  /snap/lxd/24322
loop4         7:4    0  40.8M  1 loop  /snap/snapd/20092
sda           8:0    1   7.3T  0 disk
└─md0         9:0    0  21.8T  0 raid5 /mnt/plex
sdb           8:16   1   7.3T  0 disk
└─md0         9:0    0  21.8T  0 raid5 /mnt/plex
sdc           8:32   1   7.3T  0 disk
└─md0         9:0    0  21.8T  0 raid5 /mnt/plex
sdd           8:48   1   7.3T  0 disk
└─md0         9:0    0  21.8T  0 raid5 /mnt/plex
sde           8:64   0   3.6T  0 disk
sdf           8:80   0   3.6T  0 disk
nvme0n1     259:0    0 931.5G  0 disk
├─nvme0n1p1 259:1    0     1G  0 part  /boot/efi
└─nvme0n1p2 259:2    0 930.5G  0 part  /

跑步blkid让我

/dev/nvme0n1p1: UUID="255C-50C9" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="26565297-8615-4534-88b8-a160ab111fe4"
/dev/nvme0n1p2: UUID="ac32d63a-e8dc-4f58-b677-507491ed46de" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="25fa09fa-6781-49bf-927c-89e721f71154"
/dev/sdd: UUID="8051a9fa-3272-6a40-3950-5897a2b600f4" UUID_SUB="cb838ac3-6c2a-bfb0-fd0d-f7c63c447aa3" LABEL="tron:0" TYPE="linux_raid_member"
/dev/sdb: UUID="8051a9fa-3272-6a40-3950-5897a2b600f4" UUID_SUB="e4209087-7804-1e66-c3d2-dfef0f898b73" LABEL="tron:0" TYPE="linux_raid_member"
/dev/md0: UUID="f81c3ae4-363f-453a-ab49-1e716b27fc3b" BLOCK_SIZE="4096" TYPE="ext4"
/dev/sdc: UUID="8051a9fa-3272-6a40-3950-5897a2b600f4" UUID_SUB="f8da02fe-22e3-6f55-880d-c1d52c78167e" LABEL="tron:0" TYPE="linux_raid_member"
/dev/sda: UUID="8051a9fa-3272-6a40-3950-5897a2b600f4" UUID_SUB="d6bfc2f7-056d-441a-023f-25d73804c456" LABEL="tron:0" TYPE="linux_raid_member"
/dev/loop1: TYPE="squashfs"
/dev/loop4: TYPE="squashfs"
/dev/loop2: TYPE="squashfs"
/dev/loop0: TYPE="squashfs"
/dev/loop3: TYPE="squashfs"
/dev/sdf: PTUUID="e6979b33-6f82-11ea-96f0-0026b98cb28a" PTTYPE="gpt"
/dev/sde: PTUUID="e6a40000-6f82-11ea-96f0-0026b98cb28a" PTTYPE="gpt"

以下是我的/etc/fstab注释中的内容:我取消了最后两行的注释,因为它导致了超时问题,取消注释有帮助并且它不会挂起,但这可能是问题的一部分

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/nvme0n1p2 during curtin installation
/dev/disk/by-uuid/ac32d63a-e8dc-4f58-b677-507491ed46de / ext4 defaults 0 1
# /boot/efi was on /dev/nvme0n1p1 during curtin installation
/dev/disk/by-uuid/255C-50C9 /boot/efi vfat defaults 0 1
/swap.img       none    swap    sw      0       0
/dev/md0 /mnt/plex ext4 defaults,nofail,discard 0 0
#UUID=489c654c-58e8-4187-b478-b37bc6af81f9 /mnt/storage auto defaults,x-parent=f87a9a2f:b87b822b:60dc9e96:9d59d84f 0 0
#UUID=489c654c-58e8-4187-b478-b37bc6af81f9 /mnt/storage auto defaults,x-parent=f87a9a2f:b87b822b:60dc9e96:9d59d84f 0 0

如果我不取消注释最后两行,我会得到以下结果等待设备超时

答案1

您不能将两个驱动器安装到同一个安装点。例如,您需要将磁盘 1 安装到 /mnt/storage1,将磁盘 2 安装到 /mnt/storage2。确保这些目录存在于文件系统中

相关内容