1

Although this is very similar to many closed questions, I believe this is not a duplicate, as the only answers I can find seem to be specific to ext4.

Is this possible?

Slbox
  • 241
  • 1
  • 3
  • 10

1 Answers1

6

It's possible, but unnecessary.

According to the btrfs readthedocs manual page for fsck.btrfs:

This is not needed for BTRFS.

and continues:

If you wish to check the consistency of a BTRFS filesystem or repair a damaged filesystem, see btrfs-check(8).

rickhg12hs
  • 1,193
  • 7
  • 19
  • Thanks for the tip @rickhg12hs! If you can point me towards how to run `btrfs-check` on startup, I'll mark this as accepted. – Slbox Dec 02 '21 at 19:30
  • 1
    @Slbox I don't think running `btrfs check` at boot time is recommended. Depending on a number of factors, it could take a while and might severely lengthen boot time. Btrfs does not need to clean up journaling files, etc., like some other file systems. – rickhg12hs Dec 02 '21 at 20:32
  • Maybe not as a regular thing, but if the volume needs to be unmounted to do `btrfs-check` then boot time is the method that's least onerous to the user. The alternative would be a live USB which isn't too slick. – Slbox Dec 02 '21 at 20:55
  • 1
    @Slbox You could `--force` a `btrfs check` while still mounted but perhaps the results might not be reliable if there is filesystem activity, I really don't know. The default is `--readonly` so it should be safe. You may also want to consider `btrfs scrub` for periodic filesystem integrity checking. – rickhg12hs Dec 03 '21 at 01:30