From: Prasanna Kumar Kalever <pkalever@redhat.com>
To: xfs@oss.sgi.com
Cc: Brian Foster <bfoster@redhat.com>, Dave Chinner <dchinner@redhat.com>
Subject: How to copy files with preserving reflinks ?
Date: Fri, 26 Feb 2016 01:37:57 -0500 (EST) [thread overview]
Message-ID: <957291997.53773945.1456468677495.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <1112951359.53758727.1456466113255.JavaMail.zimbra@redhat.com>
Hi,
I have a VM file with reflinks to it, the reflinks were taken every night.
My question is how to copy/migrate all these file to a different xfs partition (which also have reflink enabled) without loosing the reflinks property, else may lead to copy all the shared blocks per file which will cost large disk space.
I have tried to copy them using rsync as below:
On Partition 1:
ActualFile.img -- [1] Actaul Size 10GB + [2] Append 2GB + [3] Append 1GB
ReflinkCopy1 -- [1] Actual Size 0 -- Shared blocks 10GB
ReflinkCopy2 -- [2] Actual Size 0 -- Shared blocks 12GB
I have first rsync the files into Partition 2 as below:
# cd PARTITION2
# rsync /PARTITION1/ReflinkCopy1 ActualFile.img
# du -sh ActualFile.img
10GB
# cp --reflink=always ActualFile.img
# rsync /PARTITION1/ReflinkCopy2 ActualFile.img
# du -sh ActualFile.img
12GB
# cp --reflink=always ActualFile.img
# rsync /PARTITION1/ActualFile.img ActualFile.img
But the size used by partition was 35GB (verified using df -h) instead of 13GB
Also, where can I find reflink related tools ?
Thanks,
-Prasanna
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next parent reply other threads:[~2016-02-26 6:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1112951359.53758727.1456466113255.JavaMail.zimbra@redhat.com>
2016-02-26 6:37 ` Prasanna Kumar Kalever [this message]
2016-02-26 7:31 ` How to copy files with preserving reflinks ? Prasanna Kumar Kalever
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=957291997.53773945.1456468677495.JavaMail.zimbra@redhat.com \
--to=pkalever@redhat.com \
--cc=bfoster@redhat.com \
--cc=dchinner@redhat.com \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox