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

Raid1 mit yast erstellt, schaut aber komisch aus ...

ich habe wie in
http://www.linux-club.de/viewtopic.php?f=4&t=97073
beschrieben, meine 120 gb Platten gegen 500er getauscht, dabei sind mir einige komische Dinge an meinem Raid 1 aufgefallen, das ich 2005 mit yast (suse 10.0) erstellt hatte.

meine menu.lst
Code:
cat menu.lst
# Modified by YaST2. Last modification on Mi Dez 21 17:53:46 CET 2005

color white/blue black/light-gray
default 0
timeout 8
gfxmenu (hd1,1)/boot/message

###Don't change this comment - YaST2 identifier: Original name: linux###
title SUSE LINUX 10.0
    root (hd1,1)
    kernel /boot/vmlinuz root=/dev/md0 vga=0x317 selinux=0    resume=/dev/hdc1  splash=silent showopts
    initrd /boot/initrd

###Don't change this comment - YaST2 identifier: Original name: SUSE LINUX 10.0 (/dev/hdb2)###
title SUSE LINUX 10.0 (/dev/hdb2)
    root (hd0,1)
    kernel (hd0,1)/boot/vmlinuz root=/dev/md0 vga=0x317 selinux=0    resume=/dev/hdb1  splash=silent showopts
    initrd (hd0,1)/boot/initrd

###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe -- SUSE LINUX 10.0
    root (hd1,1)
    kernel /boot/vmlinuz root=/dev/md0 vga=normal showopts ide=nodma apm=off acpi=off noresume selinux=0 nosmp noapic maxcpus=0 edd=off  3
    initrd /boot/initrd

###Don't change this comment - YaST2 identifier: Original name: 2.6.13-15-default###
title 2.6.13-15-default
    root (hd1,1)
    kernel /boot/vmlinuz-2.6.13-15-default root=/dev/md0 vga=0x317 selinux=0    resume=/dev/hdb1  splash=silent showopts
    initrd /boot/initrd-2.6.13-15-default

hat unter resume kein mdxyz sondern noch resume=/dev/hdc1 bzw resume=/dev/hdb1 drin .. wobei hdb1/hdb1 aber der swap bereich ist

Code:
fdisk -l

Disk /dev/hdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdb1               1         113      907641   82  Linux swap / Solaris
/dev/hdb2   *         114       60801   487476360   fd  Linux raid autodetect

Disk /dev/hdc: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdc1               1         113      907641   82  Linux swap / Solaris
/dev/hdc2   *         114       60801   487476360   fd  Linux raid autodetect

Disk /dev/md0: 499.1 GB, 499175718912 bytes
2 heads, 4 sectors/track, 121869072 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

    Device Boot      Start         End      Blocks   Id  System

Code:
cat /proc/mdstat
Personalities : [raid1]
md0 : active raid1 hdc2[1] hdb2[0]
      487476288 blocks [2/2] [UU]

unused devices: <none>
schaut soweit gut aus NUR

Code:
cat /etc/mdadm.conf
DEVICE /dev/hdb2 /dev/hdc2
ARRAY /dev/md0 level=raid1 UUID=2ef91f93:774e7737:150f657e:7469ca8b
MAILADDR email@gmx.de

in der mdadm.conf fehlt das
Code:
num-devices=2
??

außerdem habe ich noch nie eine email bekommen, Postfix ist installiert.
Sendet der mdadm die Fehlermail nicht über Postfix nach extern ?

die Ausgabe
Code:
mdadm --detail /dev/md0
/dev/md0:
        Version : 00.90.02
  Creation Time : Sun Oct 23 19:25:36 2005
     Raid Level : raid1
     Array Size : 487476288 (464.89 GiB 499.18 GB)
    Device Size : 487476288 (464.89 GiB 499.18 GB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 0
    Persistence : Superblock is persistent

    Update Time : Tue Dec 16 13:29:25 2008
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

           UUID : 2ef91f93:774e7737:150f657e:7469ca8b
         Events : 0.14343118

    Number   Major   Minor   RaidDevice State
       0       3       66        0      active sync   /dev/hdb2
       1      22        2        1      active sync   /dev/hdc2
schaut aber gut aus
 
A

Anonymous

Gast
fritzbee21 schrieb:
hat unter resume kein mdxyz sondern noch resume=/dev/hdc1 bzw resume=/dev/hdb1 drin .. wobei hdb1/hdb1 aber der swap bereich ist
Das ist vollkommen richtig so. Für resume wird jeweils ein Swap benötigt.

in der mdadm.conf fehlt das
Code:
num-devices=2
Ist ein Schönheitsfehler muss wohl nicht unbedingt dort stehen, wichtig hier nur wo er überall nach Raidsuperblöcken suchen soll, also DEVICE und beim ARRAY welche UUID zu welchem Raiddevice zugeordnet werden soll, alles andere bezieht der Treiber sowieso aus dem Raidsuperblock.

außerdem habe ich noch nie eine email bekommen, Postfix ist installiert.
Sendet der mdadm die Fehlermail nicht über Postfix nach extern ?

hast du den mdadm-Deamon (mdadmd)gestartet,bzw läuft er ? Dieser überwacht die Raidfunktionen und versendet die Mails. Das ist ein Dienst den du entweder in Yast oder auch auf der Konsolzeile erst aktivieren musst.
Code:
insserv /etc/init.d/mdadmd


robi
 
OP
F

fritzbee21

Hacker
mein mdadmd läuft im runlevel 3 & 5 - im yast > System > Runlevel Editor ist der Deamon aktiv.
grundsätzlich scheint der mdadmd schon mails zu senden, wenn was im Raid nicht stimmt. Denn wenn ich die mails für root auf der commandline aufrufe sehe ich diverse Nachrichten:

Code:
snoopy:/home/user1 # mail -u root
mailx version nail 11.4 8/29/04.  Type ? for help.
"/var/mail/root": 1027 messages 1 new 1027 unread
 U1021 root@linux-server. Mon Dec 15 12:44   20/645   Fail event on /dev/md0:snoopy
 U1022 root@linux-server. Mon Dec 15 13:30   20/663   DegradedArray event on /dev/md0:snoopy
 U1023 root@linux-server. Mon Dec 15 13:48   20/663   DegradedArray event on /dev/md0:snoopy
 U1024 root@linux-server. Mon Dec 15 13:58   20/663   DegradedArray event on /dev/md0:snoopy
 U1025 root@linux-server. Mon Dec 15 14:07   20/663   DegradedArray event on /dev/md0:snoopy
 U1026 root@linux-server. Mon Dec 15 16:27   20/663   DegradedArray event on /dev/md0:snoopy
>N1027 root@linux-server. Wed Dec 17 14:07   17/523
? U1021
?
Message 1021:
From root@linux-server.de  Mon Dec 15 12:44:18 2008
X-Original-To: root@localhost
Delivered-To: root@localhost.linux.de
From: mdadm monitoring <root@linux-server.de>
To: root@localhost.linux.de
Subject: Fail event on /dev/md0:snoopy
Date: Mon, 15 Dec 2008 12:44:17 +0100 (CET)

This is an automatically generated mail message from mdadm
running on snoopy

A Fail event had been detected on md device /dev/md0.

Faithfully yours, etc.

?


meine /etc/mdadm.conf

Code:
DEVICE /dev/hdb2 /dev/hdc2
ARRAY /dev/md0 level=raid1 UUID=2ef91f93:774e7737:150f657e:7469ca8b
MAILADDR meine_email_adresse@gmx.de

wobei "meine_email_adresse" natürlich meine eMailadresse ist ;-)

nur warum sendet postfix die Mail nicht nach extern.
mit
Code:
mail meine_email_adresse@gmx.de -s test
blablabla
.
kann ich mir per commandline eine Mail schicken.
 
A

Anonymous

Gast
dann scheint einen alternative Konfigurationsquelle benutzt zu werden, wieso sollte er sonst ausgerechnet auf die Idee kommen an root zu mailen. ;)
Schau mal in die Datei /etc/sysconfig/mdadm
zu meinem Erstaunen steht dort bei mir
Code:
## Type:        string
## Default:     ""
#
# A mail address (or comma-separated list of mail addresses) to send alerts to.
#
MDADM_MAIL="root@localhost"
Default "" aber dennoch steht root@localhost per default in der Datei :???: :???: :???:

robi
 
OP
F

fritzbee21

Hacker
das sah bei mir genauso aus,
ich hab da jetzt mal
Code:
## Type:        string
## Default:     ""
#
# A mail address (or comma-separated list of mail addresses) to send alerts to.
#
MDADM_MAIL="meine_email_adresse@gmx.de"

draus gemacht, mal beobachten ob sich da was tut ...
 
Oben