Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#30751 - [btrfs-tools] device scan happens before decryption

Attached to Project: Arch Linux
Opened by Florian (nblock) - Thursday, 19 July 2012, 06:33 GMT
Last edited by Andrea Scarpino (BaSh) - Saturday, 28 July 2012, 09:14 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Tom Gundersen (tomegun)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
I have 4 encrypted drives that collectively build a btrfs volume. On boot, 'btrfs device scan' is executed just before decrypting the drives. After decryption the drives will not be scanned automatically. The result is, that the btrfs volume can't be mounted.

This is related to:
https://bugzilla.redhat.com/show_bug.cgi?id=823093

A workaround is to move the 'USEBTRFS'-Code right after the 'Set up non-root encrypted partition mappings' in /etc/rc.sysinit (See attachment).

Steps to reproduce:
-create encrypted btrfs volumes
-decrypt on boot using /etc/crypttab and keyfiles
-USEBTRFS="yes" in rc.conf
-reboot
-mount -t btrfs /dev/<one-device> /mnt/storage
* wrong fs type, …
-btrfs device scan
-mount -t btrfs /dev/<one-device> /mnt/storage
* works now
This task depends upon

Closed by  Andrea Scarpino (BaSh)
Saturday, 28 July 2012, 09:14 GMT
Reason for closing:  Fixed
Additional comments about closing:  btrfs-progs 0.19.20120328-4
Comment by Dave Reisner (falconindy) - Thursday, 19 July 2012, 13:01 GMT
A better idea would be to provide a udev rule with the btrfs package, rather than a synchronous scan at a specific point in time. Something along the lines of...

ACTION!="remove", SUBSYSTEM=="block", ENV{ID_FS_TYPE}=="btrfs", RUN+="/usr/bin/btrfs device scan %k"
Comment by Florian (nblock) - Saturday, 28 July 2012, 08:15 GMT
the latest btrfs-progs fixed the problem. Thanks!

Loading...