Mailinglist Archive: opensuse (1620 mails)

< Previous Next >
Re: [opensuse] When not to use Btrfs for /home?
On 11/18/2014 02:47 PM, John Andersen wrote:
On 11/18/2014 05:22 AM, Anton Aylward wrote:
You can set up a relation -- that is a HARD LINK --
between a file in the subvolume and elsewhere on the FS, possibly in
another subvolume.

Are you sure of this?

http://comments.gmane.org/gmane.comp.file-systems.btrfs/7031


That thread is from 2010. It is now the end of 2014 and a lot more work
has been done on BtrFS since then.



Hardlinks did when I tried it back when I had a btrFS as everything all
on the one disk and nothing else and a number of subvolumes. Lined from
something under subvolume /home to subvolume /tmp.

The 'causes bugs' doesn't make sense.

If I had a single FS ext4Fs system I could hard link as in the example
above, so why not on BtrFS? It does say in the docs that subvolumes are
like directories :-)

The last post at your reference says


If btrfs is to support deduplication one day, it has to work across
subvolumes - otherwise, it won't be very useful.

I agree with that.

Right now we do have tools, I forget the name, which walks a FS and
looks for identical files to hardlink so as to reduce space used.
Are you saying those tools won't work on BtrFS?


I say they do. I say hard links do work. Here's my evidence.
Right now I have BtrFS as ROOT and it has zypper snapshotting enabled so
I have the following

# btrfs subvolume list /
ID 269 gen 343531 top level 5 path .snapshots
ID 541 gen 341419 top level 269 path .snapshots/1/snapshot
ID 542 gen 341419 top level 269 path .snapshots/2/snapshot
ID 544 gen 341419 top level 269 path .snapshots/3/snapshot
ID 545 gen 341419 top level 269 path .snapshots/4/snapshot
ID 546 gen 343373 top level 269 path .snapshots/5/snapshot
ID 547 gen 343378 top level 269 path .snapshots/6/snapshot
Mainbox:~ #


# ls -li /etc/hosts /.snapshots/6/snapshot/etc/hosts
863349 -rw-r--r-- 1 root root 1268 Jun 13 18:37 /etc/hosts
863349 -rw-r--r-- 1 root root 1268 Jun 13 18:37
/.snapshots/6/snapshot/etc/hosts

# sum /etc/hosts /.snapshots/6/snapshot/etc/hosts
57395 2 /etc/hosts
57395 2 /.snapshots/6/snapshot/etc/hosts

# cksum /etc/hosts /.snapshots/6/snapshot/etc/hosts
1962092743 1268 /etc/hosts
1962092743 1268 /.snapshots/6/snapshot/etc/hosts



See, same size, same inode.
I believe that constitutes a hard link.




--
A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting frowned upon?

--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >