Dual Cache Drive Redundancy and Storage Size w/ Different Sized Drives


coolspot

17 posts in this topic Last Reply

Recommended Posts

Hello Everyone,

 

When I first configured unRAID a few days ago I used a 250GB SSD as my cache drive. I pulled a 500GB SSD today and installed it into my unRAID server as a secondary cache drive.

 

I was expecting unRAID to report that I have 250GB of cache space (RAID 1/smallest drive size?) but instead, unRAID reports 375GB which seems to be the mid-point between 250GB and 500GB.

 

How is unRAID providing redundancy larger than the smallest drive? Does BTRFS redundancy work differently and is more efficient than RAID 1?

 

Thanks.

Link to post

Hello Everyone,

 

When I first configured unRAID a few days ago I used a 250GB SSD as my cache drive. I pulled a 500GB SSD today and installed it into my unRAID server as a secondary cache drive.

 

I was expecting unRAID to report that I have 250GB of cache space (RAID 1/smallest drive size?) but instead, unRAID reports 375GB which seems to be the mid-point between 250GB and 500GB.

 

How is unRAID providing redundancy larger than the smallest drive? Does BTRFS redundancy work differently and is more efficient than RAID 1?

 

Thanks.

Its not.  btrfs itself reports an incorrect size.  Known bug in btrfs.  You only have 250GB of space available.
Link to post

Its not.  btrfs itself reports an incorrect size.  Known bug in btrfs.  You only have 250GB of space available.

 

Thank you for the clarification, will unRAID properly detect the file system as getting full and switch over to the array or will it get confused because of the wrong size reported?

 

Thanks.

 

Link to post

Its not.  btrfs itself reports an incorrect size.  Known bug in btrfs.  You only have 250GB of space available.

 

Thank you for the clarification, will unRAID properly detect the file system as getting full and switch over to the array or will it get confused because of the wrong size reported?

 

Thanks.

TBH, I think that it'll get messed up on the free space available.  But easy work around is to set the minimum cache free space to a value that'll ensure it never attempts writes to cache enabled shares if the drives are actually full
Link to post

Best solution is not to mix sizes for raid1. Are you saving up for another 500?

 

I have two SSD, a Samsung EVO 840 250GB and Samsung EVO 840 500GB.

 

Even if I wanted to get 2x500GB SSDs, it would be hard to find a matching EVO 840.

 

I would have assumed, since unRAID is doing software mirroring, that it would have created the cache partition size based on the smallest drive size (250GB in this case).

Link to post

I would have assumed, since unRAID is doing software mirroring, that it would have created the cache partition size based on the smallest drive size (250GB in this case).

The unRAID storage array uses a proprietary software RAID implementation. The cache pool is based on BTRFS though.  It's immature and has some neat features... as well as some quirks.

Link to post
  • 2 years later...

Is this still a known bug with BTRFS in unRAID RAID 1 set with multiple drive sizes in a cache pool? What happens if it reports more then the smallest size drive, you go over that size, does it just copy to the array?

Link to post

As far as I know it still reports size incorrectly for different sized disks. I don't know if that affects Minimum Free for cache or not.

 

Do you know how Minimum Free works? That is important even if the reported size is correct.

Link to post
6 minutes ago, Trembler said:

Is this still a known bug with BTRFS in unRAID RAID 1 set with multiple drive sizes in a cache pool?

Yes.

 

6 minutes ago, Trembler said:

What happens if it reports more then the smallest size drive, you go over that size, does it just copy to the array?

You'll get ENOSPC error.

Link to post

I think there is still a lot of confusion about this. We have people running multiple sizes and whatever the free is (larger then smallest) they are able to utilize that space on their raid1 cache pool. For example if you have a 250gb and a 500gb that will show around 378 gb of useable space. In a traditional raid1 set only 250gb of that should be useable (smallest disk) However, in the BTRFS raid1 set it appears it does allow you to fill what it reports as this is how it's supposed to work with BTRFS raid1.. it's not a traditional RAID1. So is this really a visual bug? If you do the BTRFS RAID calculation and compare to what shows in your cache pool it's almost dead on.

 

What is the clarification on why some people say one thing and some people say another?

 

Examples

 

https://seravo.fi/2015/using-raid-btrfs-recovering-broken-disks

 

Explained well here with how it caculates

 

https://amp.reddit.com/r/btrfs/comments/a95kbz/usable_space_calculation/

 

Link to post
46 minutes ago, Trembler said:

I think there is still a lot of confusion about this.

There's no confusion whatsoever, btrfs raid1 does have some differences to other raid1 implementations, mostly when used with more than 2 devices, but like any other raid1 I know of it still requires that all data exists in at least 2 different devices, so think about it, how can data exist on at least 2 different devices and use more space than the one available on the smallest device?

 

48 minutes ago, Trembler said:

Explained well here with how it caculates

You can use this to see how it really calculates:

https://carfax.org.uk/btrfs-usage/

 

Link to post
  • 1 year later...
Posted (edited)

All this makes sense, but then I just wonder, until the file system reports proper size for RAID1 with different size drives, why doesn't Unraid simply work around this and say 'I see the smallest drive in your cache pool is 250GB, so I'll be sure cache doesn't go over that, and show that as your cache size"? It could be a toggle option for reported/actual size or something, or show both...

I'm guessing it either isn't as simple as that, or Unraid simply wants to report what file systems do, and leave it up to the file systems to improve and address that.

I guess if it was that simple, the file system would do it too... but it seems like the needed info for accurate reporting is right there in the UI, showing the drive sizes accurately, so determining the smallest and not going over that sounds straightforward...

Edited by Hastor
Link to post
9 hours ago, Hastor said:

until the file system reports proper size for RAID1 with different size drives

It already does report correct used and free space (except in some unrelated cases due to btrfs bug), this thread is from 2020.

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.