~ubuntu-branches/ubuntu/quantal/ceph/quantal

« back to all changes in this revision

Viewing changes to src/mkcephfs.in

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2012-08-27 08:23:21 UTC
  • mto: This revision was merged to the branch mainline in revision 21.
  • Revision ID: package-import@ubuntu.com-20120827082321-2cfej6ddvk63vsqq
Tags: upstream-0.48.1
ImportĀ upstreamĀ versionĀ 0.48.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
230
230
 
231
231
### init-daemon ###
232
232
 
233
 
create_private_key()
234
 
{
235
 
    get_conf keyring "$dir/keyring.$name" "keyring"
236
 
    echo "creating private key for $name keyring $keyring"
237
 
    $BINDIR/ceph-authtool --create-keyring --gen-key -n $name $keyring
238
 
    $BINDIR/ceph-authtool -p -n $name $keyring > $dir/key.$name
239
 
}
240
 
 
241
233
if [ -n "$initdaemon" ]; then
242
234
    name=$initdaemon
243
235
    type=`echo $name | cut -c 1-3`   # e.g. 'mon', if $name is 'mon1'
257
249
    fi
258
250
 
259
251
    if [ $type = "osd" ]; then
260
 
        $BINDIR/ceph-osd -c $conf --monmap $dir/monmap -i $id --mkfs
261
 
        create_private_key
 
252
        $BINDIR/ceph-osd -c $conf --monmap $dir/monmap -i $id --mkfs --mkkey
 
253
 
 
254
        get_conf osd_data "/var/lib/ceph/osd/ceph-$id" "osd_data"
 
255
        get_conf osd_keyring "$osd_data/keyring" "keyring"
 
256
        $BINDIR/ceph-authtool -p -n $name $osd_keyring > $dir/key.$name
262
257
    fi
263
258
    
264
259
    if [ $type = "mds" ]; then
265
 
        create_private_key
 
260
        get_conf mds_data "/var/lib/ceph/mds/ceph-$id" "mds_data"
 
261
        get_conf mds_keyring "$mds_data/keyring" "keyring"
 
262
        echo "creating private key for $name keyring $mds_keyring"
 
263
        $BINDIR/ceph-authtool --create-keyring --gen-key -n $name $mds_keyring
 
264
        $BINDIR/ceph-authtool -p -n $name $mds_keyring > $dir/key.$name
266
265
    fi
267
266
 
268
267
    if [ $type = "mon" ]; then
299
298
    id=`echo $name | cut -c 4- | sed 's/^\\.//'`
300
299
    name="$type.$id"
301
300
 
302
 
    get_conf osd_data "" "osd data"
303
 
    get_conf osd_journal "" "osd journal"
 
301
    get_conf osd_data "/var/lib/ceph/osd/ceph-$id" "osd data"
 
302
    get_conf osd_journal "$osd_data/journal" "osd journal"
304
303
    get_conf btrfs_path "$osd_data" "btrfs path"  # mount point defaults so osd data
305
304
    get_conf btrfs_devs "" "btrfs devs"
306
305