This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1470562 - Please provide a way to clone thin volumes
Please provide a way to clone thin volumes
Status: NEW
Product: LVM and device-mapper
Classification: Community
Component: lvm2 (Show other bugs)
unspecified
All Linux
unspecified Severity low
: ---
: ---
Assigned To: LVM and device-mapper development team
cluster-qe@redhat.com
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-13 04:24 EDT by Uli Martens
Modified: 2017-07-13 04:24 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
rule-engine: lvm‑technical‑solution?
rule-engine: lvm‑test‑coverage?


Attachments (Terms of Use)

  None (edit)
Description Uli Martens 2017-07-13 04:24:34 EDT
Description of problem:
Sometimes, I want to clone thin logical volumes, to have two thin logical volumes be independent and not being able to merge them by accident.

For non-thin logical volumes, there is already an old open wishlist bug at https://bugzilla.redhat.com/show_bug.cgi?id=638188

For thin lvs, this can be done by the following commands:

  lvcreate -n vm2  --snapshot /dev/vg/vm1
  lvcreate -n vm1a --snapshot /dev/vg/vm1
  lvremove /dev/vg/vm1 
  lvrename /dev/vg/vm1a vm1 
  lvchange -kn /dev/vg/vm1
  lvchange -kn /dev/vg/vm2

This long list of commands is probably way to error-prone to be practical, when the only effective difference to a plain lvcreate --snapshot is the missing origin link.

Providing a shortcut like the command below to that should not be hard to implement:

  lvcreate -n vm2 --clone /dev/vg/vm1

thanks,
Uli

Note You need to log in before you can comment on or make changes to this bug.