From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1NFNRx-0006tW-TW for garchives@archives.gentoo.org; Tue, 01 Dec 2009 07:47:10 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 86801E0780; Tue, 1 Dec 2009 07:45:14 +0000 (UTC) Received: from persius.rz.uni-potsdam.de (persius.rz.uni-potsdam.de [141.89.68.1]) by pigeon.gentoo.org (Postfix) with ESMTP id 30C6BE0780 for ; Tue, 1 Dec 2009 07:45:13 +0000 (UTC) Received: from [141.89.194.22] ([141.89.194.22]) by persius.rz.uni-potsdam.de (8.12.11/8.12.11) with ESMTP id nB17jDSv002355 for ; Tue, 1 Dec 2009 08:45:13 +0100 (CET) Subject: [gentoo-user-de] Schreibt mdadm keinen Superblock mehr? From: Juergen Rose To: gentoo-user-de@lists.gentoo.org Content-Type: text/plain; charset="UTF-8" Organization: TFH-Wildau Date: Tue, 01 Dec 2009 08:45:08 +0100 Message-ID: <1259653508.10362.47.camel@tiger.bioinf.cs.uni-potsdam.de> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user-de@lists.gentoo.org Reply-to: gentoo-user-de@lists.gentoo.org Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 Content-Transfer-Encoding: 7bit X-Miltered: at persius with ID 4B14C989.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Archives-Salt: cd56fcfb-b2d3-4093-b571-d753527babb7 X-Archives-Hash: 69a64adcee91eed9eed326fa761e4271 Hallo, ich habe hier vier HDs (sda,sdb.sdc.sdd) in einem Rechner. Bisher hatte ich ein Raid1 md3 bestehend aus sdb2 und sdd2. Jetzt habe ich die Platten umpartitioniert und habe aus den Partitionen sda2, sdb2 und sdc2 ein Raid5 (md3) eingerichtet, darauf ein extt-FS angelegt und ca 100GB hinkopiert. Nach dem naechsten Booten hat linux das Raid nicht als Raid 5 erkannt: root@grizzly(1)# cat /proc/mdstat Personalities : [raid1] [raid6] [raid5] [raid4] ... md3 : active raid1 sdb2[0] 170176448 blocks [2/1] [U_] ... root@grizzly(2)# mdadm --detail /dev/md3 /dev/md3: Version : 0.90 Creation Time : Mon Apr 13 21:47:14 2009 Raid Level : raid1 Array Size : 170176448 (162.29 GiB 174.26 GB) Used Dev Size : 170176448 (162.29 GiB 174.26 GB) Raid Devices : 2 Total Devices : 1 Preferred Minor : 3 Persistence : Superblock is persistent Update Time : Mon Nov 30 10:21:00 2009 State : clean, degraded Active Devices : 1 Working Devices : 1 Failed Devices : 0 Spare Devices : 0 UUID : 2d6d3b21:c59f2908:9fde5714:8b80be8d Events : 0.270 Number Major Minor RaidDevice State 0 8 18 0 active sync /dev/sdb2 1 0 0 1 removed Es sieht so aus als ob er beim Booten wieder die alte Raid1-Konfiguration gefunden hat. Also habe ich versucht das Raid5 noch einmal neu zu bauen und mit der Option -U den Superblock neu zu schreiben: root@grizzly(3)# mdadm --stop /dev/md3 root@grizzly(4)# mdadm --assemble /dev/md3 -U name /dev/sda2 /dev/sdb2 /dev/sdc2 root@grizzly(5)# mdadm --detail /dev/md3 /dev/md3: Version : 1.01 Creation Time : Mon Nov 30 14:46:52 2009 Raid Level : raid5 Array Size : 340352000 (324.58 GiB 348.52 GB) Used Dev Size : 170176000 (162.29 GiB 174.26 GB) Raid Devices : 3 Total Devices : 3 Persistence : Superblock is persistent Update Time : Mon Nov 30 10:26:25 2009 State : clean Active Devices : 3 Working Devices : 3 Failed Devices : 0 Spare Devices : 0 Layout : left-symmetric Chunk Size : 512K Name : grizzly:3 (local to host grizzly) UUID : 6f7fc3bc:b4f08d24:7c007d1f:db2aec79 Events : 42 Number Major Minor RaidDevice State 0 8 2 0 active sync /dev/sda2 1 8 18 1 active sync /dev/sdb2 3 8 34 2 active sync /dev/sdc2 root@grizzly(6)# cat /proc/mdstat Personalities : [raid1] [raid6] [raid5] [raid4] md3 : active raid5 sda2[0] sdc2[3] sdb2[1] 340352000 blocks super 1.1 level 5, 512k chunk, algorithm 2 [3/3] [UUU] ... unused devices: Soweit, so gut. Nun will ich testen ob linux das Raid von alleine erkennt: root@grizzly(7)# mdadm --stop /dev/md3 root@grizzly(8)# mdadm --autodetect /dev/md3 root@grizzly(9)# cat /proc/mdstat Personalities : [raid1] [raid6] [raid5] [raid4] md3 : active raid1 sdb2[0] 170176448 blocks [2/1] [U_] ... unused devices: Wieder hat linux versucht das alte Raid1 zu bauen. Ich vermutete das noch die alten Raid1-Superbloecke existieren (vielleicht neben den Raid5-Superbloecken und vielleicht zuerst gelesen werden) Ich versuche die alten Superbloecke zu loeschen und das Raid5 noch einmal neu anzulegen: root@grizzly(12)# mdadm --misc --zero-superblock /dev/sdb2 root@grizzly(13)# mdadm --misc --zero-superblock /dev/sda2 root@grizzly(14)# mdadm --misc --zero-superblock /dev/sdc2 root@grizzly(15)# mdadm -v --create /dev/md3 --level=5 -n 3 -v /dev/sda2 /dev/sdb2 /dev/sdc2 root@grizzly(16)# cat /proc/mdstat Personalities : [raid1] [raid6] [raid5] [raid4] md3 : active raid5 sdc2[3] sdb2[1] sda2[0] 340352000 blocks super 1.1 level 5, 512k chunk, algorithm 2 [3/2] [UU_] [>....................] recovery = 1.5% (2692864/170176000) finish=50.5min speed=55208K/sec ... Eine Stunde warten bis das Raid fertig ist, dann testen: root@grizzly(22)# cat /proc/mdstat Personalities : [raid1] [raid6] [raid5] [raid4] md3 : active raid5 sdc2[3] sdb2[1] sda2[0] 340352000 blocks super 1.1 level 5, 512k chunk, algorithm 2 [3/3] [UUU] ... unused devices: root@grizzly(23)# mount /dev/md3 /mnt/test1; du -s /mnt/test1/* ... 77611992 /mnt/test1/rose ... Das sieht wieder gut aus, sogar meine alten Daten sind noch auf dem Raid. Aber nach dem Stoppen des Raids erkennt linux automatisch gar keine Raid md3. root@grizzly(24)# umount /dev/md3 ; mdadm --stop /dev/md3 root@grizzly(25)# mdadm --autodetect /dev/md3 root@grizzly(26)# mdadm --detail /dev/md3 root@grizzly(27)# cat /proc/mdstat Personalities : [raid1] [raid6] [raid5] [raid4] md1 : active raid1 hdc3[1] hda3[0] 1011968 blocks [2/2] [UU] md2 : active raid1 hdc6[1] hda6[0] 186233408 blocks [2/2] [UU] md0 : active raid1 hdc1[1] hda1[0] 72192 blocks [2/2] [UU] unused devices: root@grizzly(28)# mdadm -V mdadm - v3.1.1- 19th November 2009 Mach ich etwas falsch oder ist mdadm-3.1.1 schuld? Ich wuerde mich ueber fast jede Meinungsaeusserung freuen.