.\" Text automatically generated by txt2man .TH thin_migrate 8 "Device Mapper Tools" "System Manager's Manual" .SH NAME \fBthin_migrate \fB .SH SYNOPSIS .nf .fam C \fBthin_migrate\fP [\fIoptions\fP] \fB--source-dev\fP {device} \fB--dest-dev\fP {device} \fBthin_migrate\fP [\fIoptions\fP] \fB--source-dev\fP {device} \fB--dest-file\fP {file} .fam T .fi .fam T .fi .SH DESCRIPTION \fBthin_migrate\fP copies provisioned data blocks from a thin device to another device or file. It is designed for cloning a read-only snapshot or thin volume within a live thin-pool. A metadata snapshot is required to read the data mappings. .SH OPTIONS .TP .B \fB-h\fP, \fB--help\fP Print help and exit. .TP .B \fB-V\fP, \fB--version\fP Print version information and exit. .TP .B \fB--source-dev\fP {device} The input read-only thin device to copy. .TP .B \fB--dest-dev\fP {device} The output device as the copy destination. .TP .B \fB--dest-file\fP {file} The output file as the copy destination. .TP .B \fB-q\fP, \fB--quit\fP Suppress output messages, return only exit code. .TP .B \fB--buffer-size-meg\fP {size} Specify the size of the data buffers, in megabytes. .SH EXAMPLE Assuming that there's a thin snapshot 'vg/snap' to copy, we must first set the snapshot to read-only: .PP .nf .fam C $ lvchange vg/snap --permission r .fam T .fi Next, create a metadata snapshot for running \fBthin_migrate\fP: .PP .nf .fam C $ dmsetup message vg-mythinpool-tpool 0 reserve_metadata_snap .fam T .fi Once the metadata snapshot is created, copy the snapshot into another linear or thin volume. The destination volume must have the same size as the source device. .PP .nf .fam C $ thin_migrate --src-device /dev/vg/snap --dest-device /dev/vg2/dest .fam T .fi Alternatively, copy the snapshot into a file. \fBthin_migrate\fP can optionally create the destination file if it is not present, or the size of the file will be truncated to match that of the source device. .PP .nf .fam C $ thin_migrate --src-device /dev/vg/snap --dest-file dest.bin .fam T .fi Finally, release the metadata snapshot after \fBthin_migrate\fP finishes its job: .PP .nf .fam C $ dmsetup message vg-mythinpool-tpool 0 release_metadata_snap .fam T .fi .SH DIAGNOSTICS \fBthin_migrate\fP returns an exit code of 0 for success or 1 for error. .SH AUTHOR Joe Thornber