Module ceph_rust::ceph [] [src]

Structs

CephObject
Pool

Helper to iterate over pool objects

RadosVersion

The version of the librados library.

ReadOperation

A helper to create rados read operation An object read operation stores a number of operations which can be executed atomically.

WriteOperation

A helper to create rados write operation An object write operation stores a number of operations which can be executed atomically.

XAttr

A rados object extended attribute with name and value. Can be iterated over

Enums

CephCommandTypes
CephHealth
TmapOperation

Functions

ceph_command

Higher level ceph_command

ceph_commands

Returns the list of available commands

ceph_health

Returns an enum value of: CephHealth::Ok CephHealth::Warning CephHealth::Error

ceph_health_string

string with the health HEALTH_OK or HEALTH_WARN or HEALTH_ERR which is also not efficient.

ceph_mon_command

Mon command that does not pass in a data payload.

ceph_mon_command_with_data

Mon command that does pass in a data payload. Most all of the commands pass through this function.

ceph_osd_command

OSD command that does not pass in a data payload.

ceph_osd_command_with_data

OSD command that does pass in a data payload.

ceph_pgs_command

PG command that does not pass in a data payload.

ceph_pgs_command_with_data

PG command that does pass in a data payload.

ceph_status

Only single String value

ceph_version

Ceph version - Ceph during the make release process generates the version number along with the github hash of the release and embeds the hard coded value into ceph.py which is the the default ceph utility.

ceph_version_parse

This version call parses the ceph -s output. It does not need sudo rights like ceph_version does since it pulls from the admin socket.

connect_to_ceph

Connect to a Ceph cluster and return a connection handle rados_t

destroy_rados_ioctx

This just tells librados that you no longer need to use the io context. It may not be freed immediately if there are pending asynchronous requests on it, but you should not use an io context again after calling this function on it. This does not guarantee any asynchronous writes have completed. You must call rados_aio_flush() on the io context before destroying it to do that.

disconnect_from_ceph

Disconnect from a Ceph cluster and destroy the connection handle rados_t For clean up, this is only necessary after connect_to_ceph() has succeeded.

get_rados_ioctx

Create an io context. The io context allows you to perform operations within a particular pool. For more details see rados_ioctx_t.

get_rados_ioctx2

Create an io context. The io context allows you to perform operations within a particular pool. For more details see rados_ioctx_t.

ping_monitor

Ping a monitor to assess liveness May be used as a simply way to assess liveness, or to obtain information about the monitor in a simple way even in the absence of quorum.

rados_blacklist_client
rados_commit_write_operations
rados_create_pool

Create a pool with default settings The default owner is the admin user (auid 0). The default crush rule is rule 0.

rados_delete_pool

Delete a pool and all data inside it The pool is removed from the cluster immediately, but the actual data is deleted in the background.

rados_fsid
rados_get_object_last_version

Return the version of the last object read or written to. This exposes the internal version number of the last object read or written via this io context

rados_get_pool_name

Get the pool name of the io context

rados_get_xattr_iterator

Get the rados_xattrs_iter_t reference to iterate over xattrs on an object Used in conjuction with XAttr::new() to iterate.

rados_libversion

Get the version of librados.

rados_list_pool_objects

Start listing objects in a pool

rados_locator_set_key

Set the key for mapping objects to pgs within an io context.

rados_lookup_pool

Lookup a Ceph pool id. If the pool doesn't exist it will return Ok(None).

rados_object_append

Append len bytes from buf into the oid object.

rados_object_break_lock

List clients that have locked the named object lock and information about the lock. The number of bytes required in each buffer is put in the corresponding size out parameter. If any of the provided buffers are too short, -ERANGE is returned after these sizes are filled in. Releases a shared or exclusive lock on an object, which was taken by the specified client.

rados_object_clone_range

Efficiently copy a portion of one object to another If the underlying filesystem on the OSD supports it, this will be a copy-on-write clone. The src and dest objects must be in the same pg. To ensure this, the io context should have a locator key set (see rados_ioctx_locator_set_key()).

rados_object_exec

Execute an OSD class method on an object The OSD has a plugin mechanism for performing complicated operations on an object atomically. These plugins are called classes. This function allows librados users to call the custom methods. The input and output formats are defined by the class. Classes in ceph.git can be found in src/cls subdirectories

rados_object_get_id

Get the pool id of the io context

rados_object_getxattr

Get the value of an extended attribute on an object.

rados_object_lock_exclusive

Take an exclusive lock on an object.

rados_object_lock_shared

Take a shared lock on an object.

rados_object_notify

Sychronously notify watchers of an object This blocks until all watchers of the object have received and reacted to the notify, or a timeout is reached.

rados_object_notify_ack

Acknolwedge receipt of a notify

rados_object_read

Read data from an object. This fills the slice given and returns the amount of bytes read The io context determines the snapshot to read from, if any was set by rados_ioctx_snap_set_read(). Default read size is 64K unless you call Vec::with_capacity(1024*128) with a larger size.

rados_object_remove

Delete an object Note: This does not delete any snapshots of the object.

rados_object_rmxattr

Delete an extended attribute from an object.

rados_object_set_alloc_hint

Set allocation hint for an object This is an advisory operation, it will always succeed (as if it was submitted with a LIBRADOS_OP_FLAG_FAILOK flag set) and is not guaranteed to do anything on the backend.

rados_object_setxattr

Set an extended attribute on an object.

rados_object_stat

Get object stats (size,SystemTime)

rados_object_tmap_get

Fetch complete tmap (trivial map) object

rados_object_tmap_update

Update tmap (trivial map)

rados_object_trunc

Resize an object If this enlarges the object, the new area is logically filled with zeroes. If this shrinks the object, the excess data is removed.

rados_object_unlock

Release a shared or exclusive lock on an object.

rados_object_write

Write len bytes from buf into the oid object, starting at offset off. The value of len must be <= UINT_MAX/2.

rados_object_write_full

The object is filled with the provided data. If the object exists, it is atomically truncated and then written.

rados_perform_read_operations
rados_pool_get_auid
rados_pool_required_alignment

Get the alignment flavor of a pool

rados_pool_requires_alignment

Test whether the specified pool requires alignment or not.

rados_pool_set_auid
rados_pools

Returns back a collection of Rados Pools

rados_reverse_lookup_pool
rados_selfmanaged_snap_create

Allocate an ID for a self-managed snapshot Get a unique ID to put in the snaphot context to create a snapshot. A clone of an object is not created until a write with the new snapshot context is completed.

rados_selfmanaged_snap_remove

Remove a self-managed snapshot This increases the snapshot sequence number, which will cause snapshots to be removed lazily.

rados_selfmanaged_snap_rollback

Rollback an object to a self-managed snapshot The contents of the object will be the same as when the snapshot was taken.

rados_set_namespace

Set the namespace for objects within an io context The namespace specification further refines a pool into different domains. The mapping of objects to pgs is also based on this value.

rados_snap_create

Create a pool-wide snapshot

rados_snap_get_name

Get the name of a pool snapshot

rados_snap_get_stamp

Find when a pool snapshot occurred

rados_snap_lookup

Set the snapshot context for use when writing to objects This is stored in the io context, and applies to all future writes. List all the ids of pool snapshots Get the id of a pool snapshot

rados_snap_remove

Delete a pool snapshot

rados_snap_rollback

Rollback an object to a pool snapshot The contents of the object will be the same as when the snapshot was taken.

rados_snap_set_read

Set the snapshot from which reads are performed. Subsequent reads will return data as it was at the time of that snapshot.

rados_stat_cluster

Read usage info about the cluster This tells you total space, space used, space available, and number of objects. These are not updated immediately when data is written, they are eventually consistent.

rados_stat_pool