Open dim-geo opened 5 years ago
Bees needs to run from subvolume 5, and it also stores its database there. So it works as designed.
But if you didn't use the wrapper that actually mounts subvol 5, then it will fail to do anything useful. You need to run bees on subvol 5 for it to see all extents. Bees doesn't work on files, it works on the whole device and looks at extents. Thus it needs to see subvol 5.
Usually, this subvol will be mounted below the runtime directory structure /run/bees to keep it away from user accessible default folders.
If you delete a snapshot while bees is running you will get a burst of those errors because bees will still have cached references to the now-deleted tree. This will stop when the cache is cleared (about once every 5 minutes given default btrfs mount options).
It's a known gotcha (https://zygo.github.io/bees/gotchas.html last paragraph).
If you don't give bees subvol 5 you get a different exception:
2019-01-01 21:22:31 4231.4231<6> bees: btrfs send workaround disabled
2019-01-01 21:22:31 4231.4231<6> bees: set_root_path /tmp/
2019-01-01 21:22:31 4231.4231<6> bees: set_root_fd /tmp
2019-01-01 21:22:31 4231.4231<3> bees: set_root_fd /tmp
2019-01-01 21:22:31 4231.4231<3> bees: --- END TRACE --- exception ---
2019-01-01 21:22:31 4231.4231<3> bees:
2019-01-01 21:22:31 4231.4231<3> bees:
2019-01-01 21:22:31 4231.4231<3> bees: *** EXCEPTION ***
2019-01-01 21:22:31 4231.4231<3> bees: exception type std::invalid_argument: root_fd_treeid = 41843 failed constraint check (root_fd_treeid == BTRFS_FS_TREE_OBJECTID) at bees-context.cc:924
2019-01-01 21:22:31 4231.4231<3> bees: ***
terminate called after throwing an instance of 'std::invalid_argument'
what(): root_fd_treeid = 41843 failed constraint check (root_fd_treeid == BTRFS_FS_TREE_OBJECTID) at bees-context.cc:924
Note the BTRFS_FS_TREE_OBJECTID
constraint check.
Thanks for the clarification! maybe it should be handled via #89 and closed.
Hello,
I started bees on a file-system already occupied with many snapshots and this happened. The program continued to run. (Please have in mind that I don't use the default subvolume (5) and beesd wrote there its database. I don't know if this info helps or is related to the error)
Kernel version: Linux gentoo 4.14.78-ck
using the latest bees built from emerge 9999