Software RAID

Hi,

ich habe folgendes Problem mit einem Software RAID mit dem ich ein wenig rumspiele:

Code:
Zod:~# mdadm -Es
ARRAY /dev/md127 level=raid0 num-devices=2 UUID=bbbe0cdc:57967385:596a9b5c:cdb46f5d
Zod:~# mdadm --detail /dev/md127
/dev/md127:
        Version : 00.90.03
  Creation Time : Fri Jan 30 18:32:04 2009
     Raid Level : raid0
     Array Size : 2097024 (2048.22 MiB 2147.35 MB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 127
    Persistence : Superblock is persistent

    Update Time : Fri Jan 30 18:32:04 2009
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

     Chunk Size : 64K

           UUID : bbbe0cdc:57967385:596a9b5c:cdb46f5d
         Events : 0.1

    Number   Major   Minor   RaidDevice State
       0       8       32        0      active sync   /dev/sdc
       1       8       48        1      active sync   /dev/sdd
Zod:~# mdadm --manage /dev/md127 --fail /dev/sdc
mdadm: set /dev/sdc faulty in /dev/md127
Zod:~# mdadm --manage /dev/md127 --remove /dev/sdc
mdadm: hot remove failed for /dev/sdc: Device or resource busy
Zod:~#

Ich möchte das RAID 0 /dev/md127 auflösen. Dazu wollte ich die Disks erst "faulty" setzen und dann entfernen. Allerdings läuft das nicht. Laut einiges Tutorials sollte es aber so laufen.

Weiss jemand was das Problem ist?


mfg
serow
 
Ich weiß nicht, ob es im raid0 überhaupt vorgesehen ist. Also stop doch einfach das Array... dann sind die beiden platten auch wieder frei. Das raid wird ja nichtmehr benutzt!?
 
Hi,

mich wunderts einfach, dass mdadm -Es das Ding weiterhin anzeigt. Eigentlich müsste man ja zumindest mit --remove die disk rausnehmen können wenn das array gestoppt ist oder?

Code:
Zod:~# mdadm -Es
ARRAY /dev/md127 level=raid0 num-devices=2 UUID=bbbe0cdc:57967385:596a9b5c:cdb46f5d
Zod:~# mdadm --stop /dev/md127 
mdadm: stopped /dev/md127
Zod:~# mdadm -Es
ARRAY /dev/md127 level=raid0 num-devices=2 UUID=bbbe0cdc:57967385:596a9b5c:cdb46f5d
Zod:~#

Wenn ich im gestoppten Zustand ein --remove versuche kommt das hier:
Code:
Zod:~# mdadm --manage /dev/md127 --remove /dev/sdc
mdadm: cannot get array info for /dev/md127

Dasselbe aber im gestarteten Zustand:
Code:
Zod:~# mdrun /dev/md127
mdadm: /dev/md/0 has been started with 2 drives.
Zod:~# mdadm --manage /dev/md127 --remove /dev/sdc1
mdadm: cannot get array info for /dev/md127
Zod:~#


Witzig ist auch der hier:
Code:
Zod:~# mdadm --stop /dev/md127 
mdadm: stopped /dev/md127
Zod:~# cat /proc/mdstat 
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] 
md0 : active raid0 sdc[0] sdd[1]
      2097024 blocks 64k chunks
      
unused devices: <none>
Zod:~#
Das raid bleibt aktiv obwohl ich --stop mache und mdadm mir sagt es hat geklappt ...



EDIT:
Hab jetzt folgendes gefunden:
Code:
cd /etc/mdadm
echo 'DEVICE /dev/hd*[0-9] /dev/sd*[0-9]' > mdadm.conf
mdadm --detail --scan >> mdadm.conf
Ich finde jetzt zwar nicht ganz einleuchtend warum das Array jetzt weg ist aber es ist weg ... Kann jemand erklären warum?

cu
serow
 
Raid0 ist an sich kein richtiges raid und verhält sich daher etwas anders.
Im gestopptem Zustand kann nichts entfernt werden, weil nichts da ist.
Wenn man mal die man-pages lesen würde:
-s, --scan
Scan config file or /proc/mdstat for missing information. In general, this option gives mdadm permission to get any missing information (like component devices, array devices, array identities, and alert destination) from the configuration file [...]

-r, --remove
remove listed devices. They must not be active. i.e. they should be failed or spare devices.[...]
Wieso hast du md127 und im proc taucht ein md0 auf?!
 
Wieso hast du md127 und im proc taucht ein md0 auf?!
Das wäre meine nächste Frage gewesen ^^


Code:
Zod:~# mdadm -Es
ARRAY /dev/md127 level=raid0 num-devices=2 UUID=bbbe0cdc:57967385:596a9b5c:cdb46f5d
Zod:~# mdadm --stop /dev/md127 
mdadm: stopped /dev/md127
Zod:~# mdadm -Es
ARRAY /dev/md127 level=raid0 num-devices=2 UUID=bbbe0cdc:57967385:596a9b5c:cdb46f5d
Zod:~#
Aber warum zeigt er es hier noch an, wenn da doch nix mehr ist nach dem stoppen?
 
Hast meinen letzten Post gelesen? bzgl des Parameters "-s"? Anscheinend nicht.
Aber das mit md0 und md127 ist mir irgendwie rätselhaft.
 
-s, --scan Scan config file or /proc/mdstat for missing information. In general, this option gives mdadm permission to get any missing information (like component devices, array devices, array identities, and alert destination) from the configuration file [...]
Lesen kann ich prinzipiell schon ;) Dennoch - wenn du sagst, dass mit einem --stop das RAID weg ist, ist mir nicht klar, warum -s bzw /proc/mdstat immernoch bescheid weiss, dass da was ist wenn doch nichts da ist ...

Anstatt mich mich man-pages zu bombardieren wäre es gut wenn du das mal in eigenen Wortern erklären könntest. Die man-pages hab ich größtenteils schon gelesen - aber eben viel nicht verstanden glaube ich.

cu
serow
 
"Scan config[...]" was ist dadran so schwer? Das -s durchsucht einfach die Konfigurationsdatei und /proc/mdstat um so viele Informationen wie möglich auszugeben...
Würde auch erklären, wieso das Raid-Array nach dem neu schreiben der Konfigurationsdatei weg ist.

Und wegen den md0 und md127, kann es sein das du mehrere Arrays mal hattest?!

Wie sieht deine Konfigurationsdatei jetzt aus?
 
Code:
mathias@Zod:~$ cat /etc/mdadm/mdadm.conf 

mathias@Zod:~$
Leer ist sie ... also ich check langsam garnix mehr. Aber gut - es ist ja jetzt auch alles weg:
Code:
mathias@Zod:~$ cat /proc/mdstat 
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] 
unused devices: <none>
mathias@Zod:~$
Code:
Zod:/home/mathias# mdadm -Es
Zod:/home/mathias#

Ich hab jetzt nochmal ein RAID0 erzeugt, aber die Config Datei ist immernoch leer ...
Code:
Zod:/home/mathias# mdadm --create /dev/md0 --auto=yes --level=0 --raid-devices=2 /dev/sdb /dev/sdc
mdadm: /dev/sdc appears to contain an ext2fs file system
    size=2097024K  mtime=Fri Jan 30 23:47:03 2009
Continue creating array? 
Continue creating array? (y/n) y
mdadm: array /dev/md0 started.
Zod:/home/mathias# cat /etc/mdadm/mdadm.conf 

Zod:/home/mathias# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] 
md0 : active raid0 sdc[1] sdb[0]
      2097024 blocks 64k chunks
      
unused devices: <none>
Zod:/home/mathias#



EDIT:
Und auf die Gefahr hin, dass du mir wieder die man page zitierst: Ein device faulty setzen scheint nicht zu klappen:
Code:
Zod:/home/mathias# mdadm --detail /dev/md0
/dev/md0:
        Version : 00.90.03
  Creation Time : Mon Feb  2 13:48:38 2009
     Raid Level : raid0
     Array Size : 2097024 (2048.22 MiB 2147.35 MB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 0
    Persistence : Superblock is persistent

    Update Time : Mon Feb  2 13:48:38 2009
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

     Chunk Size : 64K

           UUID : 22dad7a3:41b3b1d8:089a3bd5:e7331dbf
         Events : 0.1

    Number   Major   Minor   RaidDevice State
       0       8       16        0      active sync   /dev/sdb
       1       8       32        1      active sync   /dev/sdc
Zod:/home/mathias# mdadm --manage /dev/md0 --fail /dev/sdb
mdadm: set /dev/sdb faulty in /dev/md0
Zod:/home/mathias# mdadm --detail /dev/md0
/dev/md0:
        Version : 00.90.03
  Creation Time : Mon Feb  2 13:48:38 2009
     Raid Level : raid0
     Array Size : 2097024 (2048.22 MiB 2147.35 MB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 0
    Persistence : Superblock is persistent

    Update Time : Mon Feb  2 13:48:38 2009
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

     Chunk Size : 64K

           UUID : 22dad7a3:41b3b1d8:089a3bd5:e7331dbf
         Events : 0.1

    Number   Major   Minor   RaidDevice State
       0       8       16        0      active sync   /dev/sdb
       1       8       32        1      active sync   /dev/sdc
Zod:/home/mathias#
 
Wie gesagt, raid0 ist eigentlich kein raid. Und fail und hot-add/remove sind nicht möglich.

Aber da du die man-pages ja anscheinend so magst :-D
This is because RAID0 and Linear do not support the device-failed, hot-spare and resync operations [...]

raid0 or linear never have missing, spare, or failed drives[...]
 
Zurück
Oben