public class Rbd
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
void |
clone(java.lang.String parentImage,
java.lang.String parentSnap,
IoCTX childIo,
java.lang.String childName,
long features,
int order)
Clone a RBD image
|
void |
clone(java.lang.String parentImage,
java.lang.String parentSnap,
IoCTX childIo,
java.lang.String childName,
long features,
int order,
long stripe_unit,
long stripe_count)
Clone a RBD image
|
void |
close(RbdImage image)
Close a RBD image
|
void |
copy(RbdImage sourceImage,
RbdImage destImage)
Copy a RBD image
|
void |
create(java.lang.String name,
long size)
Create a new RBD image
|
void |
create(java.lang.String name,
long size,
int order)
Create a new RBD image
|
void |
create(java.lang.String name,
long size,
long features)
Create a new RBD v2 image
|
void |
create(java.lang.String name,
long size,
long features,
int order)
Create a new RBD v2 image
|
void |
create(java.lang.String name,
long size,
long features,
int order,
long stripe_unit,
long stripe_count)
Create a new RBD v2 image
|
static int[] |
getVersion()
Get the librbd version
|
java.lang.String[] |
list()
List all RBD images in this pool
|
RbdImage |
open(java.lang.String name)
Open a RBD image
|
RbdImage |
open(java.lang.String name,
java.lang.String snapName)
Open a RBD image with a specific snapshot
|
RbdImage |
openReadOnly(java.lang.String name)
Open a RBD image read only
|
RbdImage |
openReadOnly(java.lang.String name,
java.lang.String snapName)
Open a RBD image with a specific snapshot read only
|
void |
remove(java.lang.String name)
Remove a RBD image
|
void |
rename(java.lang.String srcName,
java.lang.String destName)
Rename a RBD image
|
public Rbd(IoCTX io)
public static int[] getVersion()
public void create(java.lang.String name,
long size,
int order)
throws RbdException
name - The name of the new imagesize - The size of the new image in bytesorder - Object/block size, as a power of two (object size == 1 << order)RbdExceptionpublic void create(java.lang.String name,
long size)
throws RbdException
name - The name of the new imagesize - The size of the new image in bytesRbdExceptionpublic void create(java.lang.String name,
long size,
long features,
int order)
throws RbdException
name - The name of the new imagesize - The size of the new image in bytesfeatures - Initial feature bitsorder - Object/block size, as a power of two (object size == 1 << order)RbdExceptionpublic void create(java.lang.String name,
long size,
long features)
throws RbdException
name - The name of the new imagesize - The size of the new image in bytesfeatures - Initial feature bitsRbdExceptionpublic void create(java.lang.String name,
long size,
long features,
int order,
long stripe_unit,
long stripe_count)
throws RbdException
name - The name of the new imagesize - The size of the new image in bytesfeatures - Initial feature bitsorder - Object/block size, as a power of two (object size == 1 << order)stripe_unit - Stripe unit size, in bytes.stripe_count - Number of objects to stripe over before loopingRbdExceptionpublic void remove(java.lang.String name)
throws RbdException
name - The name of the imageRbdExceptionpublic void rename(java.lang.String srcName,
java.lang.String destName)
throws RbdException
srcName - The source namedestName - The new name for the imageRbdExceptionpublic java.lang.String[] list()
throws RbdException
RbdExceptionpublic RbdImage open(java.lang.String name) throws RbdException
name - The name of the image you want to openRbdExceptionpublic RbdImage open(java.lang.String name, java.lang.String snapName) throws RbdException
name - The name of the image you want to opensnapshot - The name of the snapshot to openRbdExceptionpublic RbdImage openReadOnly(java.lang.String name) throws RbdException
name - The name of the image you want to openRbdExceptionpublic RbdImage openReadOnly(java.lang.String name, java.lang.String snapName) throws RbdException
name - The name of the image you want to opensnapshot - The name of the snapshot to openRbdExceptionpublic void close(RbdImage image) throws RbdException
image - The RbdImage objectRbdExceptionpublic void clone(java.lang.String parentImage,
java.lang.String parentSnap,
IoCTX childIo,
java.lang.String childName,
long features,
int order,
long stripe_unit,
long stripe_count)
throws RbdException
parentImage - The name of the parent imageparentSnap - The snapshot of the parent image (has to be protected)childIo - The IoCTX for the child imagechildName - The name for the child imagefeatures - The RBD featuresorder - Object/block size, as a power of two (object size == 1 << order)stripe_unit - Stripe unit size, in bytes.stripe_count - Number of objects to stripe over before loopingRbdExceptionpublic void clone(java.lang.String parentImage,
java.lang.String parentSnap,
IoCTX childIo,
java.lang.String childName,
long features,
int order)
throws RbdException
parentImage - The name of the parent imageparentSnap - The snapshot of the parent image (has to be protected)childIo - The IoCTX for the child imagechildName - The name for the child imagefeatures - The RBD featuresorder - Object/block size, as a power of two (object size == 1 << order)RbdExceptionpublic void copy(RbdImage sourceImage, RbdImage destImage) throws RbdException
sourceImage - The source RbdImagedestImage - The destination RbdImageRbdException