diff options
author | Song Liu <songliubraving@fb.com> | 2015-10-09 07:51:42 +0200 |
---|---|---|
committer | NeilBrown <neilb@suse.com> | 2015-10-19 04:06:07 +0200 |
commit | ed94976d84768b2ef648c3af1d81f1a36de9f9e2 (patch) | |
tree | 77b2c5f0d1b8161e2844c5e6e43536b9264c121e /Detail.c | |
parent | add macros for MD_DISK_ROLE_(SPARE/FAULTY) (diff) | |
download | mdadm-ed94976d84768b2ef648c3af1d81f1a36de9f9e2.tar.xz mdadm-ed94976d84768b2ef648c3af1d81f1a36de9f9e2.zip |
Show device as journal in --detail --examine
Example output:
./mdadm --detail /dev/md127
/dev/md127:
Version : 1.2
Creation Time : Wed May 13 17:01:12 2015
Raid Level : raid5
Array Size : 11720662464 (11177.69 GiB 12001.96 GB)
Used Dev Size : 3906887488 (3725.90 GiB 4000.65 GB)
Raid Devices : 4
Total Devices : 5
Persistence : Superblock is persistent
Intent Bitmap : Internal
Update Time : Wed May 13 17:01:12 2015
State : clean
Active Devices : 4
Working Devices : 5
Failed Devices : 0
Spare Devices : 1
Layout : left-symmetric
Chunk Size : 32K
Name : 0
UUID : 8fb9ee05:3831d52f:e5c23825:28cd6881
Events : 0
Number Major Minor RaidDevice State
0 8 32 0 active sync /dev/sdc
1 8 48 1 active sync /dev/sdd
2 8 64 2 active sync /dev/sde
3 8 80 3 active sync /dev/sdf
4 8 17 - journal /dev/sdb1
./mdadm -E /dev/sdb2
/dev/sdb2:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x201
Array UUID : 562b2334:35b9bcc1:add50892:1f30c4bd
Name : 0
Creation Time : Thu Aug 27 12:55:26 2015
Raid Level : raid5
Raid Devices : 15
Avail Dev Size : 249796608 (119.11 GiB 127.90 GB)
Array Size : 54696423936 (52162.57 GiB 56009.14 GB)
Used Dev Size : 7813774848 (3725.90 GiB 4000.65 GB)
Data Offset : 262144 sectors
Super Offset : 8 sectors
Unused Space : before=262056 sectors, after=0 sectors
State : active
Device UUID : 5015e522:d39ba566:5909cf3c:9c51f2ff
Internal Bitmap : 8 sectors from superblock
Update Time : Thu Aug 27 13:16:55 2015
Bad Block Log : 512 entries available at offset 72 sectors
Checksum : 4e6fd76d - correct
Events : 262
Layout : left-symmetric
Chunk Size : 256K
Device Role : Journal
Array State : AAAAAAAAAAAAAAA ('A' == active, '.' == missing, 'R' == replacing)
Signed-off-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Shaohua Li <shli@fb.com>
Signed-off-by: NeilBrown <neilb@suse.com>
Diffstat (limited to 'Detail.c')
-rw-r--r-- | Detail.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -650,9 +650,10 @@ This is pretty boring } if (disk.state & (1<<MD_DISK_REMOVED)) printf(" removed"); if (disk.state & (1<<MD_DISK_WRITEMOSTLY)) printf(" writemostly"); + if (disk.state & (1<<MD_DISK_JOURNAL)) printf(" journal"); if ((disk.state & ((1<<MD_DISK_ACTIVE)|(1<<MD_DISK_SYNC) - |(1<<MD_DISK_REMOVED)|(1<<MD_DISK_FAULTY))) + |(1<<MD_DISK_REMOVED)|(1<<MD_DISK_FAULTY)|(1<<MD_DISK_JOURNAL))) == 0) { printf(" spare"); if (is_26) { |