| Disk Utility Library Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Implemented Interfaces | ||||
GduLinuxMdDrivePrivate; GduLinuxMdDrive; enum GduLinuxMdDriveSlaveFlags; constgchar * gdu_linux_md_drive_get_uuid (GduLinuxMdDrive *drive);gboolean gdu_linux_md_drive_has_slave (GduLinuxMdDrive *drive, GduDevice *device);GList * gdu_linux_md_drive_get_slaves (GduLinuxMdDrive *drive); GduLinuxMdDriveSlaveFlags gdu_linux_md_drive_get_slave_flags (GduLinuxMdDrive *drive, GduDevice *slave);gchar * gdu_linux_md_drive_get_slave_state_markup (GduLinuxMdDrive *drive, GduDevice *slave);
The GduLinuxMdDrive class represents drives Linux Software RAID arrays.
An GduLinuxMdDrive drive is added to GduPool as soon as a
component device that is part of the abstraction is available. The
drive can be started (gdu_drive_start()gdu_drive_stop()gdu_linux_md_drive_get_slave_flags()).
See the documentation for GduPresentable for the big picture.
typedef enum {
GDU_LINUX_MD_DRIVE_SLAVE_FLAGS_NONE = 0,
GDU_LINUX_MD_DRIVE_SLAVE_FLAGS_NOT_ATTACHED = (1<<0),
GDU_LINUX_MD_DRIVE_SLAVE_FLAGS_FAULTY = (1<<1),
GDU_LINUX_MD_DRIVE_SLAVE_FLAGS_IN_SYNC = (1<<2),
GDU_LINUX_MD_DRIVE_SLAVE_FLAGS_WRITEMOSTLY = (1<<3),
GDU_LINUX_MD_DRIVE_SLAVE_FLAGS_BLOCKED = (1<<4),
GDU_LINUX_MD_DRIVE_SLAVE_FLAGS_SPARE = (1<<5),
} GduLinuxMdDriveSlaveFlags;
State for slaves of an Linux MD software raid drive. Everything but GDU_LINUX_MD_DRIVE_SLAVE_FLAGS_NONE
and GDU_LINUX_MD_DRIVE_SLAVE_FLAGS_NOT_ATTACHED corresponds to the comma-separated strings in
/sys/block/mdXXX/md/dev-YYY/state in sysfs. See Documentation/md.txt in the Linux
kernel for more information.
| No flags are set. | |
| If set, the slave is not part of the array but appears as a child only because the UUID on the device matches that of the array. Is also set if the array does not exist. | |
| Device has been kick from active use due to a detected fault. | |
| Device is a fully in-sync member of the array. | |
| Device will only be subject to read requests if there are no other options. This applies only to RAID1 arrays. | |
| Device has failed, metadata is "external", and the failure hasn't been acknowledged yet. Writes that would write to this device if it were not faulty are blocked. | |
| Device is working, but not a full member. This includes spares that in the process of being recovered to. |
constgchar * gdu_linux_md_drive_get_uuid (GduLinuxMdDrive *drive);
|
|
Returns : |
gboolean gdu_linux_md_drive_has_slave (GduLinuxMdDrive *drive, GduDevice *device);
Checks if device is a component of drive.
|
A GduLinuxMdDrive. |
|
A GduDevice. |
Returns : |
slave is a component of drive.
|
GList * gdu_linux_md_drive_get_slaves (GduLinuxMdDrive *drive);
Gets all slaves of drive.
|
A GduLinuxMdDrive. |
Returns : |
A g_object_unref() |
GduLinuxMdDriveSlaveFlags gdu_linux_md_drive_get_slave_flags (GduLinuxMdDrive *drive, GduDevice *slave);
Gets the state of slave of drive.
|
A GduLinuxMdDrive. |
|
A GduDevice. |
Returns : |
A value from slave.
|
gchar * gdu_linux_md_drive_get_slave_state_markup (GduLinuxMdDrive *drive, GduDevice *slave);
|
|
|
|
Returns : |