Salut listasi,

 Scenariu: un server CentOS cu RAID1 software, localizat in Canada
(=> n-am acces fizic). La consola e un amic electronist (=> cunostinte
de Linux doar la nivel de baza), care a ramas pe post de administrator
dupa ce sysadminul a plecat.
 S-a intimplat "ceva" care a dus la blocarea serviciului de mail.
Raspunsul prompt (windows-style) a fost: hai sa rebootam.  Dupa
reboot, calculatorul a ramas blocat, cu ledul de la disc aprins. A
fost lasat asa o vreme destul de lunga - s-a presupus ca face
disk-checking.

 Dupa perioada de asteptare, amicul a folosit un live-CD (Mepis)
pentru a boota, si a verificat daca poate monta discurile individuale.
A putut. Aparent a facut si fsck pe partitiile individuale, dar fsck
"nu a functionat". Daca am inteles bine, fsck a ramas agatat si a fost
intrerupt cu Ctrl-C. Nu shtiu ce altceva o mai fi incercat.

 Dupa toate astea, prietenul a apelat la mine. Pentru a pune capac la
pupaza, mentionez ca experienta mea cu RAID-uri este cvasi-nula.
Anyway, l-am pus sa imi faca un reverse SSH tunnel (de pe CD-ul live)
si am deschis o consola pe calculatorul lui. Ce am constatat eu: mai
multe device-uri, corespunzind la: /boot, radacina, /home, /var, /tmp
si swap. Cele pt radacina, swap si /var erau marcate ca degraded. Dupa
multe sapaturi prin manuale si howto-uri, am resincronizat corect
(cred) toate device-urille. Cu ocazia asta am descoperit si ca /var
era 100% plin din cauza unui log-file care o luase razna (3.1 GB).
Asta presupun ca explica problema initiala cu serviciul de mail si cu
bootarea.

 Bun, si acum vine partea interesanta: Calculatorul refuza in
continuare sa booteze de pe RAID. La bootarea de pe CD totul imi pare
in regula - pot sa montez/accesez sistemul de fisiere de pe oricare
dispozitiv RAID. Logurile Mepisului nu raporteaza nimic suspect (am
uitat sa le copiez, da' take my word for it).

 Sunt complet in ceata, plus ignorant in ce priveshte RAID. Poate
cineva sa ma ajute cu o idee ? Informatiile tehnice vin mai jos.

Mihai

============================

I-am cerut amicului sa scrie litera cu litera ce apare pe ultimul
ecran la bootare. Citez:
---------------------------------------------
md:Autodetecting RAID arrays.
md:autorun ...
md:considering sdb5 ...
md:adding sdb5 ...
md:adding sda5 ...
md:md5 already running, cannot run sdb5
md:export_rdev (sda5)
md:export_rdev (sdb5)
md:... autorun DONE.

- liniile de mai sus se repeta de cel putin 5 ori (pe tot ecranul
vizibil), dupa care:

kjournald starting. Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
---------------------------------------------
 Si atit - se pare ca ramine aici. Folosind CD-ul de Mepis am gasit
/etc/raidtab-ul si /etc/fstab-ul de pe sistemul original:

-----------------------------------
/etc/raidtab:
raiddev /dev/md0
        raid-level              1
        nr-raid-disks           2
        nr-spare-disks          0
        persistent-superblock   1
        chunk-size              0
        device          /dev/sda1
        raid-disk               0
        device          /dev/sdb1
        raid-disk               1
raiddev /dev/md1
        raid-level              1
        nr-raid-disks           2
        nr-spare-disks          0
        persistent-superblock   1
        chunk-size              0
        device          /dev/sda2
        raid-disk               0
        device          /dev/sdb2
        raid-disk               1
raiddev /dev/md3
        raid-level              1
        nr-raid-disks           2
        nr-spare-disks          0
        persistent-superblock   1
        chunk-size              0
        device          /dev/sda3
        raid-disk               0
        device          /dev/sdb3
        raid-disk               1
raiddev /dev/md5
        raid-level              1
        nr-raid-disks           2
        nr-spare-disks          0
        persistent-superblock   1
        chunk-size              0
        device          /dev/sda5
        raid-disk               0
        device          /dev/sdb5
        raid-disk               1
raiddev /dev/md2
        raid-level              1
        nr-raid-disks           2
        nr-spare-disks          0
        persistent-superblock   1
        chunk-size              0
        device          /dev/sda6
        raid-disk               0
        device          /dev/sdb6
        raid-disk               1
raiddev /dev/md4
        raid-level              1
        nr-raid-disks           2
        nr-spare-disks          0
        persistent-superblock   1
        chunk-size              0
        device          /dev/sda7
        raid-disk               0
        device          /dev/sdb7
        raid-disk               1

-----------------------------------
/etc/fstab:
# This file is edited by fstab-sync - see 'man fstab-sync' for details
/dev/md1                /                       ext3    defaults        1 1
/dev/md0                /boot                   ext3    defaults        1 2
none                    /dev/pts                devpts  gid=5,mode=620  0 0
none                    /dev/shm                tmpfs   defaults        0 0
/dev/md4                /home                   ext3
defaults,usrquota,grpquota        1 2
none                    /proc                   proc    defaults        0 0
none                    /sys                    sysfs   defaults        0 0
/dev/md2                /tmp                    ext3    defaults        1 2
/dev/md3                /var                    ext3    defaults        1 2
/dev/md5                swap                    swap    defaults        0 0
/dev/hda                /media/cdrom            auto
pamconsole,exec,noauto,managed 0 0
-------------------------------------

 Daca bootez de pe CD, pot sa rulez urmatoarele:

[EMAIL PROTECTED] cat /proc/mdstat
Personalities : [raid1]
md255 : active raid1 dm-1[1] dm-0[0]
     104526784 blocks [2/2] [UU]

md5 : active raid1 sda7[0] sdb7[1]
     104526784 blocks [2/2] [UU]

md4 : active raid1 sda6[0] sdb6[1]
     1052160 blocks [2/2] [UU]

md3 : active raid1 sda5[0] sdb5[1]
     1052160 blocks [2/2] [UU]

md2 : active raid1 sda3[0] sdb3[1]
     4192896 blocks [2/2] [UU]

md1 : active raid1 sda2[0] sdb2[1]
     6289344 blocks [2/2] [UU]

md0 : active raid1 sda1[0] sdb1[1]
     104320 blocks [2/2] [UU]

unused devices: <none>
[EMAIL PROTECTED] mdadm -E /dev/sda1
/dev/sda1:
         Magic : a92b4efc
       Version : 00.90.00
          UUID : 367617ec:8af7cd32:00e4eacd:0fee3cd6
 Creation Time : Sat Mar 18 03:25:23 2006
    Raid Level : raid1
  Raid Devices : 2
 Total Devices : 2
Preferred Minor : 0

   Update Time : Wed Jun  6 12:44:28 2007
         State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
 Spare Devices : 0
      Checksum : 5f0d7c3 - correct
        Events : 0.7617


     Number   Major   Minor   RaidDevice State
this     0       8        1        0      active sync   /dev/sda1

  0     0       8        1        0      active sync   /dev/sda1
  1     1       8       17        1      active sync   /dev/sdb1
[EMAIL PROTECTED] mdadm -E /dev/sdb1
/dev/sdb1:
         Magic : a92b4efc
       Version : 00.90.00
          UUID : 367617ec:8af7cd32:00e4eacd:0fee3cd6
 Creation Time : Sat Mar 18 03:25:23 2006
    Raid Level : raid1
  Raid Devices : 2
 Total Devices : 2
Preferred Minor : 0

   Update Time : Wed Jun  6 12:44:28 2007
         State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
 Spare Devices : 0
      Checksum : 5f0d7d5 - correct
        Events : 0.7617


     Number   Major   Minor   RaidDevice State
this     1       8       17        1      active sync   /dev/sdb1

  0     0       8        1        0      active sync   /dev/sda1
  1     1       8       17        1      active sync   /dev/sdb1
[EMAIL PROTECTED] mdadm -E /dev/sda2
/dev/sda2:
         Magic : a92b4efc
       Version : 00.90.00
          UUID : 157ffd86:d8fee652:ecb8f689:20596daf
 Creation Time : Sat Mar 18 03:25:17 2006
    Raid Level : raid1
  Raid Devices : 2
 Total Devices : 2
Preferred Minor : 1

   Update Time : Wed Jun  6 12:46:32 2007
         State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
 Spare Devices : 0
      Checksum : 31cff10d - correct
        Events : 0.18373729


     Number   Major   Minor   RaidDevice State
this     0       8        2        0      active sync   /dev/sda2

  0     0       8        2        0      active sync   /dev/sda2
  1     1       8       18        1      active sync   /dev/sdb2
[EMAIL PROTECTED] mdadm -E /dev/sdb2
/dev/sdb2:
         Magic : a92b4efc
       Version : 00.90.00
          UUID : 157ffd86:d8fee652:ecb8f689:20596daf
 Creation Time : Sat Mar 18 03:25:17 2006
    Raid Level : raid1
  Raid Devices : 2
 Total Devices : 2
Preferred Minor : 1

   Update Time : Wed Jun  6 12:46:32 2007
         State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
 Spare Devices : 0
      Checksum : 31cff11f - correct
        Events : 0.18373729


     Number   Major   Minor   RaidDevice State
this     1       8       18        1      active sync   /dev/sdb2

  0     0       8        2        0      active sync   /dev/sda2
  1     1       8       18        1      active sync   /dev/sdb2
[EMAIL PROTECTED] mdadm -E /dev/sda3
/dev/sda3:
         Magic : a92b4efc
       Version : 00.90.00
          UUID : 48e886c0:343d8686:18927915:a460345d
 Creation Time : Sat Mar 18 03:26:37 2006
    Raid Level : raid1
  Raid Devices : 2
 Total Devices : 2
Preferred Minor : 2

   Update Time : Wed Jun  6 12:44:28 2007
         State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
 Spare Devices : 0
      Checksum : 72f64a40 - correct
        Events : 0.41406043


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

  0     0       8        3        0      active sync   /dev/sda3
  1     1       8       19        1      active sync   /dev/sdb3
[EMAIL PROTECTED] mdadm -E /dev/sdb3
/dev/sdb3:
         Magic : a92b4efc
       Version : 00.90.00
          UUID : 48e886c0:343d8686:18927915:a460345d
 Creation Time : Sat Mar 18 03:26:37 2006
    Raid Level : raid1
  Raid Devices : 2
 Total Devices : 2
Preferred Minor : 2

   Update Time : Wed Jun  6 12:44:28 2007
         State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
 Spare Devices : 0
      Checksum : 72f64a52 - correct
        Events : 0.41406043


     Number   Major   Minor   RaidDevice State
this     1       8       19        1      active sync   /dev/sdb3

  0     0       8        3        0      active sync   /dev/sda3
  1     1       8       19        1      active sync   /dev/sdb3

[EMAIL PROTECTED] mdadm -E /dev/sda4
mdadm: Cannot seek to superblock on /dev/sda4: Invalid argument
[EMAIL PROTECTED] mdadm -E /dev/sdb4
mdadm: Cannot seek to superblock on /dev/sdb4: Invalid argument
[EMAIL PROTECTED] mdadm -E /dev/sda5
/dev/sda5:
         Magic : a92b4efc
       Version : 00.90.00
          UUID : 13f7193a:fda2fb64:6a1140ee:75c10652
 Creation Time : Sat Mar 18 03:25:17 2006
    Raid Level : raid1
  Raid Devices : 2
 Total Devices : 2
Preferred Minor : 5

   Update Time : Mon Jun  4 18:04:30 2007
         State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
 Spare Devices : 0
      Checksum : 25299cf4 - correct
        Events : 0.51588


     Number   Major   Minor   RaidDevice State
this     0       8        5        0      active sync   /dev/sda5

  0     0       8        5        0      active sync   /dev/sda5
  1     1       8       21        1      active sync   /dev/sdb5
[EMAIL PROTECTED] mdadm -E /dev/sdb5
/dev/sdb5:
         Magic : a92b4efc
       Version : 00.90.00
          UUID : 13f7193a:fda2fb64:6a1140ee:75c10652
 Creation Time : Sat Mar 18 03:25:17 2006
    Raid Level : raid1
  Raid Devices : 2
 Total Devices : 2
Preferred Minor : 5

   Update Time : Mon Jun  4 18:04:30 2007
         State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
 Spare Devices : 0
      Checksum : 25299d06 - correct
        Events : 0.51588


     Number   Major   Minor   RaidDevice State
this     1       8       21        1      active sync   /dev/sdb5

  0     0       8        5        0      active sync   /dev/sda5
  1     1       8       21        1      active sync   /dev/sdb5
[EMAIL PROTECTED] mdadm -E /dev/sda6
/dev/sda6:
         Magic : a92b4efc
       Version : 00.90.00
          UUID : bdf9b0f4:beaf6de0:0d62805c:9ea40a92
 Creation Time : Sat Mar 18 03:26:32 2006
    Raid Level : raid1
  Raid Devices : 2
 Total Devices : 2
Preferred Minor : 4

   Update Time : Wed Jun  6 12:44:28 2007
         State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
 Spare Devices : 0
      Checksum : 5d198e69 - correct
        Events : 0.5631783


     Number   Major   Minor   RaidDevice State
this     0       8        6        0      active sync   /dev/sda6

  0     0       8        6        0      active sync   /dev/sda6
  1     1       8       22        1      active sync   /dev/sdb6
[EMAIL PROTECTED] mdadm -E /dev/sdb6
/dev/sdb6:
         Magic : a92b4efc
       Version : 00.90.00
          UUID : bdf9b0f4:beaf6de0:0d62805c:9ea40a92
 Creation Time : Sat Mar 18 03:26:32 2006
    Raid Level : raid1
  Raid Devices : 2
 Total Devices : 2
Preferred Minor : 4

   Update Time : Wed Jun  6 12:44:28 2007
         State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
 Spare Devices : 0
      Checksum : 5d198e7b - correct
        Events : 0.5631783


     Number   Major   Minor   RaidDevice State
this     1       8       22        1      active sync   /dev/sdb6

  0     0       8        6        0      active sync   /dev/sda6
  1     1       8       22        1      active sync   /dev/sdb6
[EMAIL PROTECTED] mdadm -E /dev/sda7
/dev/sda7:
         Magic : a92b4efc
       Version : 00.90.00
          UUID : 80555340:ed931465:07c0da6d:6bf58d97
 Creation Time : Sat Mar 18 03:25:24 2006
    Raid Level : raid1
  Raid Devices : 2
 Total Devices : 2
Preferred Minor : 5

   Update Time : Wed Jun  6 12:44:28 2007
         State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
 Spare Devices : 0
      Checksum : 1f1b8afa - correct
        Events : 0.30009276


     Number   Major   Minor   RaidDevice State
this     0       8        7        0      active sync   /dev/sda7

  0     0       8        7        0      active sync   /dev/sda7
  1     1       8       23        1      active sync   /dev/sdb7
[EMAIL PROTECTED] mdadm -E /dev/sdb7
/dev/sdb7:
         Magic : a92b4efc
       Version : 00.90.00
          UUID : 80555340:ed931465:07c0da6d:6bf58d97
 Creation Time : Sat Mar 18 03:25:24 2006
    Raid Level : raid1
  Raid Devices : 2
 Total Devices : 2
Preferred Minor : 5

   Update Time : Wed Jun  6 12:44:28 2007
         State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
 Spare Devices : 0
      Checksum : 1f1b8b0c - correct
        Events : 0.30009276


     Number   Major   Minor   RaidDevice State
this     1       8       23        1      active sync   /dev/sdb7

  0     0       8        7        0      active sync   /dev/sda7
  1     1       8       23        1      active sync   /dev/sdb7
[EMAIL PROTECTED] fdisk -l /dev/sda

Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

  Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   fd  Linux raid autodetect
/dev/sda2              14         796     6289447+  fd  Linux raid autodetect
/dev/sda3             797        1318     4192965   fd  Linux raid autodetect
/dev/sda4            1319       14593   106631437+   5  Extended
/dev/sda5            1319        1449     1052226   fd  Linux raid autodetect
/dev/sda6            1450        1580     1052226   fd  Linux raid autodetect
/dev/sda7            1581       14593   104526891   fd  Linux raid autodetect
[EMAIL PROTECTED] fdisk -l /dev/sdb

Disk /dev/sdb: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

  Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1          13      104391   fd  Linux raid autodetect
/dev/sdb2              14         796     6289447+  fd  Linux raid autodetect
/dev/sdb3             797        1318     4192965   fd  Linux raid autodetect
/dev/sdb4            1319       14593   106631437+   5  Extended
/dev/sdb5            1319        1449     1052226   fd  Linux raid autodetect
/dev/sdb6            1450        1580     1052226   fd  Linux raid autodetect
/dev/sdb7            1581       14593   104526891   fd  Linux raid autodetect

_______________________________________________
RLUG mailing list
RLUG@lists.lug.ro
http://lists.lug.ro/mailman/listinfo/rlug

Raspunde prin e-mail lui