Clone a file on btrfs in a split of a second
cp --reflink=always file.img clone_of_file.img
Before copying file
$ ls -s1
10485760 Centos53-2.img
Copying 10GB file
$ time cp --reflink=always Centos53-2.img Centos53-2_copy.img
real 0m0.001s
user 0m0.000s
sys 0m0.000s
After copying file
$ ls -s1
10485760 Centos53-2_copy.img
10485760 Centos53-2.img
No comments:
Post a Comment