我google了很多次但找不到答案.我想要的是将LVM精简配置卷克隆到另一个瘦卷.
现在我知道dd可以克隆一个瘦卷,如下所示:
dd if = / dev / mapper / vg_thin01 of = / dev / mapper / vg_thin02 bs = 1M
但新的克隆量将是全尺寸!如何使其稀疏/稀疏?
(实际上,精简卷将用于Xen或KVM中的DomU存储)
解决方法
克隆精简卷就像获取待克隆卷的快照一样简单.使用精简卷时,快照和新卷实际上是相同的,具有不同的默认标志.
Once created,the user doesn’t have to worry about any connection
between the origin and the snapshot. Indeed the snapshot is no
different from any other thinly-provisioned device and can be
snapshotted itself via the same method. It’s perfectly legal to
have only one of them active,and there’s no ordering requirement on
activating or removing them both. (This differs from conventional
device-mapper snapshots.)
因此,对精简配置卷进行快照创建CoW克隆是完全合法的.从man page开始:
Example Create first snapshot of an existing ThinLV: # lvcreate -n thin1s1 -s vg/thin1