dog - Man Page

Command line utility for the sheep daemon

Examples (TL;DR)

Synopsis

dog <command> <subcommand> [options]

Description

dog - Sheepdog is a distributed storage system for QEMU. It provides highly available block level storage volumes to virtual machines. Sheepdog supports advanced volume management features such as snapshot, cloning, and thin provisioning. The architecture of Sheepdog is fully symmetric; there is no central node such as a meta-data server.

The server daemon is called sheep(8).  A command line utility is available via dog(8).  QEMU virtual machines use the sheep daemon via a block driver available in qemu(1).

For more information, run 'dog <command> <subcommand> --help'.

Command & Subcommand

vdi check [-s snapshot] [-e] [-a address] [-p port] [-h] [-T] <vdiname>

Options:
 -s, --snapshot          specify a snapshot id or tag name
 -e, --exist             only check objects exist or not,
                         neither comparing nor repairing
 -a, --address           specify the daemon address (default: localhost)
 -p, --port              specify the daemon port
 -h, --help              display this help and exit
 -T, --time              show elapsed time

Description:
 check and repair image's consistency

vdi create [-P] [-y] [-c copies] [-a address] [-p port] [-h] [-r] [-v] [-z block_size_shift] [-T] <vdiname> <size>

Options:
 -P, --prealloc          preallocate all the data objects
 -y, --hyper             create a hyper volume
 -c, --copies            specify the data redundancy level
 -a, --address           specify the daemon address (default: localhost)
 -p, --port              specify the daemon port
 -h, --help              display this help and exit
 -r, --raw               raw output mode: omit headers, separate fields with
                         single spaces and print all sizes in decimal bytes
 -v, --verbose           print more information than default
 -z, --block_size_shift  specify the bit shift num for data object size
 -T, --time              show elapsed time

Description:
 create an image

vdi snapshot [-s snapshot] [-a address] [-p port] [-h] [-r] [-v] [-T] [-R] <vdiname>

Options:
 -s, --snapshot          specify a snapshot id or tag name
 -a, --address           specify the daemon address (default: localhost)
 -p, --port              specify the daemon port
 -h, --help              display this help and exit
 -r, --raw               raw output mode: omit headers, separate fields with
                         single spaces and print all sizes in decimal bytes
 -v, --verbose           print more information than default
 -T, --time              show elapsed time
 -R, --reduce-identical-snapshotsdo not create snapshot if working VDI doesn't have its own objects

Description:
 create a snapshot

vdi clone [-s snapshot] [-P] [-n] [-a address] [-p port] [-h] [-r] [-v] [-T] <src vdi> <dst vdi>

Options:
 -s, --snapshot          specify a snapshot id or tag name
 -P, --prealloc          preallocate all the data objects
 -n, --no-share          share nothing with its parent
 -a, --address           specify the daemon address (default: localhost)
 -p, --port              specify the daemon port
 -h, --help              display this help and exit
 -r, --raw               raw output mode: omit headers, separate fields with
                         single spaces and print all sizes in decimal bytes
 -v, --verbose           print more information than default
 -T, --time              show elapsed time

Description:
 clone an image

vdi delete [-s snapshot] [-a address] [-p port] [-h] [-T] <vdiname>

Options:
 -s, --snapshot          specify a snapshot id or tag name
 -a, --address           specify the daemon address (default: localhost)
 -p, --port              specify the daemon port
 -h, --help              display this help and exit
 -T, --time              show elapsed time

Description:
 delete an image

vdi rollback [-s snapshot] [-a address] [-p port] [-h] [-f] [-r] [-v] [-T] <vdiname>

Options:
 -s, --snapshot          specify a snapshot id or tag name
 -a, --address           specify the daemon address (default: localhost)
 -p, --port              specify the daemon port
 -h, --help              display this help and exit
 -f, --force             do operation forcibly
 -r, --raw               raw output mode: omit headers, separate fields with
                         single spaces and print all sizes in decimal bytes
 -v, --verbose           print more information than default
 -T, --time              show elapsed time

Description:
 rollback to a snapshot

vdi list [-a address] [-p port] [-r] [-h] [-o oid] [-T] [vdiname]

Options:
 -a, --address           specify the daemon address (default: localhost)
 -p, --port              specify the daemon port
 -r, --raw               raw output mode: omit headers, separate fields with
                         single spaces and print all sizes in decimal bytes
 -h, --help              display this help and exit
 -o, --oid               specify the object id of the tracking object
 -T, --time              show elapsed time

Description:
 list images

vdi tree [-a address] [-p port] [-h] [-T]

Options:
 -a, --address           specify the daemon address (default: localhost)
 -p, --port              specify the daemon port
 -h, --help              display this help and exit
 -T, --time              show elapsed time

Description:
 show images in tree view format

vdi graph [-a address] [-p port] [-h] [-T]

Options:
 -a, --address           specify the daemon address (default: localhost)
 -p, --port              specify the daemon port
 -h, --help              display this help and exit
 -T, --time              show elapsed time

Description:
 show images in Graphviz dot format

vdi object {location|map|dump-inode} [-i index] [-s snapshot] [-a address] [-p port] [-h] [-T] <vdiname>

Available subcommands:
 location                show object location information
 map                     show object map information
 dump-inode              dump inode information

Options:
 -i, --index             specify the index of data objects
 -s, --snapshot          specify a snapshot id or tag name
 -a, --address           specify the daemon address (default: localhost)
 -p, --port              specify the daemon port
 -h, --help              display this help and exit
 -T, --time              show elapsed time

Description:
 show object information in the image

vdi track [-i index] [-s snapshot] [-a address] [-p port] [-h] [-o oid] [-T] <vdiname>

Options:
 -i, --index             specify the index of data objects
 -s, --snapshot          specify a snapshot id or tag name
 -a, --address           specify the daemon address (default: localhost)
 -p, --port              specify the daemon port
 -h, --help              display this help and exit
 -o, --oid               specify the object id of the tracking object
 -T, --time              show elapsed time

Description:
 show the object epoch trace in the image

vdi setattr [-d] [-x] [-a address] [-p port] [-h] [-T] <vdiname> <key> [value]

Options:
 -d, --delete            delete a key
 -x, --exclusive         write in an exclusive mode
 -a, --address           specify the daemon address (default: localhost)
 -p, --port              specify the daemon port
 -h, --help              display this help and exit
 -T, --time              show elapsed time

Description:
 set a VDI attribute

vdi getattr [-a address] [-p port] [-h] [-T] <vdiname> <key>

Options:
 -a, --address           specify the daemon address (default: localhost)
 -p, --port              specify the daemon port
 -h, --help              display this help and exit
 -T, --time              show elapsed time

Description:
 get a VDI attribute

vdi resize [-a address] [-p port] [-h] [-T] <vdiname> <new size>

Options:
 -a, --address           specify the daemon address (default: localhost)
 -p, --port              specify the daemon port
 -h, --help              display this help and exit
 -T, --time              show elapsed time

Description:
 resize an image

vdi read [-s snapshot] [-a address] [-p port] [-h] [-T] <vdiname> [<offset> [<len>]]

Options:
 -s, --snapshot          specify a snapshot id or tag name
 -a, --address           specify the daemon address (default: localhost)
 -p, --port              specify the daemon port
 -h, --help              display this help and exit
 -T, --time              show elapsed time

Description:
 read data from an image

vdi write [-a address] [-p port] [-w] [-h] [-T] <vdiname> [<offset> [<len>]]

Options:
 -a, --address           specify the daemon address (default: localhost)
 -p, --port              specify the daemon port
 -w, --writeback         use writeback mode
 -h, --help              display this help and exit
 -T, --time              show elapsed time

Description:
 write data to an image

vdi backup [-s snapshot] [-F from] [-a address] [-p port] [-h] [-T] <vdiname>

Options:
 -s, --snapshot          specify a snapshot id or tag name
 -F, --from              create a differential backup from the snapshot
 -a, --address           specify the daemon address (default: localhost)
 -p, --port              specify the daemon port
 -h, --help              display this help and exit
 -T, --time              show elapsed time

Description:
 create an incremental backup between two snapshots and outputs to STDOUT

vdi restore [-s snapshot] [-a address] [-p port] [-h] [-T] <vdiname>

Options:
 -s, --snapshot          specify a snapshot id or tag name
 -a, --address           specify the daemon address (default: localhost)
 -p, --port              specify the daemon port
 -h, --help              display this help and exit
 -T, --time              show elapsed time

Description:
 restore snapshot images from a backup provided in STDIN

vdi alter-copy [-c copies] [-a address] [-p port] [-h] [-T] [-f] <vdiname>

Options:
 -c, --copies            specify the data redundancy level
 -a, --address           specify the daemon address (default: localhost)
 -p, --port              specify the daemon port
 -h, --help              display this help and exit
 -T, --time              show elapsed time
 -f, --force             do operation forcibly

Description:
 set the vdi's redundancy level

vdi lock {list|unlock} [-s snapshot] [-a address] [-p port] [-h] [-T]

Available subcommands:
 list                    list locked VDIs
 unlock                  unlock locked VDI forcibly

Options:
 -s, --snapshot          specify a snapshot id or tag name
 -a, --address           specify the daemon address (default: localhost)
 -p, --port              specify the daemon port
 -h, --help              display this help and exit
 -T, --time              show elapsed time

Description:
 See 'dog vdi lock' for more information

node kill [-a address] [-p port] [-r] [-h] [-l] [-T] <node id>

Options:
 -a, --address           specify the daemon address (default: localhost)
 -p, --port              specify the daemon port
 -r, --raw               raw output mode: omit headers, separate fields with
                         single spaces and print all sizes in decimal bytes
 -h, --help              display this help and exit
 -l, --local             issue request to local node
 -T, --time              show elapsed time

Description:
 kill node

node list [-a address] [-p port] [-r] [-h] [-T]

Options:
 -a, --address           specify the daemon address (default: localhost)
 -p, --port              specify the daemon port
 -r, --raw               raw output mode: omit headers, separate fields with
                         single spaces and print all sizes in decimal bytes
 -h, --help              display this help and exit
 -T, --time              show elapsed time

Description:
 list nodes

node info [-a address] [-p port] [-r] [-h] [-T]

Options:
 -a, --address           specify the daemon address (default: localhost)
 -p, --port              specify the daemon port
 -r, --raw               raw output mode: omit headers, separate fields with
                         single spaces and print all sizes in decimal bytes
 -h, --help              display this help and exit
 -T, --time              show elapsed time

Description:
 show information about each node

node recovery {info|set-throttle|get-throttle} [-a address] [-p port] [-h] [-P] [-r] [-T] <max> <interval>

Available subcommands:
 info                    show recovery information of nodes (default)
 set-throttle            set new throttling
 get-throttle            get current throttling

Options:
 -a, --address           specify the daemon address (default: localhost)
 -p, --port              specify the daemon port
 -h, --help              display this help and exit
 -P, --progress          show progress of recovery in the node
 -r, --raw               raw output mode: omit headers, separate fields with
                         single spaces and print all sizes in decimal bytes
 -T, --time              show elapsed time

Description:
 show recovery information or set/get recovery speed throttling of nodes

node md {info|plug|unplug} [-a address] [-p port] [-r] [-A] [-f] [-h] [-T] [disks]

Available subcommands:
 info                    show multi-disk information
 plug                    plug more disk(s) into node
 unplug                  unplug disk(s) from node

Options:
 -a, --address           specify the daemon address (default: localhost)
 -p, --port              specify the daemon port
 -r, --raw               raw output mode: omit headers, separate fields with
                         single spaces and print all sizes in decimal bytes
 -A, --all               show md information of all the nodes
 -f, --force             ignore the confirmation
 -h, --help              display this help and exit
 -T, --time              show elapsed time

Description:
 See 'dog node md' for more information

node stat [-a address] [-p port] [-r] [-w] [-h] [-T]

Options:
 -a, --address           specify the daemon address (default: localhost)
 -p, --port              specify the daemon port
 -r, --raw               raw output mode: omit headers, separate fields with
                         single spaces and print all sizes in decimal bytes
 -w, --watch             watch the stat every second
 -h, --help              display this help and exit
 -T, --time              show elapsed time

Description:
 show stat information about the node

node log level [-a address] [-p port] [-h] [-T]

Available subcommands:
 level                   manipulate loglevel

Options:
 -a, --address           specify the daemon address (default: localhost)
 -p, --port              specify the daemon port
 -h, --help              display this help and exit
 -T, --time              show elapsed time

Description:
 show or set log level of the node

node vnodes set [-a address] [-p port] [-h] <num of vnodes>

Available subcommands:
 set                     set new vnodes

Options:
 -a, --address           specify the daemon address (default: localhost)
 -p, --port              specify the daemon port
 -h, --help              display this help and exit

Description:
 set new vnodes

node format [-a address] [-p port] [-h] [-T] <directory of sheep> <a name of store format>

Options:
 -a, --address           specify the daemon address (default: localhost)
 -p, --port              specify the daemon port
 -h, --help              display this help and exit
 -T, --time              show elapsed time

Description:
 initialize store format of the node

cluster info [-a address] [-p port] [-r] [-h] [-v] [-T] [-d]

Options:
 -a, --address           specify the daemon address (default: localhost)
 -p, --port              specify the daemon port
 -r, --raw               raw output mode: omit headers, separate fields with
                         single spaces and print all sizes in decimal bytes
 -h, --help              display this help and exit
 -v, --verbose           print more information than default
 -T, --time              show elapsed time
 -d, --diff              just output the changes between the two adjacent epochesfor cluster info

Description:
 show cluster information

cluster format [-b store] [-c copies] [-l] [-t] [-a address] [-p port] [-h] [-z block_size_shift] [-T] [-V] [-R] [-f] [-F]

Options:
 -b, --store             specify backend store
 -c, --copies            specify the default data redundancy (number of copies)
 -l, --lock              Lock vdi to exclude multiple users
 -t, --strict            do not serve write request if number of nodes is not sufficient
 -a, --address           specify the daemon address (default: localhost)
 -p, --port              specify the daemon port
 -h, --help              display this help and exit
 -z, --block_size_shift  specify the shift num of default data object size
 -T, --time              show elapsed time
 -V, --fixedvnodes       disable automatic vnodes calculation
 -R, --recyclevid        enable recycling of VID
 -f, --force             do not prompt for confirmation
 -F, --avoid-diskfull    skip recovery if recovery process can cause disk full

Description:
 create a Sheepdog store

cluster shutdown [-a address] [-p port] [-h] [-T]

Options:
 -a, --address           specify the daemon address (default: localhost)
 -p, --port              specify the daemon port
 -h, --help              display this help and exit
 -T, --time              show elapsed time

Description:
 stop Sheepdog

cluster snapshot {save|list|load|show} [-a address] [-p port] [-h] [-T] [-m] <tag|idx> <path> [vdi1] [vdi2] ...

Available subcommands:
 save                    save snapshot to localpath
 list                    list snapshot of localpath
 load                    load snapshot from localpath
 show                    show vdi list from snapshot

Options:
 -a, --address           specify the daemon address (default: localhost)
 -p, --port              specify the daemon port
 -h, --help              display this help and exit
 -T, --time              show elapsed time
 -m, --multithread       use multi-thread for 'cluster snapshot save'

Description:
 snapshot/restore the cluster

cluster recover {force|enable|disable} [-a address] [-f] [-p port] [-h] [-T]

Available subcommands:
 force                   force recover cluster immediately
 enable                  enable automatic recovery and run once recover if necessary
 disable                 disable automatic recovery

Options:
 -a, --address           specify the daemon address (default: localhost)
 -f, --force             do not prompt for confirmation
 -p, --port              specify the daemon port
 -h, --help              display this help and exit
 -T, --time              show elapsed time

Description:
 See 'dog cluster recover' for more information

cluster reweight [-a address] [-p port] [-h] [-T]

Options:
 -a, --address           specify the daemon address (default: localhost)
 -p, --port              specify the daemon port
 -h, --help              display this help and exit
 -T, --time              show elapsed time

Description:
 reweight the cluster

cluster check [-a address] [-p port] [-h] [-T]

Options:
 -a, --address           specify the daemon address (default: localhost)
 -p, --port              specify the daemon port
 -h, --help              display this help and exit
 -T, --time              show elapsed time

Description:
 check and repair cluster

cluster alter-copy [-a address] [-p port] [-h] [-T] [-c copies] [-f]

Options:
 -a, --address           specify the daemon address (default: localhost)
 -p, --port              specify the daemon port
 -h, --help              display this help and exit
 -T, --time              show elapsed time
 -c, --copies            specify the default data redundancy (number of copies)
 -f, --force             do not prompt for confirmation

Description:
 set the cluster's redundancy level

upgrade inode-convert [-h] [-T] [-o orig-version] <path of original inode file> <path of new inode file>

Options:
 -h, --help              display this help and exit
 -T, --time              show elapsed time
 -o, --orig-version      version of converting file

Description:
 upgrade inode object file

upgrade epoch-convert [-h] [-T] [-o orig-version] <path of original epoch log file> <path of new epoch log file>

Options:
 -h, --help              display this help and exit
 -T, --time              show elapsed time
 -o, --orig-version      version of converting file

Description:
 upgrade epoch log file

benchmark io [-a address] [-p port] [-r] [-h] [-T] [-f] [-w workqueue] [-t total] [-n nr-threads] <vdiname>

Options:
 -a, --address           specify the daemon address (default: localhost)
 -p, --port              specify the daemon port
 -r, --raw               raw output mode: omit headers, separate fields with
                         single spaces and print all sizes in decimal bytes
 -h, --help              display this help and exit
 -T, --time              show elapsed time
 -f, --force             do not prompt for confirmation
 -w, --workqueue         specify workqueue type
 -t, --total             a number of total operation (e.g. I/O request)
 -n, --nr-threads        a number of worker threads (only used for fixed workqueue)

Description:
 benchmark I/O performance

Dependencies

Sheepdog requires QEMU 0.13.z or later and Corosync 1.y.z or 2.y.z.

Files

none

See Also

sheep(8), qemu(1), sheepfs(8), corosync_overview(8)

Authors

This software is developed by the Sheepdog community which may be reached via mailing list at <sheepdog@lists.wpkg.org>.

Referenced By

cdist-type__dog_vdi(7), sheep(8), sheepfs(8).

2024-01-27