1 |
Hallo, |
2 |
|
3 |
ich habe hier vier HDs (sda,sdb.sdc.sdd) in einem Rechner. Bisher hatte |
4 |
ich ein Raid1 md3 bestehend aus sdb2 und sdd2. Jetzt habe ich die |
5 |
Platten umpartitioniert und habe aus den Partitionen sda2, sdb2 und sdc2 |
6 |
ein Raid5 (md3) eingerichtet, darauf ein extt-FS angelegt und ca 100GB |
7 |
hinkopiert. |
8 |
|
9 |
Nach dem naechsten Booten hat linux das Raid nicht als Raid 5 erkannt: |
10 |
root@grizzly(1)# cat /proc/mdstat |
11 |
Personalities : [raid1] [raid6] [raid5] [raid4] |
12 |
... |
13 |
md3 : active raid1 sdb2[0] |
14 |
170176448 blocks [2/1] [U_] |
15 |
... |
16 |
root@grizzly(2)# mdadm --detail /dev/md3 |
17 |
|
18 |
/dev/md3: |
19 |
Version : 0.90 |
20 |
Creation Time : Mon Apr 13 21:47:14 2009 |
21 |
Raid Level : raid1 |
22 |
Array Size : 170176448 (162.29 GiB 174.26 GB) |
23 |
Used Dev Size : 170176448 (162.29 GiB 174.26 GB) |
24 |
Raid Devices : 2 |
25 |
Total Devices : 1 |
26 |
Preferred Minor : 3 |
27 |
Persistence : Superblock is persistent |
28 |
|
29 |
Update Time : Mon Nov 30 10:21:00 2009 |
30 |
State : clean, degraded |
31 |
Active Devices : 1 |
32 |
Working Devices : 1 |
33 |
Failed Devices : 0 |
34 |
Spare Devices : 0 |
35 |
|
36 |
UUID : 2d6d3b21:c59f2908:9fde5714:8b80be8d |
37 |
Events : 0.270 |
38 |
|
39 |
Number Major Minor RaidDevice State |
40 |
0 8 18 0 active sync /dev/sdb2 |
41 |
1 0 0 1 removed |
42 |
|
43 |
Es sieht so aus als ob er beim Booten wieder die alte |
44 |
Raid1-Konfiguration gefunden hat. Also habe ich versucht das Raid5 noch |
45 |
einmal neu zu bauen und mit der Option -U den Superblock neu zu |
46 |
schreiben: |
47 |
|
48 |
root@grizzly(3)# mdadm --stop /dev/md3 |
49 |
root@grizzly(4)# mdadm --assemble /dev/md3 -U |
50 |
name /dev/sda2 /dev/sdb2 /dev/sdc2 |
51 |
root@grizzly(5)# mdadm --detail /dev/md3 |
52 |
/dev/md3: |
53 |
Version : 1.01 |
54 |
Creation Time : Mon Nov 30 14:46:52 2009 |
55 |
Raid Level : raid5 |
56 |
Array Size : 340352000 (324.58 GiB 348.52 GB) |
57 |
Used Dev Size : 170176000 (162.29 GiB 174.26 GB) |
58 |
Raid Devices : 3 |
59 |
Total Devices : 3 |
60 |
Persistence : Superblock is persistent |
61 |
|
62 |
Update Time : Mon Nov 30 10:26:25 2009 |
63 |
State : clean |
64 |
Active Devices : 3 |
65 |
Working Devices : 3 |
66 |
Failed Devices : 0 |
67 |
Spare Devices : 0 |
68 |
|
69 |
Layout : left-symmetric |
70 |
Chunk Size : 512K |
71 |
|
72 |
Name : grizzly:3 (local to host grizzly) |
73 |
UUID : 6f7fc3bc:b4f08d24:7c007d1f:db2aec79 |
74 |
Events : 42 |
75 |
|
76 |
Number Major Minor RaidDevice State |
77 |
0 8 2 0 active sync /dev/sda2 |
78 |
1 8 18 1 active sync /dev/sdb2 |
79 |
3 8 34 2 active sync /dev/sdc2 |
80 |
|
81 |
root@grizzly(6)# cat /proc/mdstat |
82 |
|
83 |
Personalities : [raid1] [raid6] [raid5] [raid4] |
84 |
md3 : active raid5 sda2[0] sdc2[3] sdb2[1] |
85 |
340352000 blocks super 1.1 level 5, 512k chunk, algorithm 2 [3/3] |
86 |
[UUU] |
87 |
... |
88 |
unused devices: <none> |
89 |
|
90 |
Soweit, so gut. Nun will ich testen ob linux das Raid von alleine |
91 |
erkennt: |
92 |
|
93 |
root@grizzly(7)# mdadm --stop /dev/md3 |
94 |
root@grizzly(8)# mdadm --autodetect /dev/md3 |
95 |
root@grizzly(9)# cat /proc/mdstat |
96 |
|
97 |
Personalities : [raid1] [raid6] [raid5] [raid4] |
98 |
md3 : active raid1 sdb2[0] |
99 |
170176448 blocks [2/1] [U_] |
100 |
... |
101 |
unused devices: <none> |
102 |
|
103 |
Wieder hat linux versucht das alte Raid1 zu bauen. Ich vermutete das |
104 |
noch die alten Raid1-Superbloecke existieren (vielleicht neben den |
105 |
Raid5-Superbloecken und vielleicht zuerst gelesen werden) |
106 |
Ich versuche die alten Superbloecke zu loeschen und das Raid5 noch |
107 |
einmal neu anzulegen: |
108 |
|
109 |
root@grizzly(12)# mdadm --misc --zero-superblock /dev/sdb2 |
110 |
root@grizzly(13)# mdadm --misc --zero-superblock /dev/sda2 |
111 |
root@grizzly(14)# mdadm --misc --zero-superblock /dev/sdc2 |
112 |
root@grizzly(15)# mdadm -v --create /dev/md3 --level=5 -n 3 |
113 |
-v /dev/sda2 /dev/sdb2 /dev/sdc2 |
114 |
root@grizzly(16)# cat /proc/mdstat |
115 |
|
116 |
Personalities : [raid1] [raid6] [raid5] [raid4] |
117 |
md3 : active raid5 sdc2[3] sdb2[1] sda2[0] |
118 |
340352000 blocks super 1.1 level 5, 512k chunk, algorithm 2 [3/2] |
119 |
[UU_] |
120 |
[>....................] recovery = 1.5% (2692864/170176000) |
121 |
finish=50.5min speed=55208K/sec |
122 |
... |
123 |
|
124 |
Eine Stunde warten bis das Raid fertig ist, dann testen: |
125 |
root@grizzly(22)# cat /proc/mdstat |
126 |
Personalities : [raid1] [raid6] [raid5] [raid4] |
127 |
md3 : active raid5 sdc2[3] sdb2[1] sda2[0] |
128 |
340352000 blocks super 1.1 level 5, 512k chunk, algorithm 2 [3/3] |
129 |
[UUU] |
130 |
... |
131 |
unused devices: <none> |
132 |
|
133 |
root@grizzly(23)# mount /dev/md3 /mnt/test1; du -s /mnt/test1/* |
134 |
... |
135 |
77611992 /mnt/test1/rose |
136 |
... |
137 |
Das sieht wieder gut aus, sogar meine alten Daten sind noch auf dem |
138 |
Raid. Aber nach dem Stoppen des Raids erkennt linux automatisch gar |
139 |
keine Raid md3. |
140 |
|
141 |
|
142 |
root@grizzly(24)# umount /dev/md3 ; mdadm --stop /dev/md3 |
143 |
root@grizzly(25)# mdadm --autodetect /dev/md3 |
144 |
root@grizzly(26)# mdadm --detail /dev/md3 |
145 |
root@grizzly(27)# cat /proc/mdstat |
146 |
|
147 |
Personalities : [raid1] [raid6] [raid5] [raid4] |
148 |
md1 : active raid1 hdc3[1] hda3[0] |
149 |
1011968 blocks [2/2] [UU] |
150 |
|
151 |
md2 : active raid1 hdc6[1] hda6[0] |
152 |
186233408 blocks [2/2] [UU] |
153 |
|
154 |
md0 : active raid1 hdc1[1] hda1[0] |
155 |
72192 blocks [2/2] [UU] |
156 |
|
157 |
unused devices: <none> |
158 |
|
159 |
root@grizzly(28)# mdadm -V |
160 |
|
161 |
mdadm - v3.1.1- 19th November 2009 |
162 |
|
163 |
Mach ich etwas falsch oder ist mdadm-3.1.1 schuld? Ich wuerde mich ueber |
164 |
fast jede Meinungsaeusserung freuen. |