Commit 02ee9e9f authored by jan.koester's avatar jan.koester
Browse files

test

parent 711de7c6
Loading
Loading
Loading
Loading
+40 −8
Changes for include/storaged/api.h: 40 added lines, 8 removed lines.
Original line number Diff line number Diff line
@@ -42,22 +42,52 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 * itself with the md ioctls:
 *   ListArrays -> per array: array (mdN), level, state, metadata,
 *       raid_disks, degraded, size, component_size, chunk, bitmap,
 *       sync_action, sync_percent?, sync_speed? (KiB/s), in_use, uuid?,
 *       label?; then per member: member (device), state, slot (-1: none)
 *       sync_action, sync_percent?, sync_speed? (KiB/s), mismatches? (of
 *       the last check or repair), in_use, uuid?, label?; then per member:
 *       member (device), state, slot (-1: none), errors (read errors md
 *       corrected on it)
 *     per set of members found on free devices: found (uuid), label,
 *       level, raid_disks, present, active_array? (it runs already as),
 *       dev (repeated)
 *       level, raid_disks, present, current (members that are up to
 *       date), startable (yes|force|no: only with AssembleArray's force,
 *       or not at all), active_array? (it runs already as: these are
 *       members it left behind, for ReAddMember), dev (repeated)
 *     the devices nothing uses, defects and the RAID jobs (see below)
 *   CreateArray {level (0 1 5 6 10), dev..., spare...?, chunk? (KiB),
 *       confirm} -> array
 *   AddSpare {array, dev, confirm}      md rebuilds onto it when a member
 *                                       is missing
 *   AddSpare {array, dev, confirm} -> re_added
 *                                       md rebuilds onto it when a member
 *                                       is missing. A former member goes
 *                                       back into its slot instead if md
 *                                       takes it (as ReAddMember; then
 *                                       re_added = yes, confirm isn't
 *                                       needed and nothing is wiped)
 *   RemoveMember {array, dev}           fails an active member first; its
 *                                       superblock is wiped
 *   CheckArray {array, stop?}           scrub (sync_action check/idle)
 *   ReAddMember {array, dev}            mdadm --re-add: a member that
 *                                       failed (taken out first) or was
 *                                       left behind back into its slot;
 *                                       with the write-intent bitmap only
 *                                       what changed since is resynced.
 *                                       Too far behind: Busy, AddSpare
 *                                       then rebuilds it in full
 *   ReplaceMember {array, dev, with?, confirm?}
 *                                       mdadm --replace: dev is copied
 *                                       onto a spare (with: this free
 *                                       device, added first, confirm) while
 *                                       it keeps working; then md fails it
 *                                       and RemoveMember takes it out
 *   CheckArray {array, repair?, stop?}  scrub (sync_action check, repair
 *                                       rewrites mismatches, stop: idle)
 *   StopArray {array}                   members keep their superblocks
 *   DeleteArray {array, confirm}        stop + wipe all superblocks
 *   AssembleArray {uuid} -> array       a set found on free devices
 *   AssembleArray {uuid, force?} -> array
 *                                       a set found on free devices;
 *                                       force (mdadm --assemble --force):
 *                                       out-of-date members are taken as
 *                                       current until it can run, a
 *                                       degraded RAID 4/5/6 that wasn't
 *                                       shut down cleanly is marked clean
 *                                       -- a repair afterwards is advised
 *
 * LVM2 (on-disk format and device-mapper, without the lvm2 tools; only
 * linear/striped LVs in VGs without locking, system ID or missing PVs
@@ -133,6 +163,8 @@ constexpr const char *ListArrays = "ListArrays";
constexpr const char *CreateArray = "CreateArray";
constexpr const char *AddSpare = "AddSpare";
constexpr const char *RemoveMember = "RemoveMember";
constexpr const char *ReAddMember = "ReAddMember";
constexpr const char *ReplaceMember = "ReplaceMember";
constexpr const char *CheckArray = "CheckArray";
constexpr const char *StopArray = "StopArray";
constexpr const char *DeleteArray = "DeleteArray";
+340 −25

File changed.

Preview size limit exceeded, changes collapsed.

+8 −1
Changes for src/raid.h: 8 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -37,7 +37,14 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 * of its partitions is in use either. Whatever is on a device that goes
 * into an array is lost; CreateArray and AddSpare want confirm. Resync,
 * rebuild and check are the kernel's own threads: the methods only start
 * them. */
 * them.
 *
 * Repair follows mdadm: a member that dropped out is re-added into its
 * slot (--re-add, a partial resync with the bitmap), a member is replaced
 * onto a spare while it keeps working (--replace, want_replacement), a
 * set with out-of-date members is assembled forced (--assemble --force:
 * events raised, dirty degraded marked clean), and a scrub may repair
 * (sync_action repair). */

#pragma once