]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
initscript: default btrfs mount options notreelog,flushoncommit
authorSage Weil <sage@newdream.net>
Tue, 28 Apr 2009 19:12:05 +0000 (12:12 -0700)
committerSage Weil <sage@newdream.net>
Tue, 28 Apr 2009 20:30:44 +0000 (13:30 -0700)
src/init-ceph
src/mkcephfs

index edf65ce179d360cc4a88eebd3dc80c3c81496f12..25fc9194a68812b0c94d6be177efe47648cf9d42 100755 (executable)
@@ -171,8 +171,10 @@ for name in $what; do
            echo Starting ceph $name on $host...
            if [ $dobtrfs -eq 1 ] && [ -n "$btrfs_devs" ]; then
                get_conf pre_mount "true" "pre mount command"
+               get_conf btrfs_opt "notreelog,flushoncommit" "btrfs options"
+               [ -n "$btrfs_opt" ] && btrfs_opt="-o $btrfs_opt"
                [ -n "$pre_mount" ] && do_cmd $pre_mount
-               do_cmd "modprobe btrfs ; btrfsctl -a ; egrep -q '^[^ ]+ $btrfs_path' /proc/mounts || mount -t btrfs $first_dev $btrfs_path"
+               do_cmd "modprobe btrfs ; btrfsctl -a ; egrep -q '^[^ ]+ $btrfs_path' /proc/mounts || mount -t btrfs $btrfs_opt $first_dev $btrfs_path"
            fi
            get_conf pre_start_eval "" "pre start eval"
            [ -n "$pre_start_eval" ] && $pre_start_eval
index 3e26fced53fcbbfb2606ef34aa13fed5e3aea63e..10b9bd3177733cf84e630eb167babc380e864e33 100755 (executable)
@@ -139,11 +139,13 @@ for name in $what; do
        get_conf btrfs_path "$osd_data" "btrfs path"  # mount point defaults so osd data
        get_conf btrfs_devs "" "btrfs devs"
        first_dev=`echo $btrfs_devs | cut '-d ' -f 1`
+       get_conf btrfs_opt "notreelog,flushoncommit" "btrfs options"
+       [ -n "$btrfs_opt" ] && btrfs_opt="-o $btrfs_opt"
        
        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 ; modprobe btrfs ; 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 $btrfs_opt $first_dev $btrfs_path"
        fi
 
        [ -n "$ssh" ] && scp $monmap $host:$monmap