问题
在引导期间组装 BTRFS 设备失败并报错:
BTRFS: too many missing devices, writeable mount is not allowed BTRFS:丢失的设备太多,不允许可写挂载
磁盘已被错误删除
https://onitroad.com 更多教程
解决方案
RAID 数组中丢失的磁盘不允许挂载文件系统。
以下是来自 dmesg 的日志:
[ 44.706956] btrfs: disk space caching is enabled [ 44.708006] btrfs: failed to read the system array on sdd1 [ 44.721272] btrfs: open_ctree failed [ 45.437152] nr_pdflush_threads exported in /proc is scheduled for removal [ 45.437280] sysctl: The scan_unevictable_pages sysctl/node-interface has been disabled for lack of a legitimate use case. If you have one, please send an email to linux-mm@kvack.org. [ 109.750996] SELinux: initialized (dev tmpfs, type tmpfs), uses transition SIDs [ 123.375147] device fsid 06182482-9e8c-4e92-a026-ee045ffa71df devid 1 transid 2351588 /dev/sdd1 [ 123.379134] btrfs: allowing degraded mounts [ 123.379137] btrfs: enabling auto recovery [ 123.379137] btrfs: disk space caching is enabled [ 123.380401] warning devid 4 missing [ 123.385362] btrfs: bdev (null) errs: wr 16, rd 0, flush 0, corrupt 0, gen 0 [ 123.385367] btrfs: bdev /dev/sde1 errs: wr 16, rd 0, flush 0, corrupt 0, gen 0 [ 123.446679] Btrfs: too many missing devices, writeable mount is not allowed [ 123.457684] btrfs: open_ctree failed
RAID需要一定数量的设备才能成功挂载。
如果某些设备不存在/已失败/已被替换,我们可以尝试使用以下选项挂载文件系统并继续更新设备集。
按相同顺序尝试以下选项:
# mount -o degraded,ro /dev/sdd1 /u01 dmesg | tail
# mount -o degraded,recovery /dev/sdd1 /u01 dmesg | tail
# mount -o degraded,recovery,ro /dev/sdd1 /u01 dmesg | tail
日期:2020-09-17 00:12:59 来源:oir作者:oir