Skip to contentSkip to conversation

Change "small" filesystem to normal

DISCUSSION Swâmi Petaramesh 4 participants 6 messages Jul 22, 2012 – Jul 23, 2012 Btrfs file system

lore
Share & tools
lore
#0 lore raw

Hi,

I've created a "small" BTRFS filesystem, where metadata+data are mixed (and metadata are not DUP'ed).

Then I've enlarged the FS to 1 GB ; now I'd like to make it "normal" with separate data and metadata, and "DUP'ed" metadata.

Is there a way tp do this without reformatting the FS ?

TIA, kind regards.

Signature · 2 lines
Swâmi Petaramesh <[email protected]> http://petaramesh.org PGP 9076E32E
Ne cherchez pas : Je ne suis pas sur Facebook.
#1 lore raw
Quoted 9 lines · Swâmi Petaramesh

Hi,

I've created a "small" BTRFS filesystem, where metadata+data are mixed (and metadata are not DUP'ed).

Then I've enlarged the FS to 1 GB ; now I'd like to make it "normal" with separate data and metadata, and "DUP'ed" metadata.

Is there a way tp do this without reformatting the FS ?

No, currently there is no way to do this. You'll have to create a new filesystem with mkfs.btrfs.

Thanks,

Ilya

#2 lore raw
In reply to Swâmi Petaramesh
Quoted 7 lines · On Sun, 22 Jul 2012 17:06:24 +0200 Swâmi Petaramesh <[email protected]>…

Hi,

I've created a "small" BTRFS filesystem, where metadata+data are mixed (and metadata are not DUP'ed).

Then I've enlarged the FS to 1 GB ; now I'd like to make it "normal" with separate data and metadata, and "DUP'ed" metadata.

Considering the metadata overallocation bug [1] is still not fixed even in the latest kernels and no one seems to care all that much, I would not recommend doing that.

Personally I now use a "mixed" filesystem on a 1TB disk without any problems, and do not think there's anything wrong with "mixed". In fact there's been some talk of moving to the mixed mode allocation to be used by default, and maybe even removing support for the "split" mode: see [2].

[1] http://comments.gmane.org/gmane.comp.file-systems.btrfs/17848

[2] http://kerneltrap.org/mailarchive/linux-btrfs/2010/10/29/6885925

Signature · 8 lines
With respect,
Roman

~~~~~~~~~~~~~~~~~~~~~~~~~~~
"Stallman had a printer,
with code he could not see.
So he began to tinker,
and set the software free."
#3 lore raw

You're painfully right Roman,

A freshly formatted 1 GB BTRFS filesystem on which 81 MB of data has been put shows only ~260 MB of free space and reserves something like 2 x 380 MB of metadata.

This is absolutely ridiculous of BTRFS... :-/

Kind regards.

Quoted 24 lines · Roman Mamedov
Quoted 7 lines · On Sun, 22 Jul 2012 17:06:24 +0200 Swâmi Petaramesh <[email protected]>…

Hi,

I've created a "small" BTRFS filesystem, where metadata+data are mixed (and metadata are not DUP'ed).

Then I've enlarged the FS to 1 GB ; now I'd like to make it "normal" with separate data and metadata, and "DUP'ed" metadata.

Considering the metadata overallocation bug [1] is still not fixed even in the latest kernels and no one seems to care all that much, I would not recommend doing that.

Personally I now use a "mixed" filesystem on a 1TB disk without any problems, and do not think there's anything wrong with "mixed". In fact there's been some talk of moving to the mixed mode allocation to be used by default, and maybe even removing support for the "split" mode: see [2].

[1] http://comments.gmane.org/gmane.comp.file-systems.btrfs/17848

[2] http://kerneltrap.org/mailarchive/linux-btrfs/2010/10/29/6885925

#4 lore raw
Quoted 7 lines · Swâmi Petaramesh

You're painfully right Roman,

A freshly formatted 1 GB BTRFS filesystem on which 81 MB of data has been put shows only ~260 MB of free space and reserves something like 2 x 380 MB of metadata.

This is absolutely ridiculous of BTRFS... :-/

That's an artifact of the small size of that filesystem and the default size of allocations, which is why mixed mode exists.

The metadata allocation is about 4% on most filesystems: I see 38gb of allocated but unused metadata space on a 900gb fs and 70gb on a 1.7tb fs, and the referenced threads reports 170gb on what appears to be a 4tb fs; while not ideal, it's not remotely as bad as the 25% overhead of the minimum 256mb*2 metadata allocation on a small 1gb fs*. The behaviour of a small filesystem simply isn't the same as the behaviour of a large filesystem.

* Note that 1gb is still considered a very rather btrfs filesystem, for which mixed mode is recommended!

#5 lore raw
Quoted 2 lines

* Note that 1gb is still considered a very rather btrfs filesystem, for which mixed mode is recommended!

Deleted the wrong word: "a rather small btrfs filesystem" is what I intended.