Questions tagged [reflink]

A reflink is a type of lightweight copy in btrfs and xfs.

Filter by
Sorted by
Tagged with
5 votes
2 answers

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/...
mgutt's user avatar
  • 407
2 votes
0 answers

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 ...
bczhc's user avatar
  • 21
3 votes
1 answer

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 --...
HappyFace's user avatar
  • 1,533
18 votes
1 answer

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;
hanshenrik's user avatar
3 votes
0 answers

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 ...
darkdragon's user avatar
0 votes
1 answer

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 ...
user1994405's user avatar
9 votes
1 answer

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 ...
TheSola10's user avatar
  • 201
6 votes
1 answer

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 ...
Daniel Alder's user avatar
8 votes
1 answer

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 ...
Dan's user avatar
  • 9,432
22 votes
1 answer

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 ...
Philipp Claßen's user avatar