btrfs does a full partition check on each boot

Bug #750209 reported by Joke de Buhr
130
This bug affects 27 people
Affects Status Importance Assigned to Milestone
Release Notes for Ubuntu
Invalid
Undecided
Unassigned
btrfs-tools (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: btrfs-tools

Since bug #660649 has been closed btrfsck does a full filesystem check during each boot. This can cause massive delays during boot time depending on the size of the partition.

Running btrfsck during startup isn't very usefull at the moment:
  - btrfsck does a full check even if the filesystem has been unmounted correctly.
  - btrfsck doesn't repair anything it just checks for errors.

Description: Ubuntu Natty (development branch)
Release: 11.04

btrfs-tools:
  Installed: 0.19+20100601-3ubuntu2
  Candidate: 0.19+20100601-3ubuntu2
  Version table:
 *** 0.19+20100601-3ubuntu2 0
        500 http://de.archive.ubuntu.com/ubuntu/ natty/main amd64 Packages
        100 /var/lib/dpkg/status

Revision history for this message
Reinis Zumbergs (reinis-zumbergs) wrote :

adds ~2 minutes to boot time due to my 80 GiB btrfs partition

Revision history for this message
Joke de Buhr (joke) wrote :

My partition is 800GiB and the check takes about 20 minutes. It's not that much fun.

Revision history for this message
Reinis Zumbergs (reinis-zumbergs) wrote :

only after reading the referred bug #660649 bug I understood that i can bypass the 2 min fsck just by removing symlink. I did it and it worked! fsck now complains about missing fsck.btrfs but that's ok.
Joke, You could get rid of those 20 min, too. Just do:
sudo mv /sbin/fsck.btrfs /sbin/_fsck.btrfs

Revision history for this message
Joke de Buhr (joke) wrote :

Thanks for the hint but I already took care of that as soon as I realized what caused the massive startup delay.

But I think as long as there is no working btrfsck the package should not provide a symlink to btrfsck. If there's need for /sbin/fsck.btrfs it should be symlink pointing to /bin/true instead. At least until a btrfsck is released which doesn't do a full check on clearly unmounted partitions.

Surbhi Palande (csurbhi)
Changed in btrfs-tools (Ubuntu):
status: New → Confirmed
Revision history for this message
Alex Sorokine (sorokine) wrote :

Got this problem after upgrading to Natty and installing all recent updates: fsck is run on every boot, fscking 1TB btrfs volume takes 52 min. As a temporary solution I have disabled btrfs partition in fstab and I mount it manually. Partitions I am using:

/dev/sdb1 on / type ext4 (rw,errors=remount-ro,commit=0)
/dev/sda1 on /mnt/disk1 type btrfs (rw)

btrfsck results attached.

Revision history for this message
Adam Conrad (adconrad) wrote :

This clearly needs to be looked into further and fixed, but I don't think there's any point in release noting that a filesystem we mark as experimental behaves experimentally, so dropping the release-notes task.

Changed in ubuntu-release-notes:
status: New → Invalid
Revision history for this message
Brent Miller (brentalanmiller) wrote :

Another workaround for this is just to simply change the "pass" flag for each btrfs partition in /etc/fstab to 0.

Revision history for this message
Andrea Agnolin (agno94) wrote :

Also affect Ubuntu Precise 12.04.1

Revision history for this message
Alex Sorokine (sorokine) wrote :

On my system the problem is gone after upgrade to 12.04.1

Revision history for this message
CSRedRat (csredrat) wrote :

When this done? Linux Kernel 3.6 have more updates for Btrfs.

Revision history for this message
Alex Sorokine (sorokine) wrote :

I have updated the system about a month ago and the problem is gone since then. Here is the information on kernel and distribution versions with the most recent updates installed:

# uname -a
Linux mtr980 3.2.0-31-generic #50-Ubuntu SMP Fri Sep 7 16:16:45 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu 12.04.1 LTS"

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.