Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] btrfs raid5/6 status ?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
sdauth
l33t
l33t


Joined: 19 Sep 2018
Posts: 658
Location: Ásgarðr

PostPosted: Fri Nov 22, 2024 11:23 pm    Post subject: [SOLVED] btrfs raid5/6 status ? Reply with quote

Hello,
Anyone using btrfs raid5/6 ? (I plan to do a raid6 with 6x hdd, currently on a 4x hdd btrfs raid10, without issue)
I read it is considered dangerous online but maybe it is not now ? (Almost 2025)
Or should I forget about it and go for mdadm/lvm + xfs/ext4 instead ?

Thanks.


Last edited by sdauth on Sun Nov 24, 2024 5:06 pm; edited 1 time in total
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3910

PostPosted: Sat Nov 23, 2024 2:17 am    Post subject: Reply with quote

IIRC it's far from being declared stable.
And chances are it won't be for a long while...
btrfs.readthedocs.io

Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3747
Location: Rasi, Finland

PostPosted: Sat Nov 23, 2024 5:49 am    Post subject: Reply with quote

You should then go with btrfs-raid1 with three copies.
That'll guarantee you raid6 like failure protection.

Although lvm+xfs isn't a bad choice either.
_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
sdauth
l33t
l33t


Joined: 19 Sep 2018
Posts: 658
Location: Ásgarðr

PostPosted: Sat Nov 23, 2024 12:16 pm    Post subject: Reply with quote

CaptainBlood wrote:
IIRC it's far from being declared stable.
And chances are it won't be for a long while...
btrfs.readthedocs.io

I read too fast!
I saw "Scrub + RAID56 mostly OK mostly OK" but missed the part below :lol: (Block group profiles / RAID56 : unstable)
Well.. :cry:

Zucca wrote:
You should then go with btrfs-raid1 with three copies.
That'll guarantee you raid6 like failure protection.

Although lvm+xfs isn't a bad choice either.

I've thought about that but I really need the extra tb with a little safety net. At least until I can get a 12tb hdd to make a full mirror of that array. (hopefully sooner than later)
In general I always make backup, including for raid just in case of catastrophic failure (I lost a raid10 5 years ago so I now I know :o ) but anyway this new array will only have archived stuff so it can wait a little bit.

I think I'll stay reasonable and go for mdadm + lvm/xfs then. (Hopefully dedup is as good as with btrfs!)
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3910

PostPosted: Sat Nov 23, 2024 12:47 pm    Post subject: Reply with quote

What is/are the feature(s) you want to benefit from?

Side note. there is a link in the btrfs doc that dives in a little more.
Maybe u got there already... 8)

Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
sdauth
l33t
l33t


Joined: 19 Sep 2018
Posts: 658
Location: Ásgarðr

PostPosted: Sat Nov 23, 2024 1:09 pm    Post subject: Reply with quote

CaptainBlood wrote:
What is/are the feature(s) you want to benefit from?


Right now, the data sits on multiple hdd. (external too, so painful to access / navigate and slow) The goal is to consolidate that on a raid6 to benefit from higher read speed and by using btrfs, having the possibility to dedup this data. I think I could at least dedup 500GB (at some point in the past, I ran dedup on this particular set of data and was able to save hundred of gb), potentially more. But apparently it is possible to have dedup with xfs too. Although I will have to read a little bit on that since I never used this filesystem yet. Apparently, checksumming is possible with xfs too, but only metadata. But in my case it is not crucial anyway.
Back to top
View user's profile Send private message
pingtoo
Veteran
Veteran


Joined: 10 Sep 2021
Posts: 1290
Location: Richmond Hill, Canada

PostPosted: Sat Nov 23, 2024 3:10 pm    Post subject: Reply with quote

Looking forward, I read Linux v6.13 have lots improvement in file system. those improvement first got in XFS and EXT. So may want to wait a bit to capture the benefit from new Linux kernel.
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3747
Location: Rasi, Finland

PostPosted: Sat Nov 23, 2024 6:17 pm    Post subject: Reply with quote

sdauth wrote:
I really need the extra tb with a little safety net.
btrfs-raid1 with three copies guarantees that for each file you have, it'll store two more copies on two separate disks. So it'll give you around the same amount of space as RAID6. I don't know how many copies does btrfs-raid1 supports nowdays, but I think it'll go to four, or even more. So four means you can lose three disks without data loss.
The original btrfs-raid1 (which is the default, I think) distributes each file twice on different disks, so that's like RAID5.

btrfs "raid" works on file-level, not on physical disk level.

I'd still be using btrfs mainly if it weren't so slow at scrubbing and if it could host swap files on multidisk volume.
_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
sdauth
l33t
l33t


Joined: 19 Sep 2018
Posts: 658
Location: Ásgarðr

PostPosted: Sat Nov 23, 2024 7:32 pm    Post subject: Reply with quote

@Zucca, I'm a little confused then.
With mdadm, raid 6 with 6x3tb = 12tb usable storage.
With btrfs raid1 https://btrfs.readthedocs.io/en/latest/mkfs.btrfs.html#mkfs-section-profiles
It gives me 9TB, I used : https://www.carfax.org.uk/btrfs-usage

Code:
Total space for files:   9000
Total raw disk space:   18000
Unusable:   0


Unfortunately, I really need the 12tb volume, otherwise it could have worked. Please correct if I'm wrong. I'm still running smartmontools on two hdd so no array is created yet 8)
Back to top
View user's profile Send private message
ecko
Tux's lil' helper
Tux's lil' helper


Joined: 04 Jul 2010
Posts: 111

PostPosted: Sat Nov 23, 2024 9:13 pm    Post subject: Reply with quote

sdauth wrote:

With mdadm, raid 6 with 6x3tb = 12tb usable storage.
With btrfs raid1 https://btrfs.readthedocs.io/en/latest/mkfs.btrfs.html#mkfs-section-profiles
It gives me 9TB, I used : https://www.carfax.org.uk/btrfs-usage


I think your values are correct.

With raid1, it will use 3 drives to store and 3 drives as a mirror. The usable space is therefore only 3 drives (9 Tb). That means a space utilization of 50% as in the table in the link you quoted. Since there is a full mirror of each drive, a raid1 array is tolerant to 1 fault.

With raid1c3, it would use 2 drives to store, 2 drives as a mirror, and 2 drives as another mirror. giving 6 Tb of usable space (33% of the total), and resilience to 2 faults.

Raid5/6 distribute the data and copies on all the drives, and manages to have a space utilization of 75%, which gets 12 Tb out of the total 18.
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3747
Location: Rasi, Finland

PostPosted: Sun Nov 24, 2024 7:20 am    Post subject: Reply with quote

sdauth wrote:
@Zucca, I'm a little confused then.
With mdadm, raid 6 with 6x3tb = 12tb usable storage.
With btrfs raid1 https://btrfs.readthedocs.io/en/latest/mkfs.btrfs.html#mkfs-section-profiles
It gives me 9TB, I used : https://www.carfax.org.uk/btrfs-usage

Code:
Total space for files:   9000
Total raw disk space:   18000
Unusable:   0
Yes. I've totally counted the numbers wrong. It's been a while since I used btrfs. Sorry for the confusion.

If you want the speed and space efficiency, then use mdraid (or LVM).
_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
sdauth
l33t
l33t


Joined: 19 Sep 2018
Posts: 658
Location: Ásgarðr

PostPosted: Sun Nov 24, 2024 5:06 pm    Post subject: Reply with quote

@Zucca: No problem :wink:
I finally end up setting up a mdadm raid6 with luks on /dev/md0 & a single xfs partition on the mapper, it took a while to fully resync
Maybe I could have use lvm but it seemed a bit overkill after second thought. I don't intend to do any kind of resize or put root on it (an old ssd is good enough for that)
Now moving the files on it.. :o
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3747
Location: Rasi, Finland

PostPosted: Sun Nov 24, 2024 5:26 pm    Post subject: Reply with quote

XFS is a good choice for big partitions.

Since it supports reflinking nowdays, you can create snapshot -like copies.
And I think deduplication is also on the menu.
_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum