BTRFS: The free space cache file is invalid


ljm42

Recommended Posts

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

Link to comment

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 :)

Link to comment

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"?

Link to comment
  • 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...

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