Where can I find a BTRFS guide?

Excuse my newbie questions.

If I add 2 drives to a pool in rockstor, what kind of configuration is used here? Is this set up as raid0, or something else?

I found this guide here,

And it mentioned this,

Without any further switches, this file system uses RAID0 for data (non-redundant) and RAID1 for metadata (redundant).

Does this apply to rockstore, the concept of metadata and it being redundant? Can you rebulid data from the metadata if a drive fails?

Is there an easy way to query the file sytem setup and understand which disks are present, what metadata is present, and how the data is distributed?

I’m fairly new to Rockstor myself, but it appears to use RAID1 for everything (on a pool I’ve added as RAID1)

[root@rockvm ~]# btrfs filesystem df /mnt2/pool1/
Data, RAID1: total=624.00MiB, used=192.00KiB
System, RAID1: total=32.00MiB, used=16.00KiB
Metadata, RAID1: total=256.00MiB, used=128.00KiB
GlobalReserve, single: total=16.00MiB, used=0.00B

while using RAID0 for a pool that was added as RAID0:

[root@rockvm ~]# btrfs filesystem df /mnt2/pool0
Data, RAID0: total=204.75MiB, used=128.00KiB
System, RAID0: total=16.00MiB, used=16.00KiB
Metadata, RAID0: total=204.75MiB, used=128.00KiB
GlobalReserve, single: total=16.00MiB, used=0.00B

You can use the web interface (in addition to the command line btrfs command set) to see what’s what:

Hope that helps!

Thanks. Mine looks like this,

Data, single: total=1.34TiB, used=1.34TiB
System, DUP: total=8.00MiB, used=160.00KiB
Metadata, DUP: total=2.50GiB, used=1.50GiB
GlobalReserve, single: total=512.00MiB, used=0.00B

So mine is neither marked as raid0 or raid1?

Mine is marked as single in the configuration, but I am actually spanning multiple disks.

Is the distinction that a file is either stored on 1 disk in single mode, and spanned multiple disks for raid0?

I attempted to move it to raid0, and it gave me an error.

Error running a command. cmd = btrfs balance start -mconvert=raid0 -dconvert=raid0 /mnt2/MainPool. rc = 1. stdout = [’’]. stderr = [“ERROR: error during balancing ‘/mnt2/MainPool’: Invalid argument”, ‘There may be more info in syslog - try dmesg | tail’, ‘’]

Log has this in it.

[ 537.687880] perf: interrupt took too long (2525 > 2500), lowering kernel.perf_event_max_sample_rate to 79000
[ 667.620140] perf: interrupt took too long (3194 > 3156), lowering kernel.perf_event_max_sample_rate to 62000
[ 1021.538923] perf: interrupt took too long (4033 > 3992), lowering kernel.perf_event_max_sample_rate to 49000
[ 3190.969719] BTRFS error (device sdc): balance will reduce metadata integrity, use force if you want this
[ 3191.752444] kvm: disabled by bios
[ 3191.762388] kvm: disabled by bios
[ 3191.762578] intel_powerclamp: No package C-state available
[ 3191.773394] intel_powerclamp: No package C-state available
[ 3196.000543] BTRFS error (device sdc): balance will reduce metadata integrity, use force if you want this
[ 3633.166886] BTRFS error (device sdc): balance will reduce metadata integrity, use force if you want this

I assume it basically means that converting to raid0 on the metadata is a bad idea?

I was able to get around it by adding the -f option. But I am still not sure this was a good idea? My data is replicated in multiple places so the prospect of a drive failure is not so important for me.

RAID0 means that your data is simply split over >1 disk, with no redundancy. That means that having a RAID0 setup of 2 1GB drives gives you 1+1 = 2GB of storage. It also means that if one of the disks shits the bed, your data is gone.

RAID1 means your data is always redundant; having a RAID1 setup of 2 1GB drives gives you 1GB of storage (adding a third 1GB drive would give you 1.5GB of storage. It also means that if one of the drives shits the bed, your data can be rebuilt.

Right now you went from single (which I don’t know much about, beyond what the popover in Rockstor tells you about it) to RAID0, and it seems that BTRFS is nice enough to warn you about you possibly shooting yourself in the foot with this. If you don’t care about your data integrity, RAID0 is fine and gives you more storage.

Thanks. It seems that single mode gives me the same storage as raid0, as my 2 x 2T drives were 4TB in single mode.

But my guess is that writing a file to a pool in single mode will write the file to 1 drive rather than splitting it.

Whereas writing a file to a pool in raid0 will split the file between disks.

This would I expect result in a faster write speed and read speed as two disks can be writing or reading in parallel. This is something I will try when my raid0 balance has finished.

Please others, I would be very interested in finding the definite difference between raid0 and single.

@petermc There is some info in our Redundancy profiles section of the docs in the Pools section. Although we have an outstanding errata on the raid10 write up there (it effectively only handles a single drive failure), but the other profiles look to be OK.

@petermc Just a note on this re the DUP Metadata on the single profile:

As per:

which was addressed by @suman in:
https://github.com/rockstor/rockstor-core/commit/5f553c8c74c067b23e10adf28edc8cdb7670902c
and included in released Rockstor as of:

Rockstor enforces a DUP metadata on all newly created Single profile pools just to give a little more safety, at least on the meta data front.

Hope that helps to explain your DUP metadata result when selecting a Single profile.