Le 19 juin 2019 05:27:21 Andrei Borzenkov <arvidj...@gmail.com> a écrit :

18.06.2019 21:45, Hugo Mills пишет:
...

Is there a way to ask the block group allocator to prefer writing to
a specific device during a balance? Something like -ddestdevid=N?
This would just be a hint to the allocator and the usual constraints
would always apply (and prevail over the hint when needed).

No, there isn't. Having control over the allocator (or bypassing
it) would be pretty difficult to implement, I think.

It would be really great if there was an ioctl that allowed you to
say things like "take the chunks of this block group and put them on
devices 2, 4 and 5 in RAID-5", because you could do a load of
optimisation with reshaping the FS in userspace with that. But I
suspect it's a long way down the list of things to do.

It really sounds like "btrfs replace -ddrange=x..y". Replace already
knows how to move chunks from one device and put it on another. Now it
"just" needs to skip "replace" part and ignore chunks not covered by
filter ...

Yes having btrfs balance able to "empty" a device as replace does, without actually removing the device from the array would be nice.

There's a way to mimic that: running a btrfs device remove, and rebooting when it's almost done. The operation itself is not cancellable, but btrfs forgets about the pending remove after the reboot, and the device ils still part of the FS. It's ugly of course, and not really advisable, but it works.

However what I would need here seems a bit different: I need block groups moved from any device(s) (I don't care which), to one specific device.
I don't think anything like that exists (even counting hacky ways).

--
Stéphane.






Reply via email to