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.

BTRFS: The free space cache file is invalid

Featured Replies

I am getting this error in my syslog related to the BTRFS cache drive:

  kernel: BTRFS info (device sdd1): The free space cache file (26872905728) is invalid. skip it

 

I'm currently on 6b8 but I've had the error since 6b6.  In 6b6 it led to the "(28) No space left on device" error, but in betas 7 and 8 it hasn't caused any problems that I know of.

 

I have already run the btrfs scrub option that was added to 6b7 but it didn't find or fix anything.

 

From what I can tell, the BTRFS clear_cache mount option should take care of the problem:

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

 

Would this be the right process to use that option?

* Stop the array

* unmount /mnt/cache

* mount -t btrfs -o noatime,nodiratime,clear_cache /dev/sdd1 /mnt/cache

* run htop, watch for btrfs-freespace to drop off the list

* reboot

 

Thanks for any advice!

syslog-20140901.txt

I am getting this error in my syslog related to the BTRFS cache drive:

  kernel: BTRFS info (device sdd1): The free space cache file (26872905728) is invalid. skip it

 

I'm currently on 6b8 but I've had the error since 6b6.  In 6b6 it led to the "(28) No space left on device" error, but in betas 7 and 8 it hasn't caused any problems that I know of.

 

I have already run the btrfs scrub option that was added to 6b7 but it didn't find or fix anything.

 

From what I can tell, the BTRFS clear_cache mount option should take care of the problem:

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

Well that's a new one for me - never seen that before.  There is definitely a learning curve involved with btrfs.

 

Would this be the right process to use that option?

* Stop the array

* unmount /mnt/cache

* mount -t btrfs -o noatime,nodiratime,clear_cache /dev/sdd1 /mnt/cache

* run htop, watch for btrfs-freespace to drop off the list

* reboot

 

Thanks for any advice!

 

Once you Stop the array everything is un-mounted and all the mount points are removed.  Try this:

 

* Stop array

* mkdir /x

* mount -o clear_cache /dev/sdd1 /x    [/dev/sdd is your cache volume]

* run htop, watch for btrfs-freespace to drop off the list

* reboot

* report back  here what happens :)

  • Author

Thanks.  Hmm, I'm not sure how long to wait before rebooting.  I had assumed btrfs-freespace would show up in htop, but it doesn't.  it doesn't really look like it is doing much:

 

root@Tower:~# ps -ef | grep "btrfs-freespace"
root     17662     2  0 18:25 ?        00:00:00 [btrfs-freespace]
root     17752 17740  0 18:30 pts/0    00:00:00 grep btrfs-freespace

Here's what the wiki says:

 

clear_cache

Clear all the free space caches during mount. This is a safe option, but will trigger rebuilding of the space cache, so leave the filesystem mounted for some time and let the rebuild process finish. If the process btrfs-freespace is actively doing some IO, it's probably not finished yet. This mount option is intended to be used one time and only after you notice some problems with free space.

 

Any idea how to tell if it is "actively doing some IO"?

  • Author

I went ahead and rebooted.  Not sure if took 2 seconds or 20 minutes to fix :) but I'm not getting the error any more.

 

Thanks!

  • 9 years later...

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...

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.