![]() |
![]() |
![]() |
libblockdev Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#include <dm.h> GQuark bd_dm_error_quark (void
); #define BD_DM_ERROR enum BDDMError; gboolean bd_dm_create_linear (gchar *map_name
,gchar *device
,guint64 length
,gchar *uuid
,GError **error
); gboolean bd_dm_remove (gchar *map_name
,GError **error
); gchar * bd_dm_name_from_node (gchar *dm_node
,GError **error
); gchar * bd_dm_node_from_name (gchar *map_name
,GError **error
); gboolean bd_dm_map_exists (gchar *map_name
,gboolean live_only
,gboolean active_only
,GError **error
); gchar ** bd_dm_get_member_raid_sets (gchar *name
,gchar *uuid
,gint major
,gint minor
,GError **error
); gboolean bd_dm_activate_raid_set (gchar *name
,GError **error
); gboolean bd_dm_deactivate_raid_set (gchar *name
,GError **error
); gchar * bd_dm_get_raid_set_type (gchar *name
,GError **error
);
typedef enum { BD_DM_ERROR_SYS, BD_DM_ERROR_NOT_ROOT, BD_DM_ERROR_TASK, BD_DM_ERROR_RAID_FAIL, BD_DM_ERROR_RAID_NO_DEVS, BD_DM_ERROR_RAID_NO_EXIST, } BDDMError;
gboolean bd_dm_create_linear (gchar *map_name
,gchar *device
,guint64 length
,gchar *uuid
,GError **error
);
|
name of the map |
|
device to create map for |
|
length of the mapping in sectors |
|
UUID for the new dev mapper device or NULL if not specified. [allow-none]
|
|
place to store error (if any). [out] |
Returns : |
whether the new linear mapping map_name was successfully created
for the device or not |
gboolean bd_dm_remove (gchar *map_name
,GError **error
);
|
name of the map to remove |
|
place to store error (if any). [out] |
Returns : |
whether the map_name map was successfully removed or not |
gchar * bd_dm_name_from_node (gchar *dm_node
,GError **error
);
|
name of the DM node (e.g. "dm-0") |
|
place to store error (if any). [out] |
Returns : |
map name of the map providing the dm_node device or NULL
(error ) contains the error in such cases) |
gchar * bd_dm_node_from_name (gchar *map_name
,GError **error
);
|
name of the queried DM map |
|
place to store error (if any). [out] |
Returns : |
DM node name for the map_name map or NULL (error ) contains
the error in such cases) |
gboolean bd_dm_map_exists (gchar *map_name
,gboolean live_only
,gboolean active_only
,GError **error
);
|
name of the queried map |
|
whether to go through the live maps only or not |
|
whether to ignore suspended maps or not |
|
place to store error (if any). [out] |
Returns : |
whether the given map_name exists (and is live if live_only is
TRUE (and is active if active_only is TRUE )). |
gchar ** bd_dm_get_member_raid_sets (gchar *name
,gchar *uuid
,gint major
,gint minor
,GError **error
);
|
name of the member. [allow-none] |
|
uuid of the member. [allow-none] |
|
major number of the device or -1 if not specified |
|
minor number of the device or -1 if not specified |
|
variable to store error (if any). [out] |
Returns : |
list of names of the RAID sets related to
the member or NULL in case of error
One of name , uuid or major :minor has to be given. [transfer full][array zero-terminated=1]
|
gboolean bd_dm_activate_raid_set (gchar *name
,GError **error
);
|
name of the DM RAID set to activate |
|
variable to store error (if any). [out] |
Returns : |
whether the RAID set name was successfully activate or not |
gboolean bd_dm_deactivate_raid_set (gchar *name
,GError **error
);
|
name of the DM RAID set to deactivate |
|
variable to store error (if any). [out] |
Returns : |
whether the RAID set name was successfully deactivate or not |