Gentoo Archives: gentoo-user

From: Marc Joliet <marcec@×××.de>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] [offtopic] Copy-On-Write ?
Date: Fri, 08 Sep 2017 19:10:57
Message-Id: 1567385.BspqRDO7u5@thetick
In Reply to: [gentoo-user] [offtopic] Copy-On-Write ? by Helmut Jarausch
1 Am Donnerstag, 7. September 2017, 17:46:27 CEST schrieb Helmut Jarausch:
2 > Hi,
3 >
4 > sorry, this question is not Gentoo specific - but I know there are many
5 > very knowledgeable people on this list.
6 >
7 > I'd like to "hard-link" a file X to Y - i.e. there is no additional
8 > space on disk for Y.
9 >
10 > But, contrary to the "standard" hard-link (ln), file Y should be stored
11 > in a different place (inode) IF it gets modified.
12 > With the standard hard-link, file X is the same as Y, so any changes to
13 > Y are seen in X by definition.
14 >
15 > Is this possible
16 > - with an ext4 FS
17 > - or only with a different (which) FS
18
19 This has come to be referred to as reflinks (see, e.g., the cp(1) man page).
20 I don't think ext4 supports them, but both btrfs and xfs do (xfs only very
21 recently, though, see for example [0]). There might be other FSs that support
22 it, too (bcachefs?), but I don't know about that.
23
24 Maybe at some point ext4 will add support for it, but since I mainly use btrfs
25 I don't care that much.
26
27 [0] http://strugglers.net/~andy/blog/2017/01/10/xfs-reflinks-and-deduplication/
28
29 > Many thanks for a hint,
30 > Helmut
31
32 HTH
33 --
34 Marc Joliet
35 --
36 "People who think they know everything really annoy those of us who know we
37 don't" - Bjarne Stroustrup

Attachments

File name MIME type
signature.asc application/pgp-signature