RAID1 vs LILO

Fórumok

Sziasztok,

pár éve mdam-el összeraktam egy raid1-es arrayt, ami azóta is jól muzsikál. Anno teszteltem, ha lehúztam bármelyik hdd-t szépen bebootolt a másikról (és elindult a rebuild a spare diskkel). Most upgradelve lett a konfiguráció, gondoltam nem javítom meg azt ami nem romlott el és maradtam az eddigi eszközöknél: madm, raid1, lilo. De most csak akkor bootol, ha az sda bent van a gépben, egyébként nem (a bios sda, sdb, sdc, sdd sorrenddű bootolásra van állítva).
Szerintetek mi lehet a hiba?

Itt van a felépítés:

OS:

# uname -a
Linux edax 2.6.24.2_core2_edax #4 SMP Mon Feb 18 10:46:31 CET 2008 x86_64 x86_64 x86_64 GNU/Linux

A kernelben benne van minden raid0/1/10-hoz szükséges stuff.

Partitions:

# fdisk -l

Disk /dev/sda: 251.0 GB, 251000193024 bytes
255 heads, 63 sectors/track, 30515 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1           6       48163+  fd  Linux raid autodetect
/dev/sda2               7        1222     9767520   fd  Linux raid autodetect
/dev/sda3            1223       30515   235296022+  fd  Linux raid autodetect

Disk /dev/sdb: 251.0 GB, 251000193024 bytes
255 heads, 63 sectors/track, 30515 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1           6       48163+  fd  Linux raid autodetect
/dev/sdb2               7        1222     9767520   fd  Linux raid autodetect
/dev/sdb3            1223       30515   235296022+  fd  Linux raid autodetect

Disk /dev/sdc: 251.0 GB, 251000193024 bytes
255 heads, 63 sectors/track, 30515 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *           1           6       48163+  fd  Linux raid autodetect
/dev/sdc2               7        1222     9767520   fd  Linux raid autodetect
/dev/sdc3            1223       30515   235296022+  fd  Linux raid autodetect

Disk /dev/sdd: 251.0 GB, 251000193024 bytes
255 heads, 63 sectors/track, 30515 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1   *           1           6       48163+  fd  Linux raid autodetect
/dev/sdd2               7        1222     9767520   fd  Linux raid autodetect
/dev/sdd3            1223       30515   235296022+  fd  Linux raid autodetect

Disk /dev/md0: 49 MB, 49217536 bytes
2 heads, 4 sectors/track, 12016 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

    Device Boot      Start         End      Blocks   Id  System

Disk /dev/md2: 481.8 GB, 481886076928 bytes
2 heads, 4 sectors/track, 117647968 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md2 doesn't contain a valid partition table

Disk /dev/md1: 20.0 GB, 20003684352 bytes
2 heads, 4 sectors/track, 4883712 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md1 doesn't contain a valid partition table

RAID:

# cat /proc/mdstat 
Personalities : [raid0] [raid1] [raid10] [multipath] 
md1 : active raid10 sdd2[3] sdc2[2] sdb2[1] sda2[0]
      19534848 blocks 64K chunks 2 near-copies [4/4] [UUUU]
      
md2 : active raid10 sdd3[3] sdc3[2] sdb3[1] sda3[0]
      470591872 blocks 64K chunks 2 near-copies [4/4] [UUUU]
      
md0 : active raid1 sdd1[2](S) sdc1[3](S) sdb1[1] sda1[0]
      48064 blocks [2/2] [UU]
      
unused devices: <none>

LILO:

# grep -v "#" /etc/lilo.conf
lba32
boot = /dev/md0
raid-extra-boot = mbr
append = "hda=ide-cd hdb=ide-cd"
prompt
timeout = 100
change-rules
  reset
vga = normal


image = /boot/vmlinuz
  root = /dev/md1
  label = RAID
  read-only

image = /boot/edax_core2_v1
  root = /dev/md1
  label = RAID_old
  read-only

# lilo -v -v 
LILO version 22.6.1, Copyright (C) 1992-1998 Werner Almesberger
Development beyond version 21 Copyright (C) 1999-2004 John Coffman
Released 17-Nov-2004 and compiled at 00:24:45 on Sep  2 2005.

pf_hard_disk_scan: ndevs=4
  0800  69BAA24A  /dev/sda
  0810  507DEA16  /dev/sdb
  0820  00140000  /dev/sdc
  0830  614D2472  /dev/sdd
device codes (user assigned pf) = 0
device codes (user assigned) = 0
device codes (BIOS assigned) = F
device codes (canonical) = F
RAID info:  nr=4, raid=2, active=2, working=4, failed=0, spare=2
md: RAIDset device 0 = 0x0801
RAID scan: geo_get: returns geo->device = 0x82 for device 0801
disk->start = 63                raid_offset = 0 (00000000)
md: RAIDset device 1 = 0x0811
RAID scan: geo_get: returns geo->device = 0x80 for device 0811
disk->start = 63                raid_offset = 0 (00000000)
md: RAIDset device 2 = 0x0831
RAID scan: geo_get: returns geo->device = 0x83 for device 0831
disk->start = 63                raid_offset = 0 (00000000)
md: RAIDset device 3 = 0x0821
RAID scan: geo_get: returns geo->device = 0x81 for device 0821
disk->start = 63                raid_offset = 0 (00000000)
Using BIOS device code 0x80 for RAID boot blocks
raid_setup returns offset = 00000000  ndisk = 4
 BIOS   VolumeID   Device
  80    507DEA16    0810
  81    00140000    0820
  82    69BAA24A    0800
  83    614D2472    0830
raid flags: at bsect_open  0x02
Reading boot sector from /dev/md0
map_create:  boot=0900  map=0900
mode = 0x03,  columns = 80,  rows = 25,  page = 0
Using MENU secondary loader
Calling map_insert_data
Secondary loader: 18 sectors (0x3400 dataend).
bios_boot = 0x80  bios_map = 0x80  map==boot = 1  map S/N: 00000000
BIOS data check was okay on the last boot

Boot image: /boot/vmlinuz
Setup length is 20 sectors.
Mapped 4174 sectors.
Added RAID *

Boot image: /boot/edax_core2_v1
Setup length is 14 sectors.
Mapped 3938 sectors.
Added RAID_old

 BIOS   VolumeID   Device
  80    507DEA16    0810
  81    00140000    0820
  82    69BAA24A    0800
  83    614D2472    0830
do_md_install: MD_PARALLEL
/boot/boot.0900 exists - no boot sector backup copy made.
Map file size: 55808 bytes.
RAID device mask 0x000F
The boot record of  /dev/md0  has been updated.
Reading boot sector from /dev/sda
Warning: /dev/sda is not on the first disk
Using s/n from device 0x82
/boot/boot.0800 exists - no boot sector backup copy made.
The Master boot record of  /dev/sda  has been updated.
Reading boot sector from /dev/sdb
Using s/n from device 0x80
/boot/boot.0810 exists - no boot sector backup copy made.
The Master boot record of  /dev/sdb  has been updated.
Reading boot sector from /dev/sdd
Warning: /dev/sdd is not on the first disk
Using s/n from device 0x83
/boot/boot.0830 exists - no boot sector backup copy made.
The Master boot record of  /dev/sdd  has been updated.
Reading boot sector from /dev/sdc
Warning: /dev/sdc is not on the first disk
Using s/n from device 0x81
/boot/boot.0820 exists - no boot sector backup copy made.
The Master boot record of  /dev/sdc  has been updated.

Köszi, hogy eddig elolvastad és előre is a segítséged, de ha kérhetlek, ne javasold, hogy használjak grubot :)

Üdv, Ádám

Hozzászólások

raid-extra-boot utan sorold fel a device-okat, amiknek mbr-jebe szeretned tenni a lilot. Nekem az "mbr" opcio sosem mukodott :) siman felsoroltam, hogy "/dev/hda,/dev/hdc ..."

root@edax:~# lilo -M /dev/sdd
/boot/boot.0810 exists - no /dev/sdd backup copy made.
The Master Boot Record of  /dev/sdd  has been updated.
root@edax:~# lilo -M /dev/sda
/boot/boot.0800 exists - no /dev/sda backup copy made.
The Master Boot Record of  /dev/sda  has been updated.
root@edax:~# lilo -M /dev/sdb
/boot/boot.0810 exists - no /dev/sdb backup copy made.
The Master Boot Record of  /dev/sdb  has been updated.
root@edax:~# lilo -M /dev/sdc
/boot/boot.0820 exists - no /dev/sdc backup copy made.
The Master Boot Record of  /dev/sdc  has been updated.

Ezután már nem 99-el hanem No boot partition found-al örvendeztetett meg a gép..
De ha minden hdd rá van dugva akkor megy, így tehát úgy gondolom csak a map file lehet a hibás..

++ mostly harmless

En azt nem ertem, hogy miert matat az sdc es sdd boot szektoraiban is
ez valami lilo v kernel hiba lesz

btw nagyon szep megoldas, jo konfig :)
--
Gabriel Akos

Egyéb ötlet?

++ mostly harmless