You are not logged in.

#1 2013-04-30 11:25:12

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 807

[SOLVED] BTRFS question

Hi!
I'd like to give btrfs a shot. Thanks to our wiki, it seems really easy to convert an existing ext4 partition to btrfs.
But I'm stuck with this problem: i'd like to try btrfs lzo transparent data compression, but i'm now mounting my root in "rw" mode, so i'm bypassing fstab.
How can i use compress=lzo without modifying this behaviour? Or the only soution is to revert to "ro" and remount my root in fstab with compress=lzo mode?
Thank you very much!
Bye!

Last edited by nierro (2013-04-30 11:32:00)

Offline

#2 2013-04-30 11:28:42

65kid
Member
From: Germany
Registered: 2011-01-26
Posts: 663

Re: [SOLVED] BTRFS question

rootflags=compress=lzo

Offline

#3 2013-04-30 11:31:42

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 807

Re: [SOLVED] BTRFS question

You were really *fast* ! smile
Thank you very much!!

Offline

#4 2013-04-30 12:41:06

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 5,152

Re: [SOLVED] BTRFS question

Incidentally, the compression only applies to *new* files, not existing files. I believe that you can make the filesystem compress the old files (assuming they're compressible) by defragmenting it.

btrfsFAQ

You might consider remounting with -o compress, and either rewrite particular files in-place, or run btrfs fi defragment to recompress everything. This may take a while.

Unless something has changed, that command won't actually defrag everything, you need to do this: https://btrfs.wiki.kernel.org/index.php … n.27t_work

I don't use compression on my btrfs partitions, so I can't comment on whether defragmenting it does what the FAQ says it should.


Sakura:-
Mobo: ASUS P8Z77-V PRO // Processor: Intel Core i7-3770K 3.4GHz // GFX: nVidia GeForce GTX 970 Ti // RAM: 32GB (4x 8GB) Corsair DDR3 (@ 2133MHz) // Storage: 1x 3TB Seagate SATAII 5x 1TB Samsung SATAII, 2x 120GB Corsair SSD

Offline

#5 2013-04-30 12:46:16

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 807

Re: [SOLVED] BTRFS question

Well, i'm aware of that, but thanks for pointing it out.
Arch wiki says

find / -xdev -type f -print -exec btrfs filesystem defrag '{}' \;

to defragment everything.
So you think i must do this to enable compression on every file? This is good!

Offline

Board footer

Powered by FluxBB