Cache -> Single to Pool (with different sizes)


8 posts in this topic Last Reply

Recommended Posts

Can someone help me understand if/how this can happen

Here's what I got:

  • Current Setup: Single M.2 256Gb drive setup as Cache (formatted BTRFS)
  • Future Setup: Two M.2 drives - existing 256Gb & 1TB

 

My thoughts/questions:

  • Do I need (or should I) format/partition the new 1TB drive into 250 & 750 segments to match existing setup? (while I know it is not a requirement that the sizes be the same - as BTRFS can handle mismatched sizes) - I'd like to use the extra 750Gb for another/different share other than cache (since this portion won't be mirrored)
  • Will mirroring of the old data happen automagically once setup/established as a pair?
  • The instructions on wiki.unraid.net seem like, if followed, will add the compete new 1TB to the cache creating a portion that is mirror and a portion that is not? or does it just ignore the other 750GB?
  • Is there a CLI method to complete/do this? Any reason to have to 'go there'?
  • Anything else I'm missing or should consider

 

Thanks so much in advance for the help/guidance!

Link to post

It doesn't work like that.

 

I don't know of any way to specify redundancy and still use the wasted capacity using BTRFS.

 

BTRFS either treats each member as part of a redundant set (RAID1), or as an individual volume adding up all members with no redundancy or striping (Single), or a striped set with no redundancy (RAID0).

 

https://btrfs.wiki.kernel.org/index.php/Using_Btrfs_with_Multiple_Devices

Link to post

Unraid doesn't support more than one partition per disk. The only way to access multiple partitions is via the Unassigned Devices plugin, in which case the whole of the device would have to remain outside the array and cache pool.

Link to post
6 minutes ago, John_M said:

Unraid doesn't support more than one partition per disk. The only way to access multiple partitions is via the Unassigned Devices plugin, in which case the whole of the device would have to remain outside the array and cache pool.

 

ahhh....the best laid plans....thanks for the clarification.

I guess it would help to add a note to the Wiki/UnRaid docs that while BTRFS doesn't require matched sizes - that the remainder would be wasted in this situation?

Link to post
45 minutes ago, John_M said:

You could make use of the "wasted" space by adding more devices to make it a 3- or 4-device pool. Take a look at the btrfs calculator at https://carfax.org.uk/btrfs-usage/

 

 

Hmmm....ok....so you've got me thinking.  I believe that you're saying is to do this:

  • Current Setup: Single M.2 256Gb drive setup as Cache (formatted BTRFS)
  • Future Setup: THREE M.2 drives - existing 256Gb & 1TB & 750GB

In that way I could combine the three to make a single 1TB cache?

Link to post

The useful thing about the caculator is that you can play with different combinations before committing to any of them. I ended up with a five-device pool (3 x 240GB and 2 x 256GB) in RAID 10 with ~616GB usable and no wastage, just by using up what SSDs I had available.

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.