thin_migrate(8)
π thin_migrate(8) π
okay so bestie, thin_migrate is the manual page for the thin_migrate tool, and it is lowkey the most iconic way to clone stuff in a live thin-pool π
β¨ NAME β¨
thin_migrate
π§ SYNOPSIS β¨
thin_migrate [options] --source-dev {device} --dest-dev {device}
thin_migrate [options] --source-dev {device} --dest-file {file}
π DESCRIPTION β¨
okay so thin_migrate copies provisioned data blocks from a thin device over to another device or a file π¦ it was made for cloning a read-only snapshot or thin volume while the thin-pool is still live, no cap.
β οΈ bestie, you NEED a metadata snapshot before this works, because that's how it reads the data mappings π
πΈ OPTIONS β¨
-h,--helpβ shows the help text and exits π«Ά-V,--versionβ shows the version info and exits β¨--source-dev {device}β the input read-only thin device you want to copy π--dest-dev {device}β the output device that becomes the copy destination π--dest-file {file}β the output file that becomes the copy destination π-q,--quitβ hushes all the output messages so you only get the exit code π€«--buffer-size-meg {size}β sets how big the data buffers are, in megabytes π₯
π¦ EXAMPLE β¨
okay so say there's a thin snapshot vg/snap you wanna copy π first thing, you have to make the snapshot read-only:
$ lvchange vg/snap --permission r
next up, make a metadata snapshot so thin_migrate can run π
$ dmsetup message vg-mythinpool-tpool 0 reserve_metadata_snap
once that metadata snapshot exists, copy the snapshot into another linear or thin volume. the destination volume has to be the same size as the source device, bestie, so don't mess that up π
$ thin_migrate --src-device /dev/vg/snap --dest-device /dev/vg2/dest
or, if you'd rather copy into a file, you can do that too π§ thin_migrate can optionally make the destination file if it isn't there yet, or the file gets truncated so it matches the source device size.
$ thin_migrate --src-device /dev/vg/snap --dest-file dest.bin
last but not least, once thin_migrate is done with its job, release the metadata snapshot so you're not leaving it hanging π«Ά
$ dmsetup message vg-mythinpool-tpool 0 release_metadata_snap
π DIAGNOSTICS β¨
okay so thin_migrate returns an exit code of 0 for success or 1 for error. that's it, that's the tea π΅
π AUTHOR β¨
the iconic creator is Joe Thornber <ejt@redhat.com> π
thanks for hanging with me bestie π this was the Device Mapper Tools page for thin_migrate(8) from the System Manager's Manual, and I'm obsessed with you for reading it ππβ¨
π¦ where this page comes from
- alpine 3.24: thin-provisioning-tools-doc 1.3.2-r0 Β· GPL-3.0-only
- arch rolling: thin-provisioning-tools 1.3.4-1 Β· GPL-3.0-only
- centos-stream 10: device-mapper-persistent-data 1.3.4-1.el10 Β· GPL-3.0-only AND (0BSD OR MIT OR Apache-2.0) AND Apache-2.0 AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND BSD-3-Clause AND MIT AND (MIT OR Apache-2.0) AND (MIT OR Zlib OR Apache-2.0) AND (Unlicense OR MIT) AND (Zlib OR Apache-2.0 OR MIT)
- centos-stream 9: device-mapper-persistent-data 1.1.0-1.el9 Β· GPL-3.0-only AND (0BSD OR MIT OR Apache-2.0) AND Apache-2.0 AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND BSD-3-Clause AND MIT AND (MIT OR Apache-2.0) AND (MIT OR Zlib OR Apache-2.0) AND (Unlicense OR MIT) AND (Zlib OR Apache-2.0 OR MIT)
- debian trixie: thin-provisioning-tools 1.1.0-4+b1 Β· GPL-3.0-or-later
- fedora 43: device-mapper-persistent-data 1.1.0-4.fc43 Β· GPL-3.0-only AND (0BSD OR MIT OR Apache-2.0) AND Apache-2.0 AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND BSD-3-Clause AND MIT AND (MIT OR Apache-2.0) AND (MIT OR Zlib OR Apache-2.0) AND (Unlicense OR MIT) AND (Zlib OR Apache-2.0 OR MIT)
- fedora 43: device-mapper-persistent-data 1.3.3-1.fc43
- fedora 43: device-mapper-persistent-data 1.3.4-1.fc43 Β· GPL-3.0-only AND (0BSD OR MIT OR Apache-2.0) AND Apache-2.0 AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND BSD-3-Clause AND MIT AND (MIT OR Apache-2.0) AND (MIT OR Zlib OR Apache-2.0) AND (Unlicense OR MIT) AND (Zlib OR Apache-2.0 OR MIT)
- fedora 44: device-mapper-persistent-data 1.3.1-3.fc44 Β· GPL-3.0-only AND (0BSD OR MIT OR Apache-2.0) AND Apache-2.0 AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND BSD-3-Clause AND MIT AND (MIT OR Apache-2.0) AND (MIT OR Zlib OR Apache-2.0) AND (Unlicense OR MIT) AND (Zlib OR Apache-2.0 OR MIT)
- fedora 44: device-mapper-persistent-data 1.3.3-1.fc44
- fedora 44: device-mapper-persistent-data 1.3.4-1.fc44 Β· GPL-3.0-only AND (0BSD OR MIT OR Apache-2.0) AND Apache-2.0 AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND BSD-3-Clause AND MIT AND (MIT OR Apache-2.0) AND (MIT OR Zlib OR Apache-2.0) AND (Unlicense OR MIT) AND (Zlib OR Apache-2.0 OR MIT)
- opensuse-leap 16.0: thin-provisioning-tools 1.1.0-160000.2.2 Β· GPL-3.0-only
- opensuse-leap 16.0: thin-provisioning-tools 1.1.0-160000.2.2 Β· GPL-3.0-only
- opensuse-leap 16.0: thin-provisioning-tools 1.1.0-160000.2.2 Β· GPL-3.0-only
- opensuse-leap 16.0: thin-provisioning-tools 1.1.0-160000.2.2 Β· GPL-3.0-only
- ubuntu questing: thin-provisioning-tools 1.1.0-4ubuntu1 Β· GPL-3.0-or-later
- ubuntu resolute: thin-provisioning-tools 1.1.0-4ubuntu2 Β· GPL-3.0-or-later
- ubuntu stonking: thin-provisioning-tools 1.1.0-5.1ubuntu1 Β· GPL-3.0-or-later
- π girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms