" (-l includes snapshots/clones)\n"
" info <image-name> show information about image size,\n"
" striping, etc.\n"
-" create [--order <bits>] --size <MB> <name> create an empty image\n"
-" clone [--order <bits>] <parentsnap> <clonename>\n"
+" create [--order <bits>] [--image-shared] --size <MB> <name>\n"
+" create an empty image\n"
+" clone [--order <bits>] [--image-shared] <parentsnap> <clonename>\n"
" clone a snapshot into a COW\n"
" child image\n"
" children <snap-name> display children of snapshot\n"
" rm <image-name> delete an image\n"
" export <image-name> <path> export image to file\n"
" \"-\" for stdout\n"
-" import <path> <image-name> import image from file\n"
+" import [--image-shared] <path> <image-name> import image from file\n"
" (dest defaults\n"
" as the filename part of file)\n"
" \"-\" for stdin\n"
" --image-format <format-number> format to use when creating an image\n"
" format 1 is the original format (default)\n"
" format 2 supports cloning\n"
+" --image-shared image will be used concurrently (disables\n"
+" RBD exclusive lock and dependent features)\n"
" --id <username> rados user (without 'client.'prefix) to\n"
" authenticate as\n"
" --keyfile <path> file containing secret key for use with cephx\n"
bool format_specified = false,
output_format_specified = false;
int format = 1;
- uint64_t features = RBD_FEATURE_LAYERING;
+ uint64_t features = RBD_FEATURE_LAYERING | RBD_FEATURE_EXCLUSIVE_LOCK;
const char *imgname = NULL, *snapname = NULL, *destname = NULL,
*dest_poolname = NULL, *dest_snapname = NULL, *path = NULL,
*devpath = NULL, *lock_cookie = NULL, *lock_client = NULL,
progress = false;
} else if (ceph_argparse_flag(args, i , "--allow-shrink", (char *)NULL)) {
resize_allow_shrink = true;
+ } else if (ceph_argparse_flag(args, i, "--image-shared", (char *)NULL)) {
+ features &= ~RBD_FEATURE_EXCLUSIVE_LOCK;
} else if (ceph_argparse_witharg(args, i, &val, "--format", (char *) NULL)) {
long long ret = strict_strtoll(val.c_str(), 10, &parse_err);
if (parse_err.empty()) {
(-l includes snapshots/clones)
info <image-name> show information about image size,
striping, etc.
- create [--order <bits>] --size <MB> <name> create an empty image
- clone [--order <bits>] <parentsnap> <clonename>
+ create [--order <bits>] [--image-shared] --size <MB> <name>
+ create an empty image
+ clone [--order <bits>] [--image-shared] <parentsnap> <clonename>
clone a snapshot into a COW
child image
children <snap-name> display children of snapshot
rm <image-name> delete an image
export <image-name> <path> export image to file
"-" for stdout
- import <path> <image-name> import image from file
+ import [--image-shared] <path> <image-name> import image from file
(dest defaults
as the filename part of file)
"-" for stdin
--image-format <format-number> format to use when creating an image
format 1 is the original format (default)
format 2 supports cloning
+ --image-shared image will be used concurrently (disables
+ RBD exclusive lock and dependent features)
--id <username> rados user (without 'client.'prefix) to
authenticate as
--keyfile <path> file containing secret key for use with cephx