From: Sage Weil Date: Tue, 28 Apr 2009 19:12:05 +0000 (-0700) Subject: initscript: default btrfs mount options notreelog,flushoncommit X-Git-Tag: v0.7.3~26 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=aa82afffa9725409ed75283a73abac974b10650d;p=ceph.git initscript: default btrfs mount options notreelog,flushoncommit --- diff --git a/src/init-ceph b/src/init-ceph index edf65ce179d3..25fc9194a688 100755 --- a/src/init-ceph +++ b/src/init-ceph @@ -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 diff --git a/src/mkcephfs b/src/mkcephfs index 3e26fced53fc..10b9bd317773 100755 --- a/src/mkcephfs +++ b/src/mkcephfs @@ -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