Bug 631909 - RFE: storage clone: Use equivalent of cp --reflink=auto, gives us btrfs CoW
Summary: RFE: storage clone: Use equivalent of cp --reflink=auto, gives us btrfs CoW
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-09-08 16:16 UTC by Josef Bacik
Modified: 2015-03-16 15:45 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-16 15:45:05 UTC
Embargoed:


Attachments (Terms of Use)

Description Josef Bacik 2010-09-08 16:16:53 UTC
Instead of copying the entire backing storage when doing a clone of a guest, use cp --reflink=auto.  This will allow us to use BTRFS's CoW functionality to quickly clone the storage, and will fall back to the standard boring copy if the filesystem doesn't support it.  That way I don't have to wait 20 minutes while my guests storage is copied :).

Comment 1 Cole Robinson 2012-01-18 15:47:22 UTC
This is really a libvirt request.

Comment 2 Cole Robinson 2012-06-07 13:46:27 UTC
Moving to upstream tracker

Comment 3 Ján Tomko 2015-03-16 15:45:05 UTC
The support for a reflink copy is now upstream. It has to be explicitly requested and there is no fallback.

commit 219ea41d8dbad32137b4376ecb17fa958d5751b8
Author:     Chen Hanxiao <chenhanxiao.com>
AuthorDate: 2015-02-03 11:05:27 +0800
Commit:     John Ferlan <jferlan>
CommitDate: 2015-02-03 11:37:30 -0500

    virsh-volume: add support for --reflink
    
    Add support for --reflink to the virsh 'vol-create-from' and 'vol-clone'
    commands to signify usage of the VIR_STORAGE_VOL_CREATE_REFLINK flag in the
    ensuing virStorageVolCreateXMLFrom API call.
    
    Updated the man page to describe the new flag.
    
    Signed-off-by: Chen Hanxiao <chenhanxiao.com>

git describe: v1.2.12-70-g219ea41 contains: v1.2.13-rc1~129

commit 95da191376c4893ad3da1a7b37594f679fab9e03
Author:     Chen Hanxiao <chenhanxiao.com>
AuthorDate: 2015-01-23 18:22:35 +0800
Commit:     Ján Tomko <jtomko>
CommitDate: 2015-01-27 13:41:14 +0100

    storage: add a flag to clone files on btrfs
    
    When creating a RAW file, we don't take advantage
    of clone of btrfs.
    
    Add a VIR_STORAGE_VOL_CREATE_REFLINK flag to request
    a reflink copy.
    
    Signed-off-by: Chen Hanxiao <chenhanxiao.com>
    Signed-off-by: Ján Tomko <jtomko>

git describe: v1.2.12-18-g95da191 contains: v1.2.13-rc1~181


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