使用 bcachefs(Arch Linux 6.7.2),如何在设备不存在的情况下删除不存在的设备?
X问题是:
- 我已将试驾添加到我的日常驾驶中
bcachefs device add
- 添加驱动器后,我从未向其中写入任何内容。
- 我忘记移除测试驱动器,拔下它并将其格式化为其他驱动器。测试驱动器上的 bcachefs 标头不再存在。
- 现在我重新启动了系统,但我的日常驱动器无法安装。
使用mount
或bcachefs mount
都会导致以下结果:
以下内容将显示在dmesg
:
bcachefs: bch2_fs_open() bch_fs_open err opening /dev/sda: insufficient_devices_to_start
我尝试使用degraded
和very_degraded
选项。我能够使用安装驱动器mount -o very_degraded
,但无法移除设备:
> sudo dmesg
...
bcachefs (18d26ec7-ad0d-460f-a35f-1a9533bccaf0): mounting version 1.3: rebalance_work opts=very_degraded
bcachefs (18d26ec7-ad0d-460f-a35f-1a9533bccaf0): recovering from clean shutdown, journal seq 379785
bcachefs (18d26ec7-ad0d-460f-a35f-1a9533bccaf0): alloc_read... done
bcachefs (18d26ec7-ad0d-460f-a35f-1a9533bccaf0): stripes_read... done
bcachefs (18d26ec7-ad0d-460f-a35f-1a9533bccaf0): snapshots_read... done
bcachefs (18d26ec7-ad0d-460f-a35f-1a9533bccaf0): journal_replay... done
bcachefs (18d26ec7-ad0d-460f-a35f-1a9533bccaf0): resume_logged_ops... done
bcachefs (18d26ec7-ad0d-460f-a35f-1a9533bccaf0): going read-write
> sudo bcachefs device remove 02d58ad4-29c5-4dcb-b7d6-d4c718590b33 /data
stat error statting 02d58ad4-29c5-4dcb-b7d6-d4c718590b33: No such file or directory
> sudo bcachefs device remove 1 /data
BCH_IOCTL_DISK_REMOVE ioctl error: Invalid argument
bcachefs (dev-1): Cannot remove without losing data