Mpath

Mpath — plugin for basic operations with multipath devices

Functions

Types and Values

Includes

#include <mpath.h>

Description

A plugin for basic operations with multipath devices.

Functions

bd_mpath_check_deps ()

gboolean
bd_mpath_check_deps ();

Returns

whether the plugin's runtime dependencies are satisfied or not

Function checking plugin's runtime dependencies.


bd_mpath_init ()

gboolean
bd_mpath_init ();

Initializes the plugin. **This function is called automatically by the library's initialization functions.**


bd_mpath_close ()

void
bd_mpath_close ();

Cleans up after the plugin. **This function is called automatically by the library's functions that unload it.**


bd_mpath_error_quark ()

GQuark
bd_mpath_error_quark (void);

[skip]


bd_mpath_flush_mpaths ()

gboolean
bd_mpath_flush_mpaths (GError **error);

Parameters

error

place to store error (if any).

[out]

Returns

whether multipath device maps were successfully flushed or not

Flushes all unused multipath device maps.


bd_mpath_is_mpath_member ()

gboolean
bd_mpath_is_mpath_member (const gchar *device,
                          GError **error);

Parameters

device

device to test

 

error

place to store error (if any).

[out]

Returns

TRUE if the device is a multipath member, FALSE if not or an error appeared when queried (error is set in those cases)


bd_mpath_get_mpath_members ()

gchar **
bd_mpath_get_mpath_members (GError **error);

Parameters

error

place to store error (if any).

[out]

Returns

list of names of all devices that are members of the mpath mappings (or NULL in case of error).

[transfer full][array zero-terminated=1]


bd_mpath_set_friendly_names ()

gboolean
bd_mpath_set_friendly_names (gboolean enabled,
                             GError **error);

Parameters

enabled

whether friendly names should be enabled or not

 

error

place to store error (if any).

[out]

Returns

if successfully set or not

Types and Values

BD_MPATH_ERROR

#define             BD_MPATH_ERROR

enum BDMpathError

Members

BD_MPATH_ERROR_FLUSH

   

BD_MPATH_ERROR_NOT_ROOT

   

BD_MPATH_ERROR_DM_ERROR

   

BD_MPATH_ERROR_INVAL