3 ms·
I imagine there would eventually be a way / option to automatically rewrite old blocks. Or at least I would hope so because usually when your adding new disks t
by katbyte 3y ago
I imagine there would eventually be a way / option to automatically rewrite old blocks. Or at least I would hope so because usually when your adding new disks the array is going to be near full
- rincebrain 3y agoAlmost certainly not in any useful fashion that doesn't duplicate data versus old snapshots. ZFS really deeply assumes you're not gonna be rewriting history for a bunch of features, and you'd have written a good chunk of a new filesystem to reimplement everything without those assumptions.
- didntcheck 3y agoIIRC one of the developers was asked about this and said it would be about as much additional effort as the whole expansion feature so far. There is of course the user-level workaround of (roughly) `for file in *; do cp $file $file.new && mv $file.new $file && done`, but if I understand correctly you'd need to do this with no snapshots, otherwise the space from $file wouldn't be freed so you'd need an array that's at least half empty
- rincebrain 3y agoIt'd probably be worse than that. I cannot stress how expensive and invasive that would be enough.
- rleigh 3y agoYou can do a zfs send/zfs recv to send a dataset (including all snapshots) to yourself which is effectively rewriting the whole dataset, including all of its history, by duplicating it. Not hard, but it does require sufficient free space. Once it's done you can destroy the original dataset and reclaim the space.