]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
vstart.sh: set data dirs instead of keyring locations
authorSage Weil <sage@inktank.com>
Thu, 7 Jun 2012 02:50:50 +0000 (19:50 -0700)
committerSage Weil <sage@inktank.com>
Tue, 12 Jun 2012 18:50:54 +0000 (11:50 -0700)
Signed-off-by: Sage Weil <sage@inktank.com>
src/vstart.sh

index 4fbbe4dc8b0ee6b5e09e10218d936e81b8228d57..a65331cbd865841fed59270633c106d1ed7d8973 100755 (executable)
@@ -261,7 +261,6 @@ if [ "$start_mon" -eq 1 ]; then
                        cat <<EOF > $conf
 ; generated by vstart.sh on `date`
 [global]
-        keyring = keyring
         osd pg bits = 3
         osd pgp bits = 5  ; (invalid, but ceph should cope!)
 $extra_conf
@@ -270,14 +269,22 @@ EOF
         auth supported = cephx
 EOF
                        cat <<EOF >> $conf
+
+[client]
+        keyring = keyring
+
 [mds]
 $DAEMONOPTS
 $CMDSDEBUG
         mds debug frag = true
         mds debug auth pins = true
         mds debug subtrees = true
+        mds data = dev/mds.\$id
 [osd]
 $DAEMONOPTS
+        osd data = dev/osd\$id
+        osd journal = dev/osd\$id.journal
+        osd journal size = 100
         osd class tmp = out
         osd class dir = .libs
         osd scrub load threshold = 5.0
@@ -355,12 +362,6 @@ if [ "$start_osd" -eq 1 ]; then
                    cat <<EOF >> $conf
 [osd.$osd]
         host = $HOSTNAME
-        osd data = dev/osd$osd
-        osd journal = dev/osd$osd.journal
-        osd journal size = 100
-EOF
-                   [ "$cephx" -eq 1 ] && cat <<EOF >> $conf
-        keyring = dev/osd$osd/keyring
 EOF
                    rm -rf dev/osd$osd || true
                    for f in dev/osd$osd/* ; do btrfs sub delete $f || true ; done || true
@@ -396,22 +397,18 @@ if [ "$start_mds" -eq 1 ]; then
     for name in a b c d e f g h i j k l m n o p
     do
        if [ "$new" -eq 1 ]; then
-           key_fn=dev/mds.$name.keyring
+           mkdir -p dev/mds.$name
+           key_fn=dev/mds.$name/keyring
            if [ $overwrite_conf -eq 1 ]; then
                cat <<EOF >> $conf
 [mds.$name]
         host = $HOSTNAME
 EOF
-               if [ "$cephx" -eq 1 ]; then
-                   cat <<EOF >> $conf
-        keyring = $key_fn
-EOF
-               fi
                if [ "$standby" -eq 1 ]; then
+                   mkdir -p dev/mds.${name}s
                    cat <<EOF >> $conf
        mds standby for rank = $mds
 [mds.${name}s]
-        keyring = dev/mds.${name}s.keyring
         mds standby replay = true
         mds standby for name = ${name}
 EOF
@@ -421,8 +418,8 @@ EOF
            $SUDO $CEPH_ADM -i $key_fn auth add mds.$name mon 'allow *' osd 'allow *' mds 'allow'
            if [ "$standby" -eq 1 ]; then
                    $SUDO $CEPH_BIN/ceph-authtool --create-keyring --gen-key --name=mds.${name}s \
-                       dev/mds.${name}s.keyring
-                    $SUDO $CEPH_ADM -i dev/mds.${name}s.keyring auth add mds.${name}s \
+                       dev/mds.${name}s/keyring
+                    $SUDO $CEPH_ADM -i dev/mds.${name}s/keyring auth add mds.${name}s \
                        mon 'allow *' osd 'allow *' mds 'allow'
            fi
        fi