Provide way to pass rootflags=degraded (for btrfs)

Bug #1229456 reported by Tv
38
This bug affects 7 people
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

Right now, /etc/grub.d/10_linux insists on

     GRUB_CMDLINE_LINUX="rootflags=subvol=${rootsubvol} ${GRUB_CMDLINE_LINUX}"

and the only way for me to tell a remote box that booting with a degraded RAID1 for a btrfs root filesystem is via

$ grep degraded /etc/default/grub
GRUB_CMDLINE_LINUX="rootflags=subvol=@,degraded"

but this is brittle because it doesn't do the ${rootsubvol} logic from /etc/grub.d. Please provide a better way.

ProblemType: Bug
DistroRelease: Ubuntu 13.04
Package: grub-common 2.00-13ubuntu3
ProcVersionSignature: Ubuntu 3.8.0-19.29-generic 3.8.8
Uname: Linux 3.8.0-19-generic x86_64
ApportVersion: 2.9.2-0ubuntu8
Architecture: amd64
Date: Mon Sep 23 15:19:08 2013
InstallationDate: Installed on 2013-09-23 (0 days ago)
InstallationMedia: Ubuntu-Server 13.04 "Raring Ringtail" - Release amd64 (20130423.1)
MarkForUpload: True
ProcEnviron:
 TERM=linux
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: grub2
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Tv (tv42) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in grub2 (Ubuntu):
status: New → Confirmed
Revision history for this message
kallisti5 (kallisti5) wrote :

The easy fix here is to change:

GRUB_CMDLINE_LINUX="rootflags=subvol=${rootsubvol} ${GRUB_CMDLINE_LINUX}"

to:

GRUB_CMDLINE_LINUX="rootflags=subvol=${rootsubvol},degraded ${GRUB_CMDLINE_LINUX}"

in /etc/grub.d/10_linux.

Any time your root filesystem is on btrfs, attempting to boot in a degraded state is the best choice to help recovery. You can't rebuild your btrfs raid without swapping disks and running a balance.

Revision history for this message
Toby Corkindale (tjc-wintrmute) wrote :

Nearly three years on.. I'm sad to see that even in Ubuntu 16.04 that this bug still exists.

It's quite annoying -- if you have mirrored btrfs drives, you'd really hope that you could boot with a drive missing! (Without having to fiddle around with the grub menu manually)

tags: added: btrfs grub trusty xenial
Changed in grub2 (Ubuntu):
importance: Undecided → Medium
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.