重装Kubuntu 22后MDADM RAID1阵列无法挂载的求助
重装Kubuntu 22后MDADM RAID1阵列无法挂载的求助
刚把Kubuntu 22重装了一遍——之前尝试从20 LTS升级到22 LTS的时候彻底搞砸了,只能重来。现在我在恢复磁盘阵列的时候遇到了麻烦:其中一组双盘ZFS阵列很快就搞定了,但另一组双盘的mdadm RAID1阵列怎么都弄不好,想请教大家有没有办法。
我先安装了mdadm,它自动生成了配置文件,内容如下:
john@Adnoartina:/cctv/fs1$ cat /etc/mdadm/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=8ccafb9b:d754b713:ac709ab4:78ca2f53 name=Adnoartina:0 # This configuration was auto-generated on Wed, 16 Aug 2023 22:44:54 +0100 by mkconf
之后我也执行了update-initramfs -u,但还是遇到了类似“mdadm: failed to add /dev/sdb3 to /dev/md/2_0: Invalid argument”的错误。我试着用了--update=devicesize参数,看起来有进展,但还是没法挂载阵列。
尝试挂载的时候一直报错:
john@Adnoartina:/cctv/fs1$ sudo mount /dev/md/0 Important/ mount: /cctv/fs1/Important: wrong fs type, bad option, bad superblock on /dev/md0, missing codepage or helper program, or other error. john@Adnoartina:/cctv/fs1$ sudo mount /dev/md0 Important/ mount: /cctv/fs1/Important: wrong fs type, bad option, bad superblock on /dev/md0, missing codepage or helper program, or other error.
用fsck检查也没帮助:
john@Adnoartina:/cctv/fs1$ sudo fsck -n /dev/md/0 fsck from util-linux 2.37.2 e2fsck 1.46.5 (30-Dec-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/md0 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>
我看了下阵列的详细信息,状态是clean的,两个盘都正常:
john@Adnoartina:/cctv/fs1$ sudo mdadm --detail /dev/md0 /dev/md0: Version : 1.2 Creation Time : Mon Jun 22 20:52:51 2020 Raid Level : raid1 Array Size : 2930132992 (2.73 TiB 3.00 TB) Used Dev Size : 2930132992 (2.73 TiB 3.00 TB) Raid Devices : 2 Total Devices : 2 Persistence : Superblock is persistent Update Time : Wed Aug 16 23:27:13 2023 State : clean Active Devices : 2 Working Devices : 2 Failed Devices : 0 Spare Devices : 0 Consistency Policy : resync Name : Adnoartina:0 (local to host Adnoartina) UUID : 8ccafb9b:d754b713:ac709ab4:78ca2f53 Events : 2 Number Major Minor RaidDevice State 0 8 49 0 active sync /dev/sdd1 1 8 65 1 active sync /dev/sde1
然后我用fdisk -l看分区信息,发现一个奇怪的点:这两个盘的分区类型显示是Solaris /usr & Apple ZFS?
Disk /dev/sdd: 2.73 TiB, 3000592982016 bytes, 5860533168 sectors Disk model: TOSHIBA DT01ACA3 Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disklabel type: gpt Disk identifier: F3AE916B-DB77-9844-98DA-250443CFC5A4 Device Start End Sectors Size Type /dev/sdd1 2048 5860515839 5860513792 2.7T Solaris /usr & Apple ZFS /dev/sdd9 5860515840 5860532223 16384 8M Solaris reserved 1 Disk /dev/sde: 2.73 TiB, 3000592982016 bytes, 5860533168 sectors Disk model: TOSHIBA DT01ACA3 Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disklabel type: gpt Disk identifier: 20CFD558-A582-8847-BB20-E9585044D859 Device Start End Sectors Size Type /dev/sde1 2048 5860515839 5860513792 2.7T Solaris /usr & Apple ZFS /dev/sde9 5860515840 5860532223 16384 8M Solaris reserved 1 Disk /dev/md0: 2.73 TiB, 3000456183808 bytes, 5860265984 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
另外检查磁盘超级块的时候,看到有坏块记录:
john@Adnoartina:/cctv/fs1$ sudo mdadm -E /dev/sde1 /dev/sde1: Magic : a92b4efc Version : 1.2 Feature Map : 0x8 Array UUID : 8ccafb9b:d754b713:ac709ab4:78ca2f53 Name : Adnoartina:0 (local to host Adnoartina) Creation Time : Mon Jun 22 20:52:51 2020 Raid Level : raid1 Raid Devices : 2 Avail Dev Size : 5860249600 sectors (2.73 TiB 3.00 TB) Array Size : 2930132992 KiB (2.73 TiB 3.00 TB) Used Dev Size : 5860265984 sectors (2.73 TiB 3.00 TB) Data Offset : 264192 sectors Super Offset : 8 sectors Unused Space : before=264112 sectors, after=18446744073709535232 sectors State : clean Device UUID : 740242b8:a390e2aa:9ccbc034:3346bd6d Update Time : Wed Aug 16 23:27:13 2023 Bad Block Log : 512 entries available at offset 24 sectors - bad blocks present. Checksum : eddcc88c - correct Events : 2 Device Role : Active device 1 Array State : AA ('A' == active, '.' == missing, 'R' == replacing)
/proc/mdstat里阵列也是正常激活的:
john@Adnoartina:/cctv/fs1$ cat /proc/mdstat Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] md0 : active raid1 sdd1[0] sde1[1] 2930132992 blocks super 1.2 [2/2] [UU] unused devices: <none>
现在我彻底卡住了,想问问大家有没有思路?会不会是我之前的系统里把这组盘从mdadm改成ZFS了,但没彻底清理掉相关数据,导致现在出现这种混乱的状态?
谢谢大家!
John
备注:内容来源于stack exchange,提问作者user1417230
相关产品推荐
相关产品推荐

