On 10.03.2020 09:54 Nikolay Borisov wrote: > > On 10.03.20 г. 2:05 ч., Martin Raiber wrote: >> Hi, >> >> I get a enospc to remount-ro with 5.4.21. Details: >> >> Linux 5.4.21 #1 SMP Fri Feb 21 03:20:26 CET 2020 x86_64 GNU/Linux >> >> btrfs fi usage /media/btrfs (after remount-ro) >> Overall: >> Device size: 511.99GiB >> Device allocated: 511.99GiB >> Device unallocated: 0.00B >> Device missing: 0.00B >> Used: 443.68GiB >> Free (estimated): 54.94GiB (min: 54.94GiB) >> Data ratio: 1.00 >> Metadata ratio: 1.00 >> Global reserve: 512.00MiB (used: 0.00B) >> >> Data,single: Size:490.98GiB, Used:436.04GiB (88.81%) >> /dev/mapper/LUKS-RC-cd46b6b4909845918eaa285c532476dc 490.98GiB >> >> Metadata,single: Size:21.01GiB, Used:7.65GiB (36.40%) >> /dev/mapper/LUKS-RC-cd46b6b4909845918eaa285c532476dc 21.01GiB >> >> System,single: Size:4.00MiB, Used:80.00KiB (1.95%) >> /dev/mapper/LUKS-RC-cd46b6b4909845918eaa285c532476dc 4.00MiB >> >> Unallocated: >> /dev/mapper/LUKS-RC-cd46b6b4909845918eaa285c532476dc 0.00B >> >> Mount options: >> /dev/mapper/LUKS-RC-cd46b6b4909845918eaa285c532476dc on /media/btrfs >> type btrfs >> (ro,noatime,compress-force=zstd:3,nossd,space_cache=v2,enospc_debug,skip_balance,metadata_ratio=8,subvolid=5,subvol=/) >> >> btrfs fi df /media/btrfs >> Data, single: total=490.98GiB, used=436.04GiB >> System, single: total=4.00MiB, used=80.00KiB >> Metadata, single: total=21.01GiB, used=7.65GiB >> GlobalReserve, single: total=512.00MiB, used=0.00B >> >> dmesg attached. >> > Were you performing any specific operation when this happened or you had > simply deleted a snapshot and some time later you got the ENOSPC? It does something like this if it matters: It creates a chain of snapshots and writes only to the one it last created, while sometimes deleting files from older snapshots in the chain. It has max 5 snapshots in the chain and every ~60min creates a new one and later deletes the oldest. For example it has a_1, a_2, a_3, a_4, a_5 (a_2 being a writeable snapshot of a_1) and writes only to a_5. Then it snapshots a_5 to a_6 and then only writes to a_6 and later deletes a_1. Looking at the latest ENOSPC that occured at 3:55, it created the latest snapshot at 3:05 and deleted the oldest at 3:48. It wrote to the latest snapshot while it dropped the oldest.
