• Willkommen im Linux Club - dem deutschsprachigen Supportforum für GNU/Linux. Registriere dich kostenlos, um alle Inhalte zu sehen und Fragen zu stellen.

keine Partition nach mdadm -a, [__] , bei --detail da

dma67

Hacker
Hallo zusammen,

folgendes Problem: eine Platte war aus dem RAID ausgefallen. Meine Lösung ist/war etwas schlecht, da auf einer Platte sind 2 Partitionen, die jeweils zum anderen Array gehören. Nicht desto trotz versuche ich es gerade zu biegen.

Auf der Platte sdc war eine Partition (sdc4) aus md6 ausgefallen. Dann habe ich die andere (sdc3) aus md5 mit
Code:
mdadm /dev/md5 --fail /dev/sdc3
und anschliessend
Code:
mdadm /dev/md5 -r /dev/sdc3
rausgenommen.

anschliessend hab ich veranlasst, dass die Partition vergisst, im RAID gewesen zu sein, das mit

Code:
mdadm --zero-superblock /dev/sdc3
mdadm --zero-superblock /dev/sdc4

Auf der Platte sda sind ausser sda3 und sda4 (jeweils im RAID) noch eine boot und eine swap Partition.

Also ich hatte quasi einen Zustand, als hätte sich sdc physikalisch verabschiedet.

Dann sdc partitioniert
Code:
dd if=/dev/sda of=/dev/sdc bs=512 count=1

und mit
Code:
mdadm /dev/md5 -a /dev/sdc3
mdadm /dev/md6 -a /dev/sdc4
wieder eingehängt.

Anstatt Synchronisation kam:
Code:
Phenom940:/home/dma # cat /proc/mdstat
Personalities : [raid10] [raid0] [raid1] [raid6] [raid5] [raid4]
md6 : active raid10 sdc4[2](S) sda4[0]
      576784224 blocks super 1.0 2 near-copies [2/1] [__]
      bitmap: 4/5 pages [16KB], 65536KB chunk

md4 : active raid10 sdg1[0] sdh1[1]
      976760672 blocks super 1.0 2 near-copies [2/2] [UU]
      bitmap: 2/466 pages [8KB], 1024KB chunk

md3 : active raid10 sdf1[1] sde1[0]
      976760672 blocks super 1.0 2 near-copies [2/2] [UU]
      bitmap: 2/466 pages [8KB], 1024KB chunk

md2 : active raid10 sdb1[3] sdd1[2]
      625130336 blocks super 1.0 2 near-copies [2/2] [UU]
      bitmap: 5/299 pages [20KB], 1024KB chunk

md5 : active raid10 sdc3[2](S) sda3[0]
      46138272 blocks super 1.0 2 near-copies [2/1] [__]
      bitmap: 1/1 pages [4KB], 65536KB chunk

unused devices: <none>
Phenom940:/home/dma #

obwohl bei der Anzeige der Details wird angezeigt

Code:
Phenom940:/home/dma # mdadm --detail /dev/md5
/dev/md5:
        Version : 1.0
  Creation Time : Wed Nov  9 19:37:52 2011
     Raid Level : raid10
     Array Size : 46138272 (44.00 GiB 47.25 GB)
  Used Dev Size : 46138272 (44.00 GiB 47.25 GB)
   Raid Devices : 2
  Total Devices : 2
    Persistence : Superblock is persistent

  Intent Bitmap : Internal

    Update Time : Thu Jan 12 12:30:47 2012
          State : active, degraded
 Active Devices : 1
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 1

         Layout : near=2
     Chunk Size : 32K

           Name : Phenom940:5  (local to host Phenom940)
           UUID : 8dc06806:3ab40a84:70a7cd1a:fa4eab34
         Events : 3209

    Number   Major   Minor   RaidDevice State
       0       8        3        0      active sync   /dev/sda3
       1       0        0        1      removed

       2       8       35        -      spare   /dev/sdc3

und

Code:
Phenom940:/home/dma # mdadm --detail /dev/md6
/dev/md6:
        Version : 1.0
  Creation Time : Wed Nov  9 19:37:53 2011
     Raid Level : raid10
     Array Size : 576784224 (550.06 GiB 590.63 GB)
  Used Dev Size : 576784224 (550.06 GiB 590.63 GB)
   Raid Devices : 2
  Total Devices : 2
    Persistence : Superblock is persistent

  Intent Bitmap : Internal

    Update Time : Thu Jan 12 12:31:11 2012
          State : active, degraded
 Active Devices : 1
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 1

         Layout : near=2
     Chunk Size : 32K

           Name : Phenom940:6  (local to host Phenom940)
           UUID : 65b5201e:32bf59d2:edf8cdd4:e6f90408
         Events : 94383

    Number   Major   Minor   RaidDevice State
       0       8        4        0      active sync   /dev/sda4
       1       0        0        1      removed

       2       8       36        -      spare   /dev/sdc4
Phenom940:/home/dma #

Also die sda3 und sda4 scheinen in Takt. Rechner läuft.

Was soll ich tun, um das gerade zu biegen?
 

spoensche

Moderator
Teammitglied
Mit dd hast du deine /dev/sdc nicht partitioniert, sondern den MBR, also auch die Partitionstabelle überschrieben. ;)

sdc3 und sdc4 sind als Spare Platten in das RAID eingebunden worden. Du musst sie aber als "normale" Platte dem RAID hinzufügen.
 
Oben