diff options
author | Lidong Zhong <lidong.zhong@suse.com> | 2020-04-14 10:19:41 +0200 |
---|---|---|
committer | Jes Sorensen <jsorensen@fb.com> | 2020-04-27 16:33:46 +0200 |
commit | 1c294b5d960abeeb9e0f188af294d019bc82b20e (patch) | |
tree | a8fe1b3be381d173d5eecef13cac5ea8ec7f6ed1 /Detail.c | |
parent | Monitor: improve check_one_sharer() for checking duplicated process (diff) | |
download | mdadm-1c294b5d960abeeb9e0f188af294d019bc82b20e.tar.xz mdadm-1c294b5d960abeeb9e0f188af294d019bc82b20e.zip |
Detail: adding sync status for cluster device
On the node with /proc/mdstat is
Personalities : [raid1]
md0 : active raid1 sdb[4] sdc[3] sdd[2]
1046528 blocks super 1.2 [3/2] [UU_]
recover=REMOTE
bitmap: 1/1 pages [4KB], 65536KB chunk
Let's change the 'State' of 'mdadm -Q -D' accordingly
State : clean, degraded
With this patch, it will be
State : clean, degraded, recovering (REMOTE)
Signed-off-by: Lidong Zhong <lidong.zhong@suse.com>
Acked-by: Guoqing Jiang <guoqing.jiang@cloud.ionos.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Diffstat (limited to 'Detail.c')
-rw-r--r-- | Detail.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -498,17 +498,20 @@ int Detail(char *dev, struct context *c) } else arrayst = "active"; - printf(" State : %s%s%s%s%s%s \n", + printf(" State : %s%s%s%s%s%s%s \n", arrayst, st, (!e || (e->percent < 0 && e->percent != RESYNC_PENDING && - e->percent != RESYNC_DELAYED)) ? + e->percent != RESYNC_DELAYED && + e->percent != RESYNC_REMOTE)) ? "" : sync_action[e->resync], larray_size ? "": ", Not Started", (e && e->percent == RESYNC_DELAYED) ? " (DELAYED)": "", (e && e->percent == RESYNC_PENDING) ? - " (PENDING)": ""); + " (PENDING)": "", + (e && e->percent == RESYNC_REMOTE) ? + " (REMOTE)": ""); } else if (inactive && !is_container) { printf(" State : inactive\n"); } |