]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mkcephfs: modprobe btrfs; create mount point earlier
authorSage Weil <sage@newdream.net>
Mon, 20 Apr 2009 20:34:17 +0000 (13:34 -0700)
committerSage Weil <sage@newdream.net>
Mon, 20 Apr 2009 20:34:17 +0000 (13:34 -0700)
src/mkcephfs

index af8534fb6c03c5e833251d49707286ba07e34f34..3e26fced53fcbbfb2606ef34aa13fed5e3aea63e 100755 (executable)
@@ -140,12 +140,14 @@ for name in $what; do
        get_conf btrfs_devs "" "btrfs devs"
        first_dev=`echo $btrfs_devs | cut '-d ' -f 1`
        
+       do_cmd "test -d $osd_data || mkdir -p $osd_data"
+
        if [ $mkbtrfs -eq 1 ]; then
-           do_cmd "umount $btrfs_path ; for f in $btrfs_devs ; do umount \$f ; done ; mkfs.btrfs $btrfs_devs ; modprobe btrfs ; btrfsctl -a ; mount -t btrfs $first_dev $btrfs_path"
+           do_cmd "umount $btrfs_path ; for f in $btrfs_devs ; do umount \$f ; done ; modprobe btrfs ; mkfs.btrfs $btrfs_devs ; modprobe btrfs ; btrfsctl -a ; mount -t btrfs $first_dev $btrfs_path"
        fi
 
        [ -n "$ssh" ] && scp $monmap $host:$monmap
-       do_cmd "test ! -d $osd_data && mkdir -p $osd_data ; $BINDIR/cosd -c $conf --monmap $monmap -i $num --mkfs --osd-data $osd_data"
+       do_cmd "$BINDIR/cosd -c $conf --monmap $monmap -i $num --mkfs --osd-data $osd_data"
     fi
 
     if [ "$type" = "mds" ]; then