1 |
On 17-09-07 at 17:46, Helmut Jarausch wrote: |
2 |
> Hi, |
3 |
Hello, |
4 |
|
5 |
> sorry, this question is not Gentoo specific - but I know there are many |
6 |
> very knowledgeable people on this list. |
7 |
> |
8 |
> I'd like to "hard-link" a file X to Y - i.e. there is no additional |
9 |
> space on disk for Y. |
10 |
> |
11 |
> But, contrary to the "standard" hard-link (ln), file Y should be stored |
12 |
> in a different place (inode) IF it gets modified. |
13 |
> With the standard hard-link, file X is the same as Y, so any changes to |
14 |
> Y are seen in X by definition. |
15 |
|
16 |
> Is this possible |
17 |
> - with an ext4 FS |
18 |
> - or only with a different (which) FS |
19 |
You can use GNU coreutil's `cp --reflink=always'. This will, however, |
20 |
only work on filesystems which support the operation (afaik so far only |
21 |
btrfs). Though other CoW filesystems (such as ZFS) have similar |
22 |
capabilities with snapshotting. |
23 |
|
24 |
The only other possibility I know of would be creating an lvm partition |
25 |
for that file and using lvm snapshots. |
26 |
|
27 |
You should also be able to implement the functionality via fuse on top |
28 |
of an ext4 base if the other solutions aren't to your taste. |
29 |
|
30 |
-- |
31 |
Simon Thelen |