]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - Detail.c
--wait or -W will wait for resync activity to finish on the given devices.
[thirdparty/mdadm.git] / Detail.c
index 882ec07835a5bc0529f336e26c2e0a81c601c06c..42e990771a7d1f6ea1a0a1cedfa4714ad94b1545 100644 (file)
--- a/Detail.c
+++ b/Detail.c
@@ -1,7 +1,7 @@
 /*
  * mdadm - manage Linux "md" devices aka RAID arrays.
  *
- * Copyright (C) 2001-2002 Neil Brown <neilb@cse.unsw.edu.au>
+ * Copyright (C) 2001-2006 Neil Brown <neilb@suse.de>
  *
  *
  *    This program is free software; you can redistribute it and/or modify
@@ -31,7 +31,7 @@
 #include       "md_p.h"
 #include       "md_u.h"
 
-int Detail(char *dev, int brief, int test)
+int Detail(char *dev, int brief, int test, char *homehost)
 {
        /*
         * Print out details for an md array by using
@@ -168,11 +168,14 @@ int Detail(char *dev, int brief, int test)
                            (larray_size >= 0xFFFFFFFFULL|| array.size == 0)) {
                                unsigned long long dsize = get_component_size(fd);
                                if (dsize > 0)
-                                       printf("    Device Size : %llu%s\n", dsize, human_size((long long)array.size<<10));
+                                       printf("  Used Dev Size : %llu%s\n",
+                                              dsize,
+                                        human_size((long long)array.size<<10));
                                else
-                                       printf("    Device Size : unknown\n");
+                                       printf("  Used Dev Size : unknown\n");
                        } else
-                               printf("    Device Size : %d%s\n", array.size, human_size((long long)array.size<<10));
+                               printf("  Used Dev Size : %d%s\n", array.size,
+                                      human_size((long long)array.size<<10));
                }
                printf("   Raid Devices : %d\n", array.raid_disks);
                printf("  Total Devices : %d\n", array.nr_disks);
@@ -190,11 +193,12 @@ int Detail(char *dev, int brief, int test)
                        printf("  Intent Bitmap : Internal\n\n");
                atime = array.utime;
                printf("    Update Time : %.24s\n", ctime(&atime));
-               printf("          State : %s%s%s\n",
+               printf("          State : %s%s%s%s\n",
                       (array.state&(1<<MD_SB_CLEAN))?"clean":"active",
                       array.active_disks < array.raid_disks? ", degraded":"",
                       (!e || e->percent < 0) ? "" :
-                       (e->resync) ? ", resyncing": ", recovering");
+                       (e->resync) ? ", resyncing": ", recovering",
+                      larray_size ? "": ", Not Started");
                printf(" Active Devices : %d\n", array.active_disks);
                printf("Working Devices : %d\n", array.working_disks);
                printf(" Failed Devices : %d\n", array.failed_disks);
@@ -267,7 +271,7 @@ This is pretty boring
                } else if (e && e->percent >= 0)
                        printf("\n");
                if (super && st)
-                       st->ss->detail_super(super);
+                       st->ss->detail_super(super, homehost);
 
                printf("    Number   Major   Minor   RaidDevice State\n");
        }