2

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?

1 Answer 1

7

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

4
  • 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
    Commented Dec 2, 2021 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
    Commented Dec 2, 2021 at 20:32
  • 1
    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
    Commented Dec 2, 2021 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
    Commented Dec 3, 2021 at 1:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .