Home :: Documentation :: Download :: Development :: Community :: Wiki :: Ports :: Bugs :: Links :: About
Welcome to CRUX bug tracking.
Tasklist

FS#830 - prepare /etc/rc for btrfs

Attached to Project: CRUX
Opened by Fredrik Rinnestam (rehabdoll) - Saturday, 02 June 2012, 17:04 GMT+2
Last edited by Thomas Penteker (teK) - Wednesday, 26 September 2012, 11:27 GMT+2
Task Type Feature Request
Category ports → core/opt
Status Closed
Assigned To Thomas Penteker (teK)
Operating System CRUX
Severity Low
Priority Normal
Reported Version Development
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 6
Private No

Details

We should probably probe for btrfs on boot.

This allows mounting by UUID and LABEL, etc.
It's not *REQUIRED* for btrfs operations but it does simplify things such as multi-device mounts.
Without the scan, users are required to pass multiple "device=/dev/sdX" in the mount options in fstab for all disks connected to the filesystem. I suspect it's also needed for mounting subvolumes, but i've yet to play with that feature.

--- /etc/rc.old 2010-09-05 22:28:39.375911196 +0200
+++ /etc/rc.new 2012-06-02 16:55:31.309376903 +0200
@@ -19,6 +19,11 @@ if [ -x /sbin/lvm ]; then
/sbin/vgchange --ignorelockingfailure -a y
fi

+# Detect btrfs volumes to simplify fstab entries
+if [ -x /sbin/btrfs ]; then
+ /sbin/btrfs dev scan
+fi
+
# Mount root read-only
/bin/mount -n -o remount,ro /
This task depends upon

Closed by  Thomas Penteker (teK)
Wednesday, 26 September 2012, 11:27 GMT+2
Reason for closing:  Implemented
Additional comments about closing:  Thanks :)
Comment by Thomas Penteker (teK) - Wednesday, 20 June 2012, 22:59 GMT+2
< teK_> there was this 'ugly' message that /sbin/btrfs emitted
< teK_> i.e.
< teK_> /sbin/btrfs dev scan 1>/dev/null
< teK_> failed to read /dev/sr0
< frinnst> i'll look into it a bit more tomorrow, maybe ask the #btrfs people if they have a best practice for it
< frinnst> teK_: looking at the btrfs source, the error we see with /dev/sr0 is the only type of error it can throw
< frinnst> correction, 2 errors
< frinnst> still, it's only a cosmetic and temporary error (will be more intelligent in future versions)
< teK_> so we'll stick to the current proposal and wait what the future brings


conclusion: +1 for including the patch
Comment by Fredrik Rinnestam (rehabdoll) - Monday, 25 June 2012, 18:49 GMT+2
only scan if kernel support btrfs:

--- rc.old 2012-06-25 18:47:56.882519785 +0200
+++ rc.new 2012-06-25 18:48:53.998451914 +0200
@@ -19,6 +19,11 @@ if [ -x /sbin/lvm ]; then
/sbin/vgchange --ignorelockingfailure -a y
fi

+# Scan for btrfs volumes to simplify fstab entries
+if [ -r /sys/fs/btrfs ]; then
+ /sbin/btrfs dev scan
+fi
+
# Mount root read-only
/bin/mount -n -o remount,ro /

Loading...