Ubuntu does fsck on every start when using btrfs

Bug #771748 reported by Tommy_CZ
180
This bug affects 64 people
Affects Status Importance Assigned to Milestone
btrfs-tools (Ubuntu)
Fix Released
Undecided
Unassigned
linux (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Hi, my ubuntu does fsck on every start, it really slows-down startup of it, I have / as ext4 and /home as btrfs.

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: linux-image-2.6.38-8-generic 2.6.38-8.42
ProcVersionSignature: Ubuntu 2.6.38-8.42-generic 2.6.38.2
Uname: Linux 2.6.38-8-generic x86_64
NonfreeKernelModules: nvidia
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.23.
Architecture: amd64
ArecordDevices:
 **** List of CAPTURE Hardware Devices ****
 card 0: Intel [HDA Intel], device 0: ALC272 Analog [ALC272 Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: tom 1689 F.... pulseaudio
CRDA: Error: [Errno 2] Adresář nebo soubor neexistuje
Card0.Amixer.info:
 Card hw:0 'Intel'/'HDA Intel at 0xd9100000 irq 46'
   Mixer name : 'Realtek ALC272'
   Components : 'HDA:10ec0272,17aac004,00100001'
   Controls : 24
   Simple ctrls : 13
Card1.Amixer.info:
 Card hw:1 'NVidia'/'HDA NVidia at 0xd3000000 irq 16'
   Mixer name : 'Nvidia GPU 0a HDMI/DP'
   Components : 'HDA:10de000a,10de0101,00100100'
   Controls : 16
   Simple ctrls : 4
Date: Wed Apr 27 12:51:58 2011
HibernationDevice: RESUME=UUID=563cd50c-07aa-41f8-ae6b-72ee145449d3
InstallationMedia: Kubuntu 11.04 "Natty Narwhal" - Beta amd64 (20110330)
MachineType: LENOVO 20035
ProcEnviron:
 LANGUAGE=cs
 LANG=cs_CZ.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.38-8-generic root=UUID=37bf390e-c6df-4b9d-9ca7-e951a038548d ro quiet splash vt.handoff=7
RelatedPackageVersions:
 linux-restricted-modules-2.6.38-8-generic N/A
 linux-backports-modules-2.6.38-8-generic N/A
 linux-firmware 1.52
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 03/17/2010
dmi.bios.vendor: LENOVO
dmi.bios.version: 1ECN33WW(V5.07)
dmi.board.asset.tag: Base Board Asset Tag
dmi.board.name: Base Board Product Name
dmi.board.vendor: LENOVO
dmi.board.version: Base Board Version
dmi.chassis.asset.tag: Chassis Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: Chassis Manufacturer
dmi.chassis.version: Chassis Version
dmi.modalias: dmi:bvnLENOVO:bvr1ECN33WW(V5.07):bd03/17/2010:svnLENOVO:pn20035:pvrLenovoIdeaPadY550P:rvnLENOVO:rnBaseBoardProductName:rvrBaseBoardVersion:cvnChassisManufacturer:ct10:cvrChassisVersion:
dmi.product.name: 20035
dmi.product.version: Lenovo IdeaPad Y550P
dmi.sys.vendor: LENOVO

Revision history for this message
Tommy_CZ (t-kijas) wrote :
Brad Figg (brad-figg)
Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Lukas Winter (webmaster-geloescht) wrote :

Seems to concern only systems with a btrfs partition regardless of mount point. It might be because there is no fsck tool for btrfs!

summary: - Ubuntu does fsck on every start
+ Ubuntu does fsck on every start when using btrfs
Revision history for this message
Samuel Lidén Borell (samuellb) wrote :

There's actually a very simple fsck for btrfs (btrfsck), but it's very primitive and doesn't support any of the command line options yet.

Maybe something calls it, and expects it to support some command line option? Something like --dont-run-every-time, except with a different name of course.

Revision history for this message
Lukas Winter (webmaster-geloescht) wrote :

OK, then mountall is the offender here, because that's what /etc/init/mountall.conf calls. According to its manpage it runs fsck.

Revision history for this message
Tommy_CZ (t-kijas) wrote :

After few months btrfs crashes so badly, that I cannot access my /home folder. Btrfsck finds an error but seems it cannot repair it. (bug #804309)

Revision history for this message
Steve Langasek (vorlon) wrote :

This is not a bug in mountall. fsck is meant to be called for all filesystems at boot, and it's the responsibility of the per-filesystem fsck implementation to figure out if the filesystem is clean or if something needs to be done. If fsck.btrfs doesn't provide the standard interface for fsck, that needs to be fixed in btrfs-tools.

affects: mountall (Ubuntu) → btrfs-tools (Ubuntu)
Changed in btrfs-tools (Ubuntu):
status: New → Confirmed
Revision history for this message
Tommy_CZ (t-kijas) wrote :

1 year. Nothing changed.

Revision history for this message
Curtis Lee Bolin (curtisleebolin) wrote :

A quick work around if the bootup speed is really killing you and since btrfsck doesn't do much yet.
Please realize this prevents mountall from running btrfsck and this is NOT a fix.

You can move btrfsck somewhere where you can still use it:
$ sudo mv /sbin/btrfsck /usr/local/bin/

Then make a symbolic link to something like false:
$ sudo ln -s /bin/false /sbin/btrfsck

Also note that if btrfs-tools is updated or reinstalled, you have to do this again.

Hopefully a full btrfsck will be out soon. Cross your fingers.

Revision history for this message
Dimitri John Ledkov (ex-credativ) (dle-credativ) wrote :

Well btrfsck does do something useful in Quantal...

Changed in linux (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
Dimitri John Ledkov (ex-credativ) (dle-credativ) wrote :

Please correct, if I am wrong, but this is not a linux kernel bug, as far as I can see.

Revision history for this message
Curtis Lee Bolin (curtisleebolin) wrote :

Dmitrijs Ledkovs, you are absolutely correct that this is not a Linux kernel bug, but Quantal is still currently using Btrfs v0.19 with the same btrfsck.
With my 3TB fs, it takes about 9 minutes to boot because of the fs check.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Curtis Lee Bolin, quantal has much newer btrfs-tool, which have newer fsck tool. If it is still so slow for you, the best procedure is to request the upstream btrfsck to support standard flags of checking if the disk is dirty/fsck not run in a while and only then spend 9 minutes fscking. Are you willing to forward this upstream?

Revision history for this message
Curtis Lee Bolin (curtisleebolin) wrote :

If you read the btrfsck manual even in quantal, you will see:

"Btrfs is currently under heavy development, and not suitable for any uses other than benchmarking and review."

I took that into consideration before working around the long scan at boot. Anyone that is using btrfs is clearly experimenting. I'm just passing it on to the other people experimenting (the people reading this bug report).
I'm confident the developers are on track. No need to tell them what they already know.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

I really don't want to special case btrfs.
But I see that with very large hard-drives it can be a pain.
Note, that earlier mentions of ext4 do not apply here as most of the time it, fsck on ext4 quits reporting filesystems as clean.
Maybe a configuration options should be included to prevent including btrfs fsck into initramfs if one doesn't want to.... but then no btrfsck will be available in the initramfs, when one would want / need it.

Revision history for this message
Curtis Lee Bolin (curtisleebolin) wrote :

fsck.btrfs is now just a dummy program to return exit code 0.

Source: $ man fsck.btrfs

Changed in btrfs-tools (Ubuntu):
status: Confirmed → Fix Released
Changed in linux (Ubuntu):
status: Invalid → Fix Released
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.