I have a BTRFS file system that was not mounted with compression, and later compression was set.
The issue is that in this case a single file has been copied A LOT post the compression being set; due to COW this meant that ~6T was reduced to ~400G; and now when defrag runs it wants to recreate the linked extents as it compresses them for some reason - that will blow out the space!
Luckily I realised this after only 966G was processed (screenshot below)
[Dev-FileServer serviceadmin]# btrfs fi df /Databases/; compsize /Databases/
Data, single: total=606.00GiB, used=560.86GiB
System, single: total=32.00MiB, used=96.00KiB
Metadata, single: total=11.00GiB, used=6.36GiB
GlobalReserve, single: total=512.00MiB, used=0.00B
Processed 1009 files, 15334110 regular extents (42415457 refs), 1 inline.
Type Perc Disk Usage Uncompressed Referenced
TOTAL 41% 560G 1.3T 6.0T
none 100% 386G 386G 5.0T
zstd 18% 174G 966G 966G
This caused our used space to INCREASE by ~20% and we would run out of space had I not noticed this!
Does anyone know how to do this and respect the links so that the existing extents are compressed?
Thanks in advance
The issue is that in this case a single file has been copied A LOT post the compression being set; due to COW this meant that ~6T was reduced to ~400G; and now when defrag runs it wants to recreate the linked extents as it compresses them for some reason - that will blow out the space!
Luckily I realised this after only 966G was processed (screenshot below)
[Dev-FileServer serviceadmin]# btrfs fi df /Databases/; compsize /Databases/
Data, single: total=606.00GiB, used=560.86GiB
System, single: total=32.00MiB, used=96.00KiB
Metadata, single: total=11.00GiB, used=6.36GiB
GlobalReserve, single: total=512.00MiB, used=0.00B
Processed 1009 files, 15334110 regular extents (42415457 refs), 1 inline.
Type Perc Disk Usage Uncompressed Referenced
TOTAL 41% 560G 1.3T 6.0T
none 100% 386G 386G 5.0T
zstd 18% 174G 966G 966G
This caused our used space to INCREASE by ~20% and we would run out of space had I not noticed this!
Does anyone know how to do this and respect the links so that the existing extents are compressed?
Thanks in advance
Comment