[SOLVED] Is my btrfs Cache Pool Config Valid and Working?


danioj

Recommended Posts

I configured a RAID1 btrfs Cache Pool yesterday for the first time using two identical SSD's. The setup seemed to go OK BUT when I woke this morning I took a glance 3 of things appear to be happening that confuse me:

 

1. Only Disk 1 in the Pool seems to be showing usage statistics;

2. Disk 2 in the Pool does not have any increased (or similar to Disk 2) Read/Write Statistics as Disk 1 despite having over 100GB written to the Cache Pool in the last 24 Hours;

3. Disk 2 has not "spun" up since installation.

 

Can anyone help me out with this, is this expected behaviour?

Screen_Shot_2016-01-13_at_6_43.56_AM.png.2239e9aa437fdaef7e498283b254093c.png

Link to comment

Yes, normal. A little confusing, but here is how I think of it:

 

The cache as a whole is listed next to the "cache" drive, but each additional drive is also listed to allow access to each drive's attributes, etc.

 

Fair enough, I can think of it that way easy enough too!

 

Thanks for the quick reply! Have a great day!  :)

Link to comment

Before I ditched my cache pool it looked like this.  Cache 2 was offline,  after a reboot it decided cache 2 was back and started throwing errors so I pulled Cache 2....  after running on one cache drive for a few days I rebooted and the remaining disk wouldn't mount.....  couldn't get btrfs to repair and could only mount it read only.....  so formatted XFS and gave up.

 

What does smart look like for Cache 2?

Link to comment

Hmmm. Conflicting positions. Interesting.

 

I have to admit I felt it wasn't right given the writes and reads weren't the same on disk 2 as on disk 1. I mean the two drives are supposed to be mirroring. Also if it is true that things aren't working, where is the warning?? Either way I guess given disk 2 wasn't active (and has never shown as being active) should be a big give away of issue!!

 

BUT - given trurl's response above, if this is how unRAID is expected to behave??

 

On my way to work but I'll do some investigating tonight. In the mean time I would appreciate some screenshots of others' setup so I can compare??

Link to comment

Some screenshots of my cache pool,  see attachments.

 

Thanks dude! Appreciate it!

 

Now that's more like it!! Both drives active, reasonably similar reads and writes accross both drives.

 

I've been musing over what I did and potential warning signs when I did the setup.

 

Both of the drives were xfs formatted as an individual cache / outside array mounted (via Unassigned Devices). When I lowered the array slots and added them both as a cache drive slot when I started the array it did only ask me to Format 1 drive. Drive 1 in fact. I assumed at the time that this was because unRAID was now seeing Cache as 1 volume?

 

Very interesting BUT clearly there is something wrong here. I'll compare notes with bonienl's screen shots when I get home tonight but I think I'm going to end up executing the mover and trying to repeat the setup!!

Link to comment

Right guys. Issue is resolved. I am not sure if I have found a bug BUT I believe I might have.

 

Essentially, the pool was not set up correctly. Even though unRAID seemed to acknowledge that the two drives were in a btrfs Cache Pool (as per my screen shots) in fact they were not. When I compared Pool settings under Cache settings with those posted by bonienl I noticed that there was only 1 disk present in the pool and no RAID1. I tried a Balance (as suggested by bonienl) and nothing happened (an execution error appeared in the syslog). Both drives were formatted as btrfs so I didn't know what the issue was.

 

As I thought I would have to, I stopped docker, VM's and anything else that might write to the Cache drive and ran the mover to clear the Cache drive. I proceeded to start again. Remove the drives from Cache slots. Rebooted. Added the disks to the cache slots again. Started the array. Same issue.

 

So, I stopped the array again, removed disk 2 from the second cache slot and utilised "Unassigned Devices Plugin (Unsafe mode)" and removed the existing partition off drive 2. Added it back to the second Cache slot. The disk was then identified as a "new device" and I started the Array. Same issue.

 

*Pours G&T* ....

 

I figured at this point the issue HAD to be with disk 1. To recap, drive 1 was the original cache device which was formatted as xfs and running as my cache drive for over a year. So, I decided to remove disk 1 and 2 from the Cache slots. Utilise "Unassigned Devices Plugin (Unsafe mode)" and removed the existing partition off disk 1 & 2**

 

**Note: I could only do this after a reboot as Unassigned Devices would NOT format the drive that had been in a Cache slot even though it had been removed.

 

After a reboot, I then added the two disks to the two Cache slots. Started the Array. Boom. It worked (see screenshot).

 

To do my bit I was intrigued to see if I could replicate this. Turns out I could. I destroyed the cache RAID1 setup again. Removed the partition off disk 1. Reduced Cache slots to 1/ Added disk 1 to that slot and formatted as xfs. There we go, back to my original state. I then proceeded to reboot and then replicate what I did before, and increase the slots to 2. Add drive 2 to the second slot. And start the Array. Exactly the same thing happened again as per my original post. Both disks were formatted as btrfs but the system would not configure them in RAID1.

 

I can only conclude that there is a bug / issue when setting up a cache pool when utilising a cache disk which has been used by unRAID previously with an existing file system on it (in this case xfs). In order for the setup of the pool to work (as I note above) the only way was to remove the partition from disk1 and disk 2 and add them to slots essentially as new devices. Which, ones I did this again - worked like a charm!

 

I would not have been able to get through this as easy as I did without "Unassigned Devices" so a big shout out to gfjardim once again for developing and maintaining this tool which is becoming an essential to me!

 

All is good now and working. I hope this post goes some way to help any others who have had this issue. Not sure about this being a bug or not but given I could replicate it I tend to think so. No sure what others think and or if it is worth reporting it?

 

SSD_Cache_Pool_-_RAID1.png.6883cbffa7e80adef06a1326e016067c.png

Link to comment

I have seen syslogs where unRAID will even try to mount NTFS in the cache slot, which is not even a supported filesystem so I think there is a bug but I have not reported it since it didn't happen to me and I didn't want to try to reproduce it.

 

Do you have Unassigned Devices installed?

 

I wonder if Jonp (or LT) or someone else sees this and can replicate it!??

 

As for Unassigned Devices, as I mention above - Yeah. That's how I was able to fix the situation and get myself going!

Link to comment

I have seen syslogs where unRAID will even try to mount NTFS in the cache slot, which is not even a supported filesystem so I think there is a bug but I have not reported it since it didn't happen to me and I didn't want to try to reproduce it.

 

Do you have Unassigned Devices installed?

 

I wonder if Jonp (or LT) or someone else sees this and can replicate it!??

 

As for Unassigned Devices, as I mention above - Yeah. That's how I was able to fix the situation and get myself going!

I have seen it, and 99% sure that its because of unassigned devices.  Don't see how you can call it a bug when a 3rd party plugin installs an unsupported filesystem and unRaid tries to mount it when it's set to "auto"
Link to comment

I have seen syslogs where unRAID will even try to mount NTFS in the cache slot, which is not even a supported filesystem so I think there is a bug but I have not reported it since it didn't happen to me and I didn't want to try to reproduce it.

 

Do you have Unassigned Devices installed?

 

I wonder if Jonp (or LT) or someone else sees this and can replicate it!??

 

As for Unassigned Devices, as I mention above - Yeah. That's how I was able to fix the situation and get myself going!

I have seen it, and 99% sure that its because of unassigned devices.  Don't see how you can call it a bug when a 3rd party plugin installs an unsupported filesystem and unRaid tries to mount it when it's set to "auto"

 

I have read your post, my posts and your post again and I am confused.

 

I am not sure how you get that the situation I have described above has anything to do with Unassiged Devices. So I'd be interested to see what evidence you have for being 99% sure it is that Plugin?

 

Neither of the two disks were set to auto mount (or indeed were mounted at all by the plugin - other than once AFTER the issue was experienced to get to the fix) in Unassigned Devices.

 

Also (even though it didn't happen) I believe there were no "unsupported file systems" had there been an auto mount anyway. We were talking xfs and btrfs which unRAID supports natively for cache devices AND for both disks there was no interaction in anything that was happening above imho with that plugin. Indeed it was because of that plugin that I was able to remove the partitions and allow me to get unRAID to setup the Cache Pool properly.

 

Anyway - I wasn't bagging unRAID I was just sharing the experience. We can relax defensive postures.

Link to comment

I have seen syslogs where unRAID will even try to mount NTFS in the cache slot, which is not even a supported filesystem so I think there is a bug but I have not reported it since it didn't happen to me and I didn't want to try to reproduce it.

 

Do you have Unassigned Devices installed?

 

I wonder if Jonp (or LT) or someone else sees this and can replicate it!??

 

As for Unassigned Devices, as I mention above - Yeah. That's how I was able to fix the situation and get myself going!

I have seen it, and 99% sure that its because of unassigned devices.  Don't see how you can call it a bug when a 3rd party plugin installs an unsupported filesystem and unRaid tries to mount it when it's set to "auto"

 

I have read your post, my posts and your post again and I am confused.

 

I am not sure how you get that the situation I have described above has anything to do with Unassiged Devices. So I'd be interested to see what evidence you have for being 99% sure it is that Plugin?

 

Neither of the two disks were set to auto mount (or indeed were mounte at all by the plugin - other than once AFTER the issue was experienced to get to the fix) in Unassigned Devices.

 

Also (even though it didn't happen) I believe there were no "unsupported file systems" had there been an auto mount anyway. We were talking xfs and btrfs which unRAID supports natively for cache devices AND for both disks there was no interaction in anything that was happening above imho with that plugin. Indeed it was because of that plugin that I was able to remove the partitions and allow me to get unRAID to setup the Cache Pool properly.

 

Anyway - I wasn't bagging unRAID I was just sharing the experience. We can relax defensive postures.

Probably more me just reading the last post and commenting rather than doing the smart thing and actually reading the entire conversation

 

Link to comment

I have seen syslogs where unRAID will even try to mount NTFS in the cache slot, which is not even a supported filesystem so I think there is a bug but I have not reported it since it didn't happen to me and I didn't want to try to reproduce it.

 

Do you have Unassigned Devices installed?

 

I wonder if Jonp (or LT) or someone else sees this and can replicate it!??

 

As for Unassigned Devices, as I mention above - Yeah. That's how I was able to fix the situation and get myself going!

I have seen it, and 99% sure that its because of unassigned devices.  Don't see how you can call it a bug when a 3rd party plugin installs an unsupported filesystem and unRaid tries to mount it when it's set to "auto"

 

I have read your post, my posts and your post again and I am confused.

 

I am not sure how you get that the situation I have described above has anything to do with Unassiged Devices. So I'd be interested to see what evidence you have for being 99% sure it is that Plugin?

 

Neither of the two disks were set to auto mount (or indeed were mounted at all by the plugin - other than once AFTER the issue was experienced to get to the fix) in Unassigned Devices.

 

Also (even though it didn't happen) I believe there were no "unsupported file systems" had there been an auto mount anyway. We were talking xfs and btrfs which unRAID supports natively for cache devices AND for both disks there was no interaction in anything that was happening above imho with that plugin. Indeed it was because of that plugin that I was able to remove the partitions and allow me to get unRAID to setup the Cache Pool properly.

 

Anyway - I wasn't bagging unRAID I was just sharing the experience. We can relax defensive postures.

Regardless of its the unassigned devices plugin or not, I'd like to get to the bottom of this.  I'll put this on my plate to look into.

Link to comment

Regardless of its the unassigned devices plugin or not, I'd like to get to the bottom of this.  I'll put this on my plate to look into.

 

I hope I have explained how it came about, how I replicated it and how I got around it well enough.

 

Just let me know if you want me to go through anything in more detail.

Link to comment

I tried on my test server and couldn't replicate it, I believe I did what you described,  started with single xfs cache, changed to 2 slots, added another disk,  formatted both btrfs and it worked as expected.

 

Interesting. That is in essence what I did. Can you also try that now with the Unassigned Devices Plugin installed? Perhaps it is the plugin?

 

I only ask because my Test Server doesn't have any disks in it ATM!  :)

Link to comment

I can only conclude that there is a bug / issue when setting up a cache pool when utilising a cache disk which has been used by unRAID previously with an existing file system on it (in this case xfs

 

The scenario in the OP is EXACTLY what happened to my V6 cache setup documented herehttp://lime-technology.com/forum/index.php?topic=44636.msg427103#msg427103

 

Jonp thought it was a bug then and asked for diagnostics. My cache pool consisted of 2 new SSD's untouched by any other filesystem

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.