Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

unRAID 6 Beta 6: Btrfs Quick-Start Guide

Featured Replies

I currently use a SSD for my cache drive..  would changing it to btrfs allow it to have trim support?

Also, TOM any chance of getting this support backported to 5.x ?

btrfs has trim support.  can't speak to backporting of features yet.

 

Sent from my Nexus 5 using Tapatalk

 

Jonp: does unraid actually apply the discard parameter when mounting an SSD with btrfs?  If not, is there a plan to?

 

And if it's not part of the build yet, what can we do/add to have it supportrd now ?  Is there something in GO or a cron job we can add ?

  • Replies 149
  • Views 77.9k
  • Created
  • Last Reply

TRIM has been raised and is being looked at. There are two options; the mount flag method  and calling the TRIM tool independently. Currently I believe in some use cases the mount flag will result in a performance penalty making the tool call the better solution. However they might be rare enough that users woudlnt care.

 

Either way hang fire its being looked at. Please dont ask me when because I dont know and even if I did it wouldnt be my place to say but I would suggest it would be an important "dont wait too long" feature. :)

TRIM has been raised and is being looked at. There are two options; the mount flag method  and calling the TRIM tool independently. Currently I believe in some use cases the mount flag will result in a performance penalty making the tool call the better solution. However they might be rare enough that users woudlnt care.

 

Either way hang fire its being looked at. Please dont ask me when because I dont know and even if I did it wouldnt be my place to say but I would suggest it would be an important "dont wait too long" feature. :)

 

So when will it be available ?  I'd like to start a countdown timer counting down the days to the first ballpark release date hinted at by LT.

(note for those totally devoid of any humour, this post is purely facetious)

You insufferable troll!  ;)

TRIM has been raised and is being looked at. There are two options; the mount flag method  and calling the TRIM tool independently. Currently I believe in some use cases the mount flag will result in a performance penalty making the tool call the better solution. However they might be rare enough that users woudlnt care.

 

Either way hang fire its being looked at. Please dont ask me when because I dont know and even if I did it wouldnt be my place to say but I would suggest it would be an important "dont wait too long" feature. :)

 

To be clear: Currently there is no TRIM support in unraid 6.0b6 with btrfs. Right ?  Feature is pending for an upcomming version (unclear when, unclear what version)

TRIM has been raised and is being looked at. There are two options; the mount flag method  and calling the TRIM tool independently. Currently I believe in some use cases the mount flag will result in a performance penalty making the tool call the better solution. However they might be rare enough that users woudlnt care.

 

Either way hang fire its being looked at. Please dont ask me when because I dont know and even if I did it wouldnt be my place to say but I would suggest it would be an important "dont wait too long" feature. :)

 

To be clear: Currently there is no TRIM support in unraid 6.0b6 with btrfs. Right ?  Feature is pending for an upcomming version (unclear when, unclear what version)

 

Some background here:

https://btrfs.wiki.kernel.org/index.php/FAQ#Does_Btrfs_support_TRIM.2Fdiscard.3F

 

6.0-beta6 does not include the '-o discard' on mount.  The 'fstrim' command is included however.

 

6.0-beta7 has a new config setting where you can specify additional mount options to use if desired.

This is NOT a complaint, just an observation that led to a question.

 

Until about a week ago, we had LOTS of communication from jonp, but virtually none from Tom.  Since about a week ago, Tom has been the only one posting on the boards, and we've not heard from jonp.

 

Is everything okay?  Is jonp still working with LimeTech?  I'm very fine with Tom being the one that communicates with us, I just find it a bit odd the sudden change in communication pattern for the last week or so.

 

Just curious  :o

This is NOT a complaint, just an observation that led to a question.

 

Until about a week ago, we had LOTS of communication from jonp, but virtually none from Tom.  Since about a week ago, Tom has been the only one posting on the boards, and we've not heard from jonp.

 

Is everything okay?  Is jonp still working with LimeTech?  I'm very fine with Tom being the one that communicates with us, I just find it a bit odd the sudden change in communication pattern for the last week or so.

 

Just curious  :o

No specifics but jonp is just fine.  He has been working on some other LT stuff and it has been consuming his time.

 

6.0-beta6 does not include the '-o discard' on mount.  The 'fstrim' command is included however.

 

6.0-beta7 has a new config setting where you can specify additional mount options to use if desired.

Could we get a gui option to run fstrim on the cache scheduled like the mover, after the mover finishes? Something like run fstrim after the mover is done but only every sunday or something like that?

No specifics but jonp is just fine.  He has been working on some other LT stuff and it has been consuming his time.

 

Great, thanks for the update (and good news)!

 

Sorry for the off-topic.

  • Author

Still here...  Had a death in the family this week and been working on some big stuff for you guys.  I'll be upping the communication again soon.  Thanks for your concern!  Its good to know I'm missed  :D

Had a death in the family this week

 

sad news, sorry :(

 

and been working on some big stuff for you guys

 

great news, happy :)

 

6.0-beta6 does not include the '-o discard' on mount.  The 'fstrim' command is included however.

 

6.0-beta7 has a new config setting where you can specify additional mount options to use if desired.

Could we get a gui option to run fstrim on the cache scheduled like the mover, after the mover finishes? Something like run fstrim after the mover is done but only every sunday or something like that?

 

+1

 

6.0-beta6 does not include the '-o discard' on mount.  The 'fstrim' command is included however.

 

6.0-beta7 has a new config setting where you can specify additional mount options to use if desired.

Could we get a gui option to run fstrim on the cache scheduled like the mover, after the mover finishes? Something like run fstrim after the mover is done but only every sunday or something like that?

 

+1

 

But a separate schedule option for those of us that don't run mover/don't use cache as a cache.

  • 2 weeks later...

When I format the cache drive drive as btrfs Will my shares that are configured to use cache still be able to do so?

 

For instance when sabnzbd downloads will it unpack to the cache drive first after which the moves the files to one of the array drives.

 

I formatted the cache drive as btrfs and don't see a mnt/user0 folder anymore.

When I format the cache drive drive as btrfs Will my shares that are configured to use cache still be able to do so?

 

For instance when sabnzbd downloads will it unpack to the cache drive first after which the moves the files to one of the array drives.

 

I formatted the cache drive as btrfs and don't see a mnt/user0 folder anymore.

Mine is working fine. Can you navigate to /mnt/cache?

TRIM has been raised and is being looked at. There are two options; the mount flag method  and calling the TRIM tool independently. Currently I believe in some use cases the mount flag will result in a performance penalty making the tool call the better solution. However they might be rare enough that users woudlnt care.

 

Either way hang fire its being looked at. Please dont ask me when because I dont know and even if I did it wouldnt be my place to say but I would suggest it would be an important "dont wait too long" feature. :)

 

To be clear: Currently there is no TRIM support in unraid 6.0b6 with btrfs. Right ?  Feature is pending for an upcomming version (unclear when, unclear what version)

 

Some background here:

https://btrfs.wiki.kernel.org/index.php/FAQ#Does_Btrfs_support_TRIM.2Fdiscard.3F

 

6.0-beta6 does not include the '-o discard' on mount.  The 'fstrim' command is included however.

 

6.0-beta7 has a new config setting where you can specify additional mount options to use if desired.

 

wouldn't it be wise to just call the trim command after the mover finishes?

When I format the cache drive drive as btrfs Will my shares that are configured to use cache still be able to do so?

 

For instance when sabnzbd downloads will it unpack to the cache drive first after which the moves the files to one of the array drives.

 

I formatted the cache drive as btrfs and don't see a mnt/user0 folder anymore.

As far as I can see the cache drive works just as it always did after reformatting it to btrfs.

 

One thing you might want to do is check your share settings after doing this.  A couple of my cache-only shares had lost that setting.  I assume it happened during the move to btrfs although it could have just been a by-product of something else.

TRIM has been raised and is being looked at. There are two options; the mount flag method  and calling the TRIM tool independently. Currently I believe in some use cases the mount flag will result in a performance penalty making the tool call the better solution. However they might be rare enough that users woudlnt care.

 

Either way hang fire its being looked at. Please dont ask me when because I dont know and even if I did it wouldnt be my place to say but I would suggest it would be an important "dont wait too long" feature. :)

 

To be clear: Currently there is no TRIM support in unraid 6.0b6 with btrfs. Right ?  Feature is pending for an upcomming version (unclear when, unclear what version)

 

Some background here:

https://btrfs.wiki.kernel.org/index.php/FAQ#Does_Btrfs_support_TRIM.2Fdiscard.3F

 

6.0-beta6 does not include the '-o discard' on mount.  The 'fstrim' command is included however.

 

6.0-beta7 has a new config setting where you can specify additional mount options to use if desired.

 

wouldn't it be wise to just call the trim command after the mover finishes?

 

Only if you use the mover script.  I reckon there as many that use cache as an app/plugin/docker/vm only drive as there arer that use it as a cache.

When I format the cache drive drive as btrfs Will my shares that are configured to use cache still be able to do so?

 

For instance when sabnzbd downloads will it unpack to the cache drive first after which the moves the files to one of the array drives.

 

I formatted the cache drive as btrfs and don't see a mnt/user0 folder anymore.

Mine is working fine. Can you navigate to /mnt/cache?

 

Yes, I could navigate to /mnt/cache

 

The situation was solved after stopping and starting the aray for a 2nd time.

I am confused about all of the various steps in this thread for adding the additional drives to the cache pool. I have 4 SSDs that I would like to combine into a pool. How would I do that?

That's what I was wondering to but given its on the roadmap. I don't think it's possible.  I can add drives to make a cache pool but on reboot I have to redo it. Think you'll have to wait for next beta.

There are ways to do it now but the next beta will make cache pooling an option where it wasn't before.

What ways are there to mount the cache pool after rebooting?  I can add a drive to make a pool but if I remember right, on reboot it would show unformatted.  It's been a while and I didn't try very hard.

After you create your pool, type the following but replace sdx with your pool letter.

btrfs filesystem show /dev/sdx

you will get a read-out consisting of the following.

Label: 'VM-store'  uuid: 569b8d06-5676-4e2d-9a22-12d85dd1648d
        Total devices 3 FS bytes used 1.96GiB
        devid    1 size 465.76GiB used 2.02GiB path /dev/sdf
        devid    2 size 465.76GiB used 3.01GiB path /dev/sdh
        devid    3 size 465.76GiB used 3.01GiB path /dev/sdg 

you will then mount your cache pool using the uuid number in the go script with /dev/by-id.

 

I think everyone but jonp thinks I was having trouble trying to create a btrfs pool instead of what I wrote which is a cache pool (a btrfs pool mounted as the cache drive).  But anyway here is what I did.  The two SSD's I'm using are /dev/sde and /dev/sdh.  I started the server without auto mounting the array so I could create the pool first.

sgdisk -g -N 1 /dev/sde
sgdisk -g -N 1 /dev/sdh
mkfs.btrfs -f /dev/sde1
mkfs.btrfs -f /dev/sdh1
mkdir /mnt/btrfs
mount /dev/sde1 /mnt/btrfs
btrfs device add /dev/sdh1 /mnt/btrfs
btrfs balance start -dconvert=raid1 -mconvert=raid1 /mnt/btrfs
umount /mnt/btrfs
rmdir /mnt/btrfs

 

Then I added this to the top of my go script because after reboot the cache drive would show up as unformatted unless you did a btrfs device scan first.

 

btrfs device scan

 

I then added one of the SSD's as the cache drive since if you mount either of them the pool will be mounted. Then started the array. You don’t have to add anything else to the go script since unraid mounts the cache drive by-id. This will only work if you create a pool in this manner since unraid looks for /dev/sdx1 to mount the cache drive.  If you create a pool with mkfs.btrfs /dev/sde /dev/sdh it won't work.

 

How do you start the server without automounting the array?  My cache is showing up as unformatted, and I followed these instructions completely, except for this part since I don't know how to do it...

In the unraid webgui under settings/disk settings enable autostart no.  Did you add "btrfs device scan" to the go file on your flash drive under /config?

In the unraid webgui under settings/disk settings enable autostart no.  Did you add "btrfs device scan" to the go file on your flash drive under /config?

So, I made a mistake.  You see, I never had a cache drive before.  I purchased 2 SSD's specifically to make a raid1 cache.  But, never having had a cache drive before, when I was having problems with setting this up last night, I figured what the heck why don't I make 1 of them into a standard cache drive just to play around with it, but also to have experience with how a normal cache drive behaved. 

 

The good news is that all that worked fine, and it did seem to make my server a bit more responsive, it wasn't the responsiveness cure-all I hoped it would be.  But some things were a bit better. 

 

So now I'm trying to go through the process of creating the btrfs cache pool again.  And it seems like whatever I do it says that the drives have invalid partition data.  I can assign both of them to be a single unraid cache drive in the array, and they work perfectly well.  But when I remove them from the array, reboot with the option to not autostart the array, and try to go through the cache pool creation process again, it always fails with the invalid partion data message. 

 

I looked at the sgdisk options, and did see that there was a partition delete option.  I tried this, and on the disk that I did not use as the cache drive, it seems to have worked.  But for the drive that I used as cache I still get the invalid partition data message. 

 

If I could be sure the next beta that will have this capability in the gui is going to come out within the next few days, I might just say screw this and wait.  But if that doesn't happen soon, this will gnaw at me until I get it figured out. 

For me I made a cache pool  just to try it out. I switched back and right now I run a btrfs 120 GB cache drive and a non array 120 GB for vm's and misc. An easy way to wipe a single drive is to change the cache format to reiserfs format then change back to btrfs and format again all from the webgui.

For me I made a cache pool  just to try it out. I switched back and right now I run a btrfs 120 GB cache drive and a non array 120 GB for vm's and misc. An easy way to wipe a single drive is to change the cache format to reiserfs format then change back to btrfs and format again all from the webgui.

Thank you for trying to help dmacias.  It's still doing the same thing.  And what you say makes sense.  I'm not sure what's going on.  The webgui doesn't have a problem at all with the drive in question regardless of what I do.  But sgdisk doesn't seem to be able to do anything with it.  But the other disk I didn't use as cache, seems to happily execute any command I give it.  I wonder if there is something wrong with the disk?  But it seemed to work great as a cache drive. 

 

I think I'm going to forget about this for a while, and wait until the functions I need are in the webgui.  Cause I started thinking about it, how would I be able to monitor the health of the pool?  And what if I did have a drive that failed?  If it was the other drive, the one that's not listed as cache in the webgui, how would I know it failed?  I assume that Limetech will include some kind of basic monitoring for this in the next beta's webgui? 

Archived

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.