Debian Codegraph @

tests/fake_utils/mdadm_fw_RAID_examine_migrate/mdadm

raw
1 #!/bin/bash
2
3 echo "$@"|grep -- "--brief" &>/dev/null
4 is_brief=$?
5
6 echo "$@"|grep -- "--export" &>/dev/null
7 is_export=$?
8
9 if [ $is_brief -eq 0 ]; then
10 cat <<EOF
11 ARRAY metadata=imsm UUID=83c77249:90fb26a2:882bfb52:87f71b59
12 ARRAY /dev/md/Volume0 container=83c77249:90fb26a2:882bfb52:87f71b59 member=0 UUID=76508998:aea211a0:b4fa4eda:78e41fbb
13 EOF
14 elif [ $is_export -eq 0 ]; then
15 cat <<EOF
16 MD_METADATA=imsm
17 MD_LEVEL=container
18 MD_UUID=83c77249:90fb26a2:882bfb52:87f71b59
19 MD_DEVICES=3
20 EOF
21 else
22 cat <<EOF
23 /dev/sda:
24 Magic : Intel Raid ISM Cfg Sig.
25 Version : 1.2.02
26 Orig Family : 56330de5
27 Family : 56330de5
28 Generation : 00000005
29 Attributes : All supported
30 UUID : 83c77249:90fb26a2:882bfb52:87f71b59
31 Checksum : 359f2642 correct
32 MPB Sectors : 2
33 Disks : 3
34 RAID Devices : 1
35
36 Disk00 Serial : 50026B723702E422
37 State : active
38 Id : 00000000
39 Usable Size : 234436872 (111.79 GiB 120.03 GB)
40
41 [Volume0]:
42 UUID : 76508998:aea211a0:b4fa4eda:78e41fbb
43 RAID Level : 5 <-- 5
44 Members : 3 <-- 3
45 Slots : [UUU] <-- [UUU]
46 Failed disk : none
47 This Slot : 0
48 Array Size : 468873216 (223.58 GiB 240.06 GB)
49 Per Dev Size : 234436872 (111.79 GiB 120.03 GB)
50 Sector Offset : 0
51 Num Stripes : 915768
52 Chunk Size : 128 KiB <-- 128 KiB
53 Reserved : 0
54 Migrate State : initialize
55 Map State : normal <-- uninitialized
56 Checkpoint : 0 (768)
57 Dirty State : clean
58
59 Disk01 Serial : 2327B37FS
60 State : active
61 Id : 00000002
62 Usable Size : 976768392 (465.76 GiB 500.11 GB)
63
64 Disk02 Serial : 232K7DDFS
65 State : active
66 Id : 00000003
67 Usable Size : 976768392 (465.76 GiB 500.11 GB)
68 EOF
69 fi