On Tue, Jun 18, 2019 at 07:14:26PM +0000, DO NOT USE wrote: > June 18, 2019 8:45 PM, "Hugo Mills" <h...@carfax.org.uk> wrote: > > > On Tue, Jun 18, 2019 at 08:26:32PM +0200, Stéphane Lesimple wrote: > >> [...] > >> I tried using the -ddevid option but it only instructs btrfs to work > >> on the block groups allocated on said device, as it happens, it > >> tends to move data between the 4 preexisting devices and doesn't fix > >> my problem. A full balance with -dlimit=100 did no better. > > > > -dlimit=100 will only move 100 GiB of data (i.e. 200 GiB), so it'll > > be a pretty limited change. You'll need to use a larger number than > > that if you want it to have a significant visible effect. > > Yes of course, I wasn't clear here but what I meant to do when starting > a full balance with -dlimit=100 was to test under a reasonable amount of > time whether the allocator would prefer to fill the new drive. I observed > after those 100G (200G) of data moved that it wasn't the case at all. > Specifically, no single allocation happened on the new drive. I know this > would be the case at some point, after Terabytes of data would have been > moved, but that's exactly what I'm trying to avoid.
It's probably putting the data into empty space first. The solution here would, as Austin said in his reply to your original post, be to run some compaction on the FS, which will move data from chunks with little data in, into existing chunks with space. When that's done, you'll be able to see the chunks moving onto the new device. [snip] > > 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. > > Exactly, that would be awesome. I would probably even go as far as > writing some C code myself to call this ioctl to do this "intelligent" > balance on my system! You wouldn't need to. I'd be at the head of the queue to write the tool. :) Hugo. -- Hugo Mills | How do you become King? You stand in the marketplace hugo@... carfax.org.uk | and announce you're going to tax everyone. If you http://carfax.org.uk/ | get out alive, you're King. PGP: E2AB1DE4 | Harry Harrison
signature.asc
Description: Digital signature