Questions tagged [reflink]
A reflink is a type of lightweight copy in btrfs and xfs.
10
questions
5
votes
2
answers
501
views
How to find out if the filesystem supports reflink copies?
I try to create a snapshot copy of a directory recursively, but it returns errors for every single file if the filesystem (custom shfs) does not support reflink copies:
# cp -a --reflink=always /mnt/...
2
votes
0
answers
262
views
Why so much btrfs-send data for reflinks
I'm experiencing a very weird Btrfs "send" issue with file reflinks, and after so many trials, I found the details:
First, I created a subvolume called "1":
btrfs subvolume create ...
3
votes
1
answer
849
views
GNU cp: What's the difference between `--link` and `--reflink=always`?
What's the difference between --link and --reflink=always?
I use the following command as an mv substitute, and I am wondering if using --reflink is a better choice.
command gcp -r --link --archive --...
18
votes
1
answer
5k
views
In Linux, which filesystems support reflinks?
btrfs supports reflinks, XFS supports reflinks (since 2017 I think?).
Are there any other filesystems that support it?
truncate -s 1G test.file;
cp --reflink=always test.file ref.test.file;
3
votes
0
answers
258
views
Combine mkfifo and cp --reflink to append files without copying data
I have huge files {0..9}.bin which I want concatenate into out.bin. I don't need the original files afterwards. So I was wondering, if this is possible by only modifying the filesystem index without ...
0
votes
1
answer
240
views
Reflink copy diff
I want to make a behaviour like btrfs send and btrfs receive, but on a per-file basis.
As far as I see it, I can use cp -ax --reflink=always to make a "snapshot" of the file.
Let's assume that two ...
9
votes
1
answer
6k
views
Is there a way to enable reflink on an existing XFS filesystem?
I currently have a 4TB RAID 1 setup on a small, personal Linux server, which is formatted as XFS in LVM. I am interested in enabling the reflink feature of XFS, but I did not do so when I first ...
6
votes
1
answer
1k
views
Detect btrfs reflinked files
It's clear, with cp --reflink foo bar I can copy a file on btrfs without wasting space. But how can I detect that the two files (foo and bar here) are using the same "space unit"?
If they ...
8
votes
1
answer
2k
views
What does a rmlint's "clone" for btrfs do?
I was reading the rmlint manual, and one of the duplicate handlers are clone and reflink:
· clone: btrfs only. Try to clone both files with the BTRFS_IOC_FILE_EXTENT_SAME ioctl(3p). This will ...
22
votes
1
answer
15k
views
Why does "cp -R --reflink=always" perform a standard copy on a Btrfs filesystem?
Btrfs support Copy-On-Write. I tried to use that feature to clone a directory:
cp -R --reflink=always foo_directory foo_directory.mirror
I expected the command to finish almost instantly (like a ...