LVM2 + Bcache experimenting discussion and ideas


Recommended Posts

Hi all,

 

I am currently testing my setup, I have as follows:

 

unRAID:

1 x 2TB Parity Device

3 x 1TB Array Disks

 

Cache:

1 x 120 GB SSD

 

Unassigned Devices:

1 x 2TB HDD

 

So far I have been figuring out my way around, I am not used to slackware or the inner most workings of unRAID but have had plenty of experience in Gentoo, Debian and Ubuntu in the past so will not shy away from things that are too technical.

 

Basically I only use my unRAID cache device for appdata, domains and system folders - only using the Cache Disk and not the unRAID array.

 

So here goes my experimental beginnings...

 

I have successfully added the bcache module into the kernel and have added the bcache-tools. I then set up my unassigned device to be a LVM volume group.

My idea is that I am able to host larger domains by using bcache devices backed by LVM logical volumes (makes it easy to flush dirty data from bcache and then snapshot the logical volume if I ever want to create backups and copy them onto the array for safe keeping at regular intervals).

 

All the above sounds like fun and I am about to start testing to see how it all works and how stable it is.

 

My question to the community is about the unRAID cache device...

It would be nice if I could set it from using sdx to bcache0 - obviously there will be performance loss with bcache (especially more so before the cache is warmed up).

 

Is there anything I can change to force unraid to use a different device (bcache) as I would still like my appdata and system to be stored in /mnt/cache (and still have transparency with /mnt/users if I ever need it)?

 

TL;DR

Tell unRAID to use /dev/bcache0 instead of /dev/sdj as the cache device?

 

Thanks in advance!

 

Link to comment

Nothing that you can change.

 

All you can do is submit a feature requestto the fine folks at LimeTech.

 

Nice, It would be easier if the bcache module was included in the kernel compile too (for crazy ppl like myself to play with) :)

 

Thinking out loud here, so nothings tested

 

What about not assigning the cache drive at all via the UI, and then do a link to /mnt/cache.  (Or mount it at /mnt/cache)

 

Yes, I will try that... I can live without /mnt/cache being included in /mnt/user (and not included in /mnt/user0), but was curious how it worked... I will try it and report back any findings :)

Link to comment
  • 6 months later...
  • 8 months later...

Bump.

 

A Bcache SSD would be nice to have to prevent drive spinup for reads of frequently accessed files, and cheaper than throwing more RAM at a system and hoping the Linux filesystem cache takes care of it. I'm not sure if Bcache would be compatible with unRAID or if changes would have to be made to unRAID itself.

 

I haven't dug into Linux filesystem caching much to see if it's even possible but it'd be nice to have read caching turned off for the normal unRAID write cache SSD as well, if it's not already. I don't want free RAM being used to cache that drive when it could be better spent caching the spindles in the array. A quick Google search indicates that mounting a disk with the "sync" option disables write caching, but read caching seems to be a separate thing. On my unRAID server the mount options are the same for the SSD and array drives (xfs, rw, noatime, nodiratime, 0 0).

Link to comment

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.