Jump to content
We're Hiring! Full Stack Developer ×

A few Questions about the btrfs cache drive and cache pool


TSM

Recommended Posts

Some of this may have been covered in other threads, and I missed it, I apologize.

 

Upgraded to Beta7, and I think I've created a "raid1" cache pool, but I'm not sure.  As far as I can tell there is nowhere in the gui with big flashing letters saying "Your cache is now a raid1 pool".  Unless there is, and I just haven't done it correctly yet.  Are there step by step instructions anywhere?

 

Should I be able to get to a cache2 share, as you can get to the other drive shares, and etc...?  Maybe the pool is just the cache share regardless of drive, and if so that's great, just unclear on how it works.

 

I have no plans to use docker anytime soon.  I'm wondering if there is a way to get rid of the docker folder off of the cache.  But I may want to put it back in the future in case I ever do decide to play around with it. 

 

After the mover moves files off of the cache drive, the amount of space "used" on the drive seems to change randomly.  Is this the files in the docker folder changing somehow even though I'm not using them?  Is something else going on? 

 

Thanks,

Link to comment

Some of this may have been covered in other threads, and I missed it, I apologize.

 

Upgraded to Beta7, and I think I've created a "raid1" cache pool, but I'm not sure.  As far as I can tell there is nowhere in the gui with big flashing letters saying "Your cache is now a raid1 pool".  Unless there is, and I just haven't done it correctly yet.  Are there step by step instructions anywhere?

 

If you have more than one "cache device" assigned in unRAID, you are in a pool.  You cannot create a "pool" without two btrfs devices assigned as cache devices.

 

Should I be able to get to a cache2 share, as you can get to the other drive shares, and etc...?  Maybe the pool is just the cache share regardless of drive, and if so that's great, just unclear on how it works.

 

You cannot get to a "cache2" share for just that disk.  In an unRAID cache pool, you cannot write to individual disks, only the pool as a whole.

 

I have no plans to use docker anytime soon.  I'm wondering if there is a way to get rid of the docker folder off of the cache.  But I may want to put it back in the future in case I ever do decide to play around with it.

 

Leave it alone.  Its 10MB.  Not hurting anything...

 

After the mover moves files off of the cache drive, the amount of space "used" on the drive seems to change randomly.  Is this the files in the docker folder changing somehow even though I'm not using them?  Is something else going on? 

 

Thanks,

 

This has nothing to do with Docker.  If you don't use Docker, it's not going to do anything to your writes.

 

As far as moving files off cache pool, used disk space reporting is a tricky beast in BTRFS.  If you click on the cache drive link in the main GUI, you will see a new section in the GUI called "pool operations."  Here's mine as an example:

 

Label: none  uuid: 568b9a56-2831-4e4d-9df3-463cf1cc0423
Total devices 2 FS bytes used 48.33GiB
devid    1 size 107.13GiB used 57.03GiB path /dev/sdb1
devid    2 size 111.79GiB used 57.03GiB path /dev/sde1

Btrfs v3.14.2

 

In this example, I have two ~ 128GB drives (one was 128, one was 120) and they are both in a BTRFS RAID1 pool.  Under pool operations, the first line can be ignored (with the label).  The second line shows your consumed space on the filesystem (this is actual used space).  The third and fourth line represent individual disks, but the size used on each of these lines does not reflect what you ACTUALLY have stored in files on the system, which can make determining free space a bit challenging.  This is something we are working to help make easier to determine...

Link to comment

Some of this may have been covered in other threads, and I missed it, I apologize.

 

Upgraded to Beta7, and I think I've created a "raid1" cache pool, but I'm not sure.  As far as I can tell there is nowhere in the gui with big flashing letters saying "Your cache is now a raid1 pool".  Unless there is, and I just haven't done it correctly yet.  Are there step by step instructions anywhere?

 

Should I be able to get to a cache2 share, as you can get to the other drive shares, and etc...?  Maybe the pool is just the cache share regardless of drive, and if so that's great, just unclear on how it works.

 

I have no plans to use docker anytime soon.  I'm wondering if there is a way to get rid of the docker folder off of the cache.  But I may want to put it back in the future in case I ever do decide to play around with it. 

 

After the mover moves files off of the cache drive, the amount of space "used" on the drive seems to change randomly.  Is this the files in the docker folder changing somehow even though I'm not using them?  Is something else going on? 

 

Thanks,

 

Right, the "Help" documentation for cache pool is lacking.

 

When we say "cache" we mean either a "cache disk" or a "cache pool".  A cache disk is a single device that is outside the parity-protected array.  A cache disk can be formatted using btrfs, reiserfs, or xfs at this time.

 

A cache pool is always formatted using btrfs - that is to say, the btrfs file system will manage all the devices assigned to the cache pool.

 

The determination of whether you have a cache disk or a cache pool is made depending on how many slots you have defined for cache.  If number of slots is 1 then you have a cache disk.  If number of slots is 2 or more, then you have a cache pool.  It is possible to have a single-device cache pool.  This happens if you have set the number of cache slots to 2 or more, but only have one physical device assigned.

 

Settings and operations for a cache pool are always accessed via the 'cache' link on the Main page - even if you don't have a physical device assigned to 'cache'.  The 'cache2', 'cache3', ..., links only provide basic info about that particular device.

 

When you assign/unassign devices from the cache pool, unRAID OS figures out what the configuration change implies in terms of what btrfs management commands need to be issued.  For example, if you add a new device, unraid os will issue a "btrfs device add" command immediately following Mount (and at present is part of Mount).  Other config changes trigger other "btrfs device" subcommands.

 

One important note: at this time (beta7) after making a config change to your cache pool such as adding or removing a device, you must manually click on the 'cache' link and invoke the "Balance" operation.  The reason you must manually do this is because a Balance can take a very long time depending on what the config change was, what device types you are using, and how much data is on the devices.  For example, if you are using a 128GB SSD and you add a second 128GB SSD, btrfs has to copy all data from the first device to the second (to setup up btrfs-raid1).  For small fast SSD's this will be very fast (seconds probably); but for big slow HDD's this can possibly take hours.  This requirement will be lifted in a future release when we implement Balance as a separate process forked from the Mount.

 

The "cache" is mounted at /mnt/cache, and from that point of view, a cache disk is indistinguishable from a cache pool.

 

As for btrfs free space reporting... Yes this is a bugger and a continual point of contention in the btrfs development community.  I'm not 100% sure I have it right yet in how we report it.

 

Link to comment

 

 

I have no plans to use docker anytime soon.  I'm wondering if there is a way to get rid of the docker folder off of the cache.  But I may want to put it back in the future in case I ever do decide to play around with it.

 

Leave it alone.  Its 10MB.  Not hurting anything...

 

 

 

If the space reporting is accurate, granted that it might not be, it says that 2.25gig is being used.  And I swear that an unmodified docker folder is currently the only thing on the cache pool.  I didn't have a cache drive before installing beta6.  And on beta6 it was listed as being between 10 and 20 megs usually.  And I didn't care.  And granted that 2.25gig isn't really that much either, but on a 128gig pool, it's enough to be annoying to me if true. 

Link to comment

It occurs to me that the question in my last post might been hard to discern because of the way the quoting levels made the post look.  My question was...

 

"If the space reporting is accurate, granted that it might not be, it says that 2.25gig is being used.  And I swear that an unmodified docker folder is currently the only thing on the cache pool.  I didn't have a cache drive before installing beta6.  And on beta6 it was listed as being between 10 and 20 megs usually.  And I didn't care.  And granted that 2.25gig isn't really that much either, but on a 128gig pool, it's enough to be annoying to me if true."

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...