LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - Installation
User Name
Password
Slackware - Installation This forum is for the discussion of installation issues with Slackware.

Notices


Reply
  Search this Thread
Old 09-16-2010, 06:52 AM   #1
thenob
LQ Newbie
 
Registered: Feb 2009
Posts: 14

Rep: Reputation: 4
Raid MBR


After some succesfull and some not succesfull recovery's from Raid-1 rashes, I finally want to understand the whole raid/mbr/lilo thing.
In the last 3 days I read so many page's about raid lilo mbr that my head is going to explode.
So I'll ask my questions here:

We normally use this
OS: Slackware (10.1 - 13.0)
Disks SATA (hot swappable Supermicro)
Raid Raid-1 configured manually in /etc/raidtab
Bootlader: LILO looks like this
boot = /dev/md0
raid-extra-boot = mbr
image = /boot/vmlinuz
root = /dev/md0

Assumptions (please correct me if I'm wrong)
-Bios looks voor bootable media (order can be changed in Bios)
-The Bios names this disk 0x80, later on the kernel says it's sda (or da).
-Bios will see in sector 0x80 the partitioning of the disk, and will mount the first bootable Primary Partition.

And now the Questions:
Q: when I do a lilo -v, 3 MBR got update (/dev/md0 /dev/sda /dev/sdb)
Is this all the same data? In /boot I can see boot.0800 boot.0810 and boot.0900. It is not the same (used diff for that), so I presume I may not change the boot-order in the bios, or not swap disks physicaly?

Q: when boot = /dev/md0, will BIOS read from /dev/md0 (then how does it know from which devices it is assembled), or does it not look at /dev/md0 and just uses the first bootable primary partition (/dev/sda1)

Q: /dev/md0 is made of /dev/sda1 and /dev/sdb2, and sda breaks.
Now you pullout the broken disk and reboot. Now the good disk (sdb) will become sda, but it won't boot because the root-partition is not found on /dev/sda1 (it's on the second one with this disk)

Q: If I would throw away /dev/md2, (unmount it, and remove it from /etc/raidtab), it is not possible to re-assmeble /dev/md2 from another partition of that drive, I have to use a never used one before (/dev/md4). Where is this info stored (superblock?)

Q: For being totaly safe I need to
- put the boot partition from both disk always at the same place (sda1/sdb1 or sda2/sdb2 or sda3/sdb3)
- use this option boot = /dev/md0, raid-extra-boot = mbr
- never physicaly swap disks, or change boot-order in BIOS
- when one disks breaks, replace it by an empty one, partition it, then restore the raid (raidhotadd), do lilo -v, reboot.

Q: Is there a real benefit of using mdadm.conf over raidtab.conf?
 
Old 09-16-2010, 09:08 AM   #2
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
For several years my workstation has run software RAID, and this document:
ftp://mirrors.kernel.org/slackware/s...EADME_RAID.TXT
is well written and I believe will answer most of your questions.

Have also setup RAID on servers, but never used your method above. Either
software RAID per this HOW-TO, or hardward RAID.
 
Old 02-26-2011, 12:39 AM   #3
lazardo
Member
 
Registered: Feb 2010
Location: SD Bay Area
Posts: 270

Rep: Reputation: Disabled
Quote:
Originally Posted by thenob View Post
...
boot = /dev/md0
raid-extra-boot = mbr
image = /boot/vmlinuz
root = /dev/md0
...
Minor correction [assuming MBR]: raid-extra-boot = "/dev/sda,/dev/sdb"

Quote:
Q: Is there a real benefit of using mdadm.conf over raidtab.conf?
/etc/raidtab is part of the legacy raidtools from ancient times, /etc/mdadm.conf is used more often for recovery and is not required if 'fd' is the partition ID type.

'mdadm --help' is your friend, mdadm(8) is your master.
 
Old 02-27-2011, 03:53 AM   #4
thenob
LQ Newbie
 
Registered: Feb 2009
Posts: 14

Original Poster
Rep: Reputation: 4
Quote:
Originally Posted by lazardo View Post
Minor correction [assuming MBR]: raid-extra-boot = "/dev/sda,/dev/sdb"
Lazardo,
what is the difference between using
raid-extra-boot = mbr
and
raid-extra-boot = /dev/sda,/dev/sdb


In the man-page of lilo.conf
Use of an explicit list of devices, forces writing of auxiliary boot records only on those
devices enumerated, in addition to the boot record on the RAID1 device. Since the version
22 RAID1 codes will never automatically write a boot record on the MBR of device 0x80, if
such a boot record is desired, this is one way to have it written. Use of mbr is the other
way to force writing to the MBR of device 0x80.


So, I presume it's the same.

Basicly, I still don't know what is written into the MBR.
Is it something like device-names, hardware-adresses, or are both mapped.
And changes if you change boot-order in the BIOS (are hardware adresses being changed, or is 0x81 used as first boot device)?
 
Old 03-01-2011, 12:25 AM   #5
lazardo
Member
 
Registered: Feb 2010
Location: SD Bay Area
Posts: 270

Rep: Reputation: Disabled
Quote:
Originally Posted by thenob View Post
Lazardo,
what is the difference between using
raid-extra-boot = mbr
and
raid-extra-boot = /dev/sda,/dev/sdb
RAID1 is defined as a mirror (meaning identical bits on the platter) set. The option I noted tells the boot loader which disks are in the set and thus where to put copies of the MBR.

If one of the disks burst in to flame for no good reason, you would expect the remaining disk to be identical, including MBR, else it wouldn't boot.

A 3-way mirror would be raid-extra-boot = "/dev/sda,/dev/sdb,/dev/sdc" for example.

As for how exactly it works, pls google 'engineering "alan cox" "brick walls" cement'
 
Old 03-02-2011, 01:45 AM   #6
thenob
LQ Newbie
 
Registered: Feb 2009
Posts: 14

Original Poster
Rep: Reputation: 4
lazardo, please don't respond if you don't know the answer...

Quote:
Originally Posted by lazardo View Post
RAID1 is defined as a mirror (meaning identical bits on the platter) set.
I think your wrong here,
In raid-1 the MBR is different! If you don't believe me try this:
- make a raid-1 configuration with raid-extra-boot=mbr (or the devices as you mentioned)
- stop the computer, remove 1 disk.
- change the remaining disk to the empty slot of the removed disk
- It will not boot.
- change the remaining disk to it's original slot.
- it will boot.
My conclusion: there must be something of the hardware adress in the written MBR.
My question(1): What is in the MBR written? (somthing like: I'm on 0x0800, or something like I'm part of x-way raid-device?)

Quote:
Originally Posted by lazardo View Post
The option I noted tells the boot loader which disks are in the set and thus where to put copies of the MBR.
Which disks are in the set is written on the disk itself (when you generate the raid). NOT in a config-file like this (not even in mdadm.conf or raidtab.conf, there are only viewed when generating the raid)

The raid-extra-boot options is optional.
Normally the boot-record is only written on the first sector of the raid-1 partition (typically /dev/md0).


But if it's used the options are:
none : suppress generation of all auxiliary boot records. (don't write boot records to MBR), same as not using this option at all

auto : automatically generate auxilary boot records as needed on SKEWED raid sets.
Let says the first raid partion is /dev/md0 is made of /dev/sda1 /dev/sdb1.
My Question (2): will this option only put a bootrecord on the MBR of sda if there are not present on /dev/sda1, and only put a bootrecord on the MBR of sdb if there are not present on /dev/sdb1?

mbr-only: write the boot records for all disks which are part of the raid, but not on the first partition of the raid-device.

mbr: write the boot records for all disks which are part of the raid, and leave the default option to write boot-records on the first partition of the raid-device.

comma-seperated list of devices: write extra boot records to drives you mention here. For example only on /dev/sdb.



If someone could answer my questions, I would be very happy..
 
Old 03-02-2011, 11:26 PM   #7
lazardo
Member
 
Registered: Feb 2010
Location: SD Bay Area
Posts: 270

Rep: Reputation: Disabled
Sorry to offend there nobby, I thought you were trying to solve a problem.

http://en.wikipedia.org/wiki/Master_boot_record

Good luck to ya.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Ubuntu overwrite mbr of a XFS-Dmcrypted-Raid 1 disks. How recover data? pianeta_rosso Linux - General 3 11-29-2008 03:50 PM
Restoring MBR :partitions are detected only after the reboot after MBR restoration? sharathksin Linux - Newbie 2 04-14-2006 07:48 AM
by tring to fix the MBR i damage the MBR that was help... AKAKAK Fedora 4 03-21-2005 08:18 AM
GRUB MBR overwritten by WIN98 MBR TOuseef Linux - General 7 11-14-2004 04:25 PM
Installation Questions: GRUB / LILO / RAID Config & MBR Zaphod98 Linux - General 1 09-09-2004 12:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - Installation

All times are GMT -5. The time now is 07:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration