]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
init-ceph, mkcephfs: try 'btrfs device scan' before 'btrfsctl -a'
authorSage Weil <sage.weil@dreamhost.com>
Sat, 11 Feb 2012 21:43:23 +0000 (13:43 -0800)
committerSage Weil <sage.weil@dreamhost.com>
Sat, 11 Feb 2012 21:44:19 +0000 (13:44 -0800)
Fixes: #2023
Reported-by: Wido den Hollander <wido@widodh.nl>
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/init-ceph.in
src/mkcephfs.in

index 701701f2f1ebb1ab55c2ac15ca16d4d89d092c52..72249f997255d7a3bb4426e568f603c5eadf3f16 100644 (file)
@@ -268,7 +268,7 @@ for name in $what; do
                [ -n "$btrfs_opt" ] && btrfs_opt="-o $btrfs_opt"
                [ -n "$pre_mount" ] && do_cmd "$pre_mount"
                echo Mounting Btrfs on $host:$btrfs_path
-               do_root_cmd "modprobe btrfs ; btrfsctl -a ; egrep -q '^[^ ]+ $btrfs_path' /proc/mounts || mount -t btrfs $btrfs_opt $first_dev $btrfs_path"
+               do_root_cmd "modprobe btrfs ; btrfs device scan || btrfsctl -a ; egrep -q '^[^ ]+ $btrfs_path' /proc/mounts || mount -t btrfs $btrfs_opt $first_dev $btrfs_path"
            fi
            echo Starting Ceph $name on $host...
            get_conf pre_start_eval "" "pre start eval"
index 83fb932f0dc132e2045acd0e7ecd05c828c249ee..17b6014474d37be9f8311e53f7db8496e4259943 100644 (file)
@@ -332,7 +332,7 @@ if [ -n "$prepareosdfs" ]; then
 
     modprobe btrfs || true
     mkfs.btrfs $btrfs_devs
-    btrfsctl -a
+    btrfs device scan || btrfsctl -a
     mount -t btrfs $btrfs_opt $first_dev $btrfs_path
     chown $osd_user $btrfs_path
     chmod +w $btrfs_path