def make(parser):
    """
    Prepare a data disk on remote host.
    """
    sub_command_help = dedent("""
    Create OSDs from a data disk on a remote host:

        ceph-deploy osd create {node} --data /path/to/device

    For bluestore, optional devices can be used::

        ceph-deploy osd create {node} --data /path/to/data --block-db /path/to/db-device
        ceph-deploy osd create {node} --data /path/to/data --block-wal /path/to/wal-device
        ceph-deploy osd create {node} --data /path/to/data --block-db /path/to/db-device --block-wal /path/to/wal-device

    For filestore, the journal must be specified, as well as the objectstore::

        ceph-deploy osd create {node} --filestore --data /path/to/data --journal /path/to/journal

    For data devices, it can be an existing logical volume in the format of:
    vg/lv, or a device. For other OSD components like wal, db, and journal, it
    can be logical volume (in vg/lv format) or it must be a GPT partition.
    """
    )
    parser.formatter_class = argparse.RawDescriptionHelpFormatter
    parser.description = sub_command_help

    osd_parser = parser.add_subparsers(dest='subcommand')
    osd_parser.required = True

    osd_list = osd_parser.add_parser(
        'list',
        help='List OSD info from remote host(s)'
        )
    osd_list.add_argument(
        'host',
        nargs='+',
        metavar='HOST',
        help='remote host(s) to list OSDs from'
        )
    osd_list.add_argument(
        '--debug',
        action='store_true',
        help='Enable debug mode on remote ceph-volume calls',
        )
    osd_create = osd_parser.add_parser(
        'create',
        help='Create new Ceph OSD daemon by preparing and activating a device'
    )
    osd_create.add_argument(
        '--data',
        metavar='DATA',
        help='The OSD data logical volume (vg/lv) or absolute path to device'
    )
    osd_create.add_argument(
        '--journal',
        help='Logical Volume (vg/lv) or path to GPT partition',
        )
    osd_create.add_argument(
        '--zap-disk',
        action='store_true',
        help='DEPRECATED - cannot zap when creating an OSD'
    )
    osd_create.add_argument(
        '--fs-type',
        metavar='FS_TYPE',
        choices=['xfs',
                 'btrfs'
                 ],
        default='xfs',
        help='filesystem to use to format DEVICE (xfs, btrfs)',
        )
    osd_create.add_argument(
        '--dmcrypt',
        action='store_true',
        help='use dm-crypt on DEVICE',
        )
    osd_create.add_argument(
        '--dmcrypt-key-dir',
        metavar='KEYDIR',
        default='/etc/ceph/dmcrypt-keys',
        help='directory where dm-crypt keys are stored',
        )
    osd_create.add_argument(
        '--filestore',
        action='store_true', default=None,
        help='filestore objectstore',
        )
    osd_create.add_argument(
        '--bluestore',
        action='store_true', default=None,
        help='bluestore objectstore',
        )
    osd_create.add_argument(
        '--block-db',
        default=None,
        help='bluestore block.db path'
        )
    osd_create.add_argument(
        '--block-wal',
        default=None,
        help='bluestore block.wal path'
        )
    osd_create.add_argument(
        'host',
        nargs='?',
        metavar='HOST',
        help='Remote host to connect'
        )
    osd_create.add_argument(
        '--debug',
        action='store_true',
        help='Enable debug mode on remote ceph-volume calls',
        )
    parser.set_defaults(
        func=osd,
        )
def make ( parser ) : sub_command_help = dedent ( """
    Create OSDs from a data disk on a remote host:
        ceph-deploy osd create {node} --data /path/to/device
    For bluestore, optional devices can be used::
        ceph-deploy osd create {node} --data /path/to/data --block-db /path/to/db-device
        ceph-deploy osd create {node} --data /path/to/data --block-wal /path/to/wal-device
        ceph-deploy osd create {node} --data /path/to/data --block-db /path/to/db-device --block-wal /path/to/wal-device
    For filestore, the journal must be specified, as well as the objectstore::
        ceph-deploy osd create {node} --filestore --data /path/to/data --journal /path/to/journal
    For data devices, it can be an existing logical volume in the format of:
    vg/lv, or a device. For other OSD components like wal, db, and journal, it
    can be logical volume (in vg/lv format) or it must be a GPT partition.
    """ ) parser . formatter_class = argparse . RawDescriptionHelpFormatter parser . description = sub_command_help osd_parser = parser . add_subparsers ( dest = 'subcommand' ) osd_parser . required = True osd_list = osd_parser . add_parser ( 'list' , help = 'List OSD info from remote host(s)' ) osd_list . add_argument ( 'host' , nargs = '+' , metavar = 'HOST' , help = 'remote host(s) to list OSDs from' ) osd_list . add_argument ( '--debug' , action = 'store_true' , help = 'Enable debug mode on remote ceph-volume calls' , ) osd_create = osd_parser . add_parser ( 'create' , help = 'Create new Ceph OSD daemon by preparing and activating a device' ) osd_create . add_argument ( '--data' , metavar = 'DATA' , help = 'The OSD data logical volume (vg/lv) or absolute path to device' ) osd_create . add_argument ( '--journal' , help = 'Logical Volume (vg/lv) or path to GPT partition' , ) osd_create . add_argument ( '--zap-disk' , action = 'store_true' , help = 'DEPRECATED - cannot zap when creating an OSD' ) osd_create . add_argument ( '--fs-type' , metavar = 'FS_TYPE' , choices = [ 'xfs' , 'btrfs' ] , default = 'xfs' , help = 'filesystem to use to format DEVICE (xfs, btrfs)' , ) osd_create . add_argument ( '--dmcrypt' , action = 'store_true' , help = 'use dm-crypt on DEVICE' , ) osd_create . add_argument ( '--dmcrypt-key-dir' , metavar = 'KEYDIR' , default = '/etc/ceph/dmcrypt-keys' , help = 'directory where dm-crypt keys are stored' , ) osd_create . add_argument ( '--filestore' , action = 'store_true' , default = None , help = 'filestore objectstore' , ) osd_create . add_argument ( '--bluestore' , action = 'store_true' , default = None , help = 'bluestore objectstore' , ) osd_create . add_argument ( '--block-db' , default = None , help = 'bluestore block.db path' ) osd_create . add_argument ( '--block-wal' , default = None , help = 'bluestore block.wal path' ) osd_create . add_argument ( 'host' , nargs = '?' , metavar = 'HOST' , help = 'Remote host to connect' ) osd_create . add_argument ( '--debug' , action = 'store_true' , help = 'Enable debug mode on remote ceph-volume calls' , ) parser . set_defaults ( func = osd , )
Prepare a data disk on remote host.