pause device removal
Hello
we have 140T btrfs made from 10 LUNs. This file system is quite full with backups (and snapshots). Now we need to free one of the LUNs. A btrfs device remove is quite slow and also slows down nightly backups a lot.
So we run the device remove during the day and the backups during the night. On another btrfs this worked quite well. But here, the backups fill the device we want to remove and currently we are not moving anywhere regarding the usage the LUN.
Do you have an idea how can resolve this?
Can we somehow mark the device as unusable for new writes, or set it size, so that it is not written to? Do you think it's safe to cgroup freeze the removal during the night?
Have a nice day
Stephan
Total devices 10 FS bytes used 144.08TiB
devid 1 size 0.00B used 6.81TiB path /dev/sdgb <--- currently in removal devid 3 size 1.88TiB used 546.00GiB path /dev/sdv devid 5 size 20.00TiB used 17.16TiB path /dev/sdw devid 6 size 20.00TiB used 17.16TiB path /dev/sdo devid 7 size 20.00TiB used 17.16TiB path /dev/sdu devid 8 size 20.00TiB used 17.16TiB path /dev/sdn devid 9 size 20.00TiB used 17.16TiB path /dev/sdj devid 10 size 20.00TiB used 17.16TiB path /dev/sdk devid 11 size 20.00TiB used 17.16TiB path /dev/sdm devid 12 size 20.00TiB used 17.16TiB path /dev/sdbc
Signature · 4 lines
Stephan Müller <[email protected]> IT Services Group, HPT H 8 Physics Department, ETH Zurich CH-8093 Zurich, Switzerland
Stephan Mueller kirjoitti 17.7.2026 klo 12.15:
Quoted 3 lines
we have 140T btrfs made from 10 LUNs. This file system is quite full with backups (and snapshots). Now we need to free one of the LUNs. A
btrfs device removeis quite slow and also slows down nightly backups a lot.So we run the device remove during the day and the backups during the night. On another btrfs this worked quite well. But here, the backups fill the device we want to remove and currently we are not moving anywhere regarding the usage the LUN.
You can use btrfs device resize to incrementally decrease the device size, then finally remove it with normal delete.
Like so: btrfs fi resize 1:-100G path-to-device
This will resize devid 1 100 gigabytes smaller. It will be a somewhat slower process than just device delete, but not hugely so (in my experience anyway).
Signature · 2 lines
...Elämälle vierasta toimintaa...
Jukka Larja, [email protected]