-l, also show snapshots, and use longer-format output including
size, parent (if clone), format, etc.
-:command:`du` [--image *image-name*] [*pool-name*]
+:command:`du` [-p | --pool *pool-name*] [*image-spec* | *snap-spec*]
Will calculate the provisioned and actual disk usage of all images and
- associated snapshots within the specified pool. It can also be used against
- individual images.
+ associated snapshots within the specified pool. It can also be used against
+ individual images and snapshots.
If the RBD fast-diff feature isn't enabled on images, this operation will
require querying the OSDs for every potential object within the image.
"where 'pool' is a rados pool name (default is 'rbd') and 'cmd' is one of:\n"
" (ls | list) [-l | --long ] [pool-name] list rbd images\n"
" (-l includes snapshots/clones)\n"
-" (du | disk-usage) [--image <name>] [pool-name]\n"
-" show pool image disk usage stats\n"
+" (du | disk-usage) [<image-spec> | <snap-spec>]\n"
+" show disk usage stats for pool,\n"
+" image or snapshot\n"
" info <image-spec> | <snap-spec> show information about image size,\n"
" striping, etc.\n"
" create [--order <bits>] [--image-features <features>] [--image-shared]\n"
const char *v = *i;
switch (opt_cmd) {
case OPT_LIST:
- case OPT_DISK_USAGE:
SET_CONF_PARAM(v, &poolname, NULL, NULL);
break;
case OPT_INFO:
case OPT_METADATA_LIST:
case OPT_DIFF:
case OPT_OBJECT_MAP_REBUILD:
+ case OPT_DISK_USAGE:
SET_CONF_PARAM(v, &imgname, NULL, NULL);
break;
case OPT_EXPORT:
where 'pool' is a rados pool name (default is 'rbd') and 'cmd' is one of:
(ls | list) [-l | --long ] [pool-name] list rbd images
(-l includes snapshots/clones)
- (du | disk-usage) [--image <name>] [pool-name]
- show pool image disk usage stats
+ (du | disk-usage) [<image-spec> | <snap-spec>]
+ show disk usage stats for pool,
+ image or snapshot
info <image-spec> | <snap-spec> show information about image size,
striping, etc.
create [--order <bits>] [--image-features <features>] [--image-shared]