I am attempting to shrink an LVM thin pool using thin_shrink and following this tutorial: https://web.archive.org/web/20250123064253/https://pascalroeleven.nl/2022/08/09/how-to-shrink-your-lvm2-thin-pool-manually-if-you-are-adventurious/
It almost worked; however, when trying to reactive volumes, I would get an error. Reading in dmesg, I would see:
pool target (1000) too small: expected 2000
where 1000 and 2000 are the new and old pool size, respectively. It threw me for a while, as I couldn't understand where the 2000, the old pool size, could come from. After a while, I realized that the input and output of thin_shrink were exactly the same; that is, after
pdata_tools thin_shrink --input metadata --output metadata_shrinked --data /dev/mapper/vg-tpool0_tdata --nr-blocks 1000
metadata_shrinked had the exact same content as metadata, including the same nr_data_blocks value in the first line. Editing that file manually and continuing with the process seems to have worked though.
Since the thin_shrink command returned immediately, I assume it could be because no data needed to be moved. But to be completely honest, I'm a bit out of my depth and I don't know enough about LVM to be sure my assumptions make sense. I also can't read Rust, so I can't verify my assumption in the code.
I am attempting to shrink an LVM thin pool using thin_shrink and following this tutorial: https://web.archive.org/web/20250123064253/https://pascalroeleven.nl/2022/08/09/how-to-shrink-your-lvm2-thin-pool-manually-if-you-are-adventurious/
It almost worked; however, when trying to reactive volumes, I would get an error. Reading in
dmesg, I would see:pool target (1000) too small: expected 2000where 1000 and 2000 are the new and old pool size, respectively. It threw me for a while, as I couldn't understand where the 2000, the old pool size, could come from. After a while, I realized that the input and output of
thin_shrinkwere exactly the same; that is, afterpdata_tools thin_shrink --input metadata --output metadata_shrinked --data /dev/mapper/vg-tpool0_tdata --nr-blocks 1000metadata_shrinkedhad the exact same content asmetadata, including the samenr_data_blocksvalue in the first line. Editing that file manually and continuing with the process seems to have worked though.Since the
thin_shrinkcommand returned immediately, I assume it could be because no data needed to be moved. But to be completely honest, I'm a bit out of my depth and I don't know enough about LVM to be sure my assumptions make sense. I also can't read Rust, so I can't verify my assumption in the code.