我的 btrfs 设备上的空间不足,所有故障排除提示都会导致相同的错误。我正在安装sudo mount -o rw,skip_balance,nodatacow
.我使用的是内核 6.1.13,并且没有任何子卷或快照。
echo "" > largefile"
中止事务:
[ 438.953007] BTRFS: error (device sdf: state A) in __btrfs_update_delayed_inode:1060: errno=-28 No space left
[ 438.953059] BTRFS info (device sdf: state EA): forced readonly
[ 438.953064] BTRFS: error (device sdf: state EA) in __btrfs_run_delayed_items:1153: errno=-28 No space left
[ 438.953100] BTRFS warning (device sdf: state EA): Skipping commit of aborted transaction.
[ 438.953102] BTRFS: error (device sdf: state EA) in cleanup_transaction:1958: errno=-28 No space left
那里有附加信息说space_info METADATA has 4321902592 free, is full
btrfs balance start -v -dusage=0 /mnt
总是说另一个余额已暂停,否则我会收到以下错误:
[ 1023.356909] BTRFS: error (device sdf: state A) in cleanup_transaction:1958: errno=-28 No space left
[ 1023.356969] BTRFS warning (device sdf: state EA): btrfs_uuid_scan_kthread failed -30
[ 1023.357006] BTRFS: error (device sdf: state EA) in reset_balance_state:3599: errno=-30 Readonly filesystem
我看到的最后一个提示是添加新设备。我尝试过使用环回设备和真实磁盘(btrfs device add /dev/sdb /mnt
)。两次我都得到:
[ 1393.030477] BTRFS info (device sdf: state A): dumping space info:
[ 1393.030479] BTRFS info (device sdf: state A): space_info DATA has 14588968960 free, is not full
[ 1393.030482] BTRFS info (device sdf: state A): space_info total=11980400689152, used=11965811326976, pinned=0, reserved=0, may_use=0, readonly=393216 zone_unusable=0
[ 1393.030485] BTRFS info (device sdf: state A): space_info METADATA has 4322557952 free, is not full
[ 1393.030487] BTRFS info (device sdf: state A): space_info total=21944598528, used=17084776448, pinned=0, reserved=0, may_use=536870912, readonly=393216 zone_unusable=0
[ 1393.030490] BTRFS info (device sdf: state A): space_info SYSTEM has 11780096 free, is not full
[ 1393.030492] BTRFS info (device sdf: state A): space_info total=12582912, used=802816, pinned=0, reserved=0, may_use=0, readonly=0 zone_unusable=0
[ 1393.030495] BTRFS info (device sdf: state A): global_block_rsv: size 536870912 reserved 536870912
[ 1393.030497] BTRFS info (device sdf: state A): trans_block_rsv: size 0 reserved 0
[ 1393.030499] BTRFS info (device sdf: state A): chunk_block_rsv: size 0 reserved 0
[ 1393.030500] BTRFS info (device sdf: state A): delayed_block_rsv: size 0 reserved 0
[ 1393.030504] BTRFS: error (device sdf: state A) in btrfs_init_new_device:2778: errno=-28 No space left
[ 1393.030548] BTRFS info (device sdf: state EA): forced readonly
有趣的是,这次并没有说调试输出中 METADATA 已满。
我在这里有什么选择?
答案1
“另一个平衡已暂停”应该是一个很大的暗示。我跑:
mount -o rw,skip_balance /mnt && btrfs balance cancel /mnt
在强制文件系统变为只读之前取消现有余额。然后我就可以正常删除大文件并重新平衡。