| View previous topic :: View next topic |
| Author |
Message |
lostinspace2011 Apprentice

Joined: 09 Sep 2005 Posts: 161 Location: UK
|
Posted: Wed Feb 29, 2012 5:31 pm Post subject: Intel BIOS Raid |
|
|
I am trying to install Gentoo on a system which has an Intel BIOS RAID controller (Intel Corporation Patsburg SATA RAID Controller (rev 05)). While following the installation guide I encountered some issues:
I installed 2 x harddrives connected to SATA 0 / 1 and enabled RAID 1 in the BIOS. I also created a disk array in the BIOS
1.) During the installation process I was able to see /dev/sda and /dev/sdb, however once partitioned using fdisk I was not able to create a file system. Using /dev/md126 I did manage to create a file system on /dev/md126p1, /dev/md126p2 and /dev/md126p3. I figured this must be a peculiarity of the RAID ?
2.) After completing the installation process and the first reboot all I get is a flashing cursor. I suspect it is either my grub installation on hd(0,0) or my kernel driver. However I don't get the grub screen, so most likely it is grub.
Any suggestions on whether BIOS RAID from intel is supported at all. I tried to search online but couldn't find anything helpful.
This link http://en.gentoo-wiki.com/wiki/RAID/Onboard suggest to run ls -la /dev/mapper and if only control is found it would not work. I tried this and only control was listed. Does this mean it will not work ?
Thanks in advance
Alex |
|
| Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 30122 Location: 56N 3W
|
Posted: Wed Feb 29, 2012 6:24 pm Post subject: |
|
|
lostinspace2011,
There are two different flavours of Intel BIOS raid.
One is quite rightly called fakeraid, as it looks like hardware raid but isn't. This typically needs the setup you describle in the BIOS.
It needs a third party kernel module called dmraid for the kernel to see your raid set and you partition the raid set with fdisk as normal.
The raid set is called /dev/mapper/<something>
For root on this sort of raid, you must have an initrd as you need to load dmraid before root can be mounted.
You don't use mdadm to form the raid and you don't get raid sets with names like /dev/md126.
The second Intel Raid has some hardware help - it does use mdadm and will gibe you names like /dev/md126.
Both forms show the underlying /dev/sda and /dev/sdb but you must never do anything with them as they are not yours, they belong to the raid.
You have partitioned your raid set, which is unusual but works, hence /dev/md126p1 and friends.
With mdadm, there are several versions of raid superblock. for /boot on raid with mdadm you must use superblock version 0.9, which is no longer the defualt.
Boot your liveCD and run mdadm -E /dev/sda near the top you will find the Raid superblock version.
| Code: | $ sudo /sbin/mdadm -E /dev/sda1
/dev/sda1:
Magic : a92b4efc
Version : 0.90.00 | I suspect your have version 1.2.
There are two ways forward. Drop grub and use lilo or redo your raid.
There are several versions of Intel Corporation Patsburg SATA RAID Controller, I need the same line from lspci and lspci -n to know which one you have. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
| Back to top |
|
 |
lostinspace2011 Apprentice

Joined: 09 Sep 2005 Posts: 161 Location: UK
|
Posted: Wed Feb 29, 2012 6:31 pm Post subject: |
|
|
Thanks for you fast reply
| Code: | mdadm -E /dev/sda
/dev/sda:
Magic : Intel Raid ISM Cfg Sig.
Version : 1.1.00 |
| Code: | lspci |grep -i raid
00:1f.2 RAID bus controller: Intel Corporation Patsburg SATA RAID Controller (rev 05) |
I tried it using an Ubuntu Live CD I had lying around and that picked up my RAID correctly. |
|
| Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 30122 Location: 56N 3W
|
Posted: Wed Feb 29, 2012 6:59 pm Post subject: |
|
|
lostinspace2011,
If ISM stands for Intel Storage Matrix, you are good to go with mdadm.
Is not a question of picking up your raid correcty, its booting from it.
Raid with superblock version 0.9 looks like a normal unraided volume to grub. As grub knows nothng of raid, thats fine, it just ignores it and it works.
Raid with superblock <> 0.9 puts superblock information where grub expects to find a part of the filesystem. That causes grub to fail.
You have three or four ways forward:-
1. use lilo as your boot loader
2. use grub2 as your boot loader (unsupported by gentoo just now)
3. redo your raid set with version 0.9 superblocks
4. redo your raid set using kernel raid with version 0.9 superblocks
Lilo is the path of least resistance. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
| Back to top |
|
 |
lostinspace2011 Apprentice

Joined: 09 Sep 2005 Posts: 161 Location: UK
|
Posted: Wed Feb 29, 2012 7:12 pm Post subject: |
|
|
| Thanks I will try lilo and report back. Anything I have to watch out for when I compile the kernel ? |
|
| Back to top |
|
 |
lostinspace2011 Apprentice

Joined: 09 Sep 2005 Posts: 161 Location: UK
|
Posted: Wed Feb 29, 2012 7:41 pm Post subject: |
|
|
Here is my lilo configuration:
| Code: | boot=/dev/md126p1
prompt
timeout=10
default=gentoo
image=/boot/kernel-basic
label=gentoo
read-only
root=/dev/md126p3 |
However when I try to activate it I get an error:
Warning: LBA32 addressing assumed
Fatal: Sorry, don't know how to handle device 0x10300
I already this this with both released and mask versions of lilo (22.8-r2 and 23.2-r2) and neither did work.
Last edited by lostinspace2011 on Wed Feb 29, 2012 8:13 pm; edited 1 time in total |
|
| Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 30122 Location: 56N 3W
|
Posted: Wed Feb 29, 2012 8:10 pm Post subject: |
|
|
lostinspace2011,
Thats ugly. Normally lilo uses /etc/mtab or /etc/fstab to find its way around.
I've not seen a device number like 0x10300 ever either but I guess its the kernels major,minor device number for your boot.
Working partitions on raid devices are fairly new to linux. Maybe lilo can't cope.
The warning is ok. LBA32 addressing has been used for years now.
You could try adding in disk=/dev/md126 at the top of lilo.conf _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
| Back to top |
|
 |
lostinspace2011 Apprentice

Joined: 09 Sep 2005 Posts: 161 Location: UK
|
Posted: Wed Feb 29, 2012 8:19 pm Post subject: |
|
|
Mount shows I have the array mounted:
| Code: | livecd / # mount
/dev/md126p3 on / type ext4 (rw,relatime,user_xattr,acl,barrier=1,data=ordered)
/dev/md126p1 on /boot type ext4 (rw,relatime,user_xattr,acl,barrier=1,stripe=4,data=ordered) |
fdisk reports the partition as :
| Code: | Device Boot Start End Blocks Id System
/dev/md126p1 2048 526335 262144 83 Linux
|
I also tried various file system (ext2 and ext4) both with the same results.
I am using kernel "Linux livecd 3.2.1-gentoo-r2 #1 SMP Thu Feb 23 14:15:30 UTC 2012 x86_64"
Hope this helps in finding a solution.
Alex |
|
| Back to top |
|
 |
lostinspace2011 Apprentice

Joined: 09 Sep 2005 Posts: 161 Location: UK
|
Posted: Wed Feb 29, 2012 8:21 pm Post subject: |
|
|
| One thing is weird and that is I don't have an /etc/mtab file ? I tried to create one using : grep -v rootfs /proc/mounts > /etc/mtab and re-run lilo, but that didn't work either |
|
| Back to top |
|
 |
lostinspace2011 Apprentice

Joined: 09 Sep 2005 Posts: 161 Location: UK
|
Posted: Wed Feb 29, 2012 8:34 pm Post subject: |
|
|
| Since my installation CD detected my array I never had to manually create it. Hence the name is /dev/md126 rather then /dev/md1. Should I create / re-create it manually. Could this make a difference ? |
|
| Back to top |
|
 |
lostinspace2011 Apprentice

Joined: 09 Sep 2005 Posts: 161 Location: UK
|
Posted: Wed Feb 29, 2012 8:39 pm Post subject: |
|
|
Using mdadm --details shows Version 0.90
| Code: | mdadm --detail /dev/md126
/dev/md126:
Version : 0.90
Raid Level : raid1 |
|
|
| Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 30122 Location: 56N 3W
|
Posted: Wed Feb 29, 2012 9:37 pm Post subject: |
|
|
lostinspace2011,
The tradional way with working with raid sets in linix is to partition your drives identically, then donate the partitions to raid sets.
so /dev/sd[ab]1 could be /boot on /deb/md0
/dev/sd[sb]2 swap on /dev/md1 and
/dev/sd[ab]3 root on /dev/md2
The md numbers are not important, its the order, partition, then raid.
With your setup, you donated the drives to a raid set, then partitioned tha raid set. Linux has never stopped you doing this but until recently, partitions on a raid set could not be used.
Thats the cause of the issue, not the /dev/md<number>
Your /etc/mtab exists only outside of your chroot. If | Code: | | grep -v rootfs /proc/mounts > /etc/mtab | failed to make an /etc/mtab file it means you did not mount /proc before you entered the chroot.
It probably means you didn't mount /dev inside the chroot either. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
| Back to top |
|
 |
lostinspace2011 Apprentice

Joined: 09 Sep 2005 Posts: 161 Location: UK
|
Posted: Thu Mar 01, 2012 9:15 am Post subject: |
|
|
I definitely had both proc and dev mounted before entering chroot. Tried this several times and made 100% sure last time. Still now /etc/mtab though. I did however manage to get as seeing the GRUB screen. However when I select my kernel I get a kernel panic on startup.
md1 (driver?)
Kernel panic - not syncing : VFS: Unable to mount root fs on unknown block (2,0)
I made sure the partition type for both /dev/sda1 and /dev/sdb1 is set to fd (raid auto).
I also verified I had the correct options selected in the kernel configuration. RAID0,1,... MD_AUTO etc.
Maybe I haven't configured the driver for my RAID controller. If this is the case where in the kernel configuration do I find the section for RAID controllers ?
Thanks in advance |
|
| Back to top |
|
 |
lostinspace2011 Apprentice

Joined: 09 Sep 2005 Posts: 161 Location: UK
|
Posted: Thu Mar 01, 2012 9:38 am Post subject: |
|
|
This is what I did :
Booted Installation CD, enabled SSHD and configured network
| Code: | livecd ~ # cat /proc/mdstat
Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md126 : active (auto-read-only) raid1 sdb3[1] sda3[0]
972303952 blocks super 1.2 [2/2] [UU]
md127 : active (auto-read-only) raid1 sdb1[1] sda1[0]
262080 blocks [2/2] [UU]
unused devices: <none>
livecd ~ # mount /dev/md126 /mnt/gentoo/
livecd ~ # mount /dev/md127 /mnt/gentoo/boot/
livecd ~ # mount -t proc none /mnt/gentoo/proc
livecd ~ # mount -o bind /dev /mnt/gentoo/dev
livecd ~ # chroot /mnt/gentoo /bin/bash
livecd / # env-update
>>> Regenerating /etc/ld.so.cache...
livecd / # source /etc/profile
livecd / # export PS1="(chroot) $PS1"
(chroot) livecd / # ls -l /etc/mt*
ls: cannot access /etc/mt*: No such file or directory |
What is a little strange is that the array names have changed. When I originally created them I used md1 / md2, but now they were detected as md126 / md 127. I guess this is just a name and not important. |
|
| Back to top |
|
 |
lostinspace2011 Apprentice

Joined: 09 Sep 2005 Posts: 161 Location: UK
|
Posted: Thu Mar 01, 2012 12:03 pm Post subject: |
|
|
When booted directly via the LIVECD, lspci identifies my SATA controller as :
| Code: | 00:1f.2 RAID bus controller: Intel Corporation Patsburg SATA RAID Controller (rev 05)
Subsystem: Giga-byte Technology Device b002
Flags: bus master, 66MHz, medium devsel, latency 0, IRQ 40
I/O ports at f090 [size=8]
I/O ports at f080 [size=4]
I/O ports at f070 [size=8]
I/O ports at f060 [size=4]
I/O ports at f020 [size=32]
Memory at fbf45000 (32-bit, non-prefetchable) [size=2K]
Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit-
Capabilities: [70] Power Management version 3
Capabilities: [a8] SATA HBA v1.0
Capabilities: [b0] PCI Advanced Features
Kernel driver in use: ahci
Kernel modules: ahci |
However when running from inside the CHROOT environment I am getting
| Code: | 00:1f.2 RAID bus controller: Intel Corporation Device 2826 (rev 05)
Subsystem: Giga-byte Technology Device b002
Flags: bus master, 66MHz, medium devsel, latency 0, IRQ 40
I/O ports at f090 [size=8]
I/O ports at f080 [size=4]
I/O ports at f070 [size=8]
I/O ports at f060 [size=4]
I/O ports at f020 [size=32]
Memory at fbf45000 (32-bit, non-prefetchable) [size=2K]
Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit-
Capabilities: [70] Power Management version 3
Capabilities: [a8] SATA HBA v1.0
Capabilities: [b0] PCI Advanced Features |
I wonder why that is ? |
|
| Back to top |
|
 |
lostinspace2011 Apprentice

Joined: 09 Sep 2005 Posts: 161 Location: UK
|
Posted: Thu Mar 01, 2012 2:37 pm Post subject: |
|
|
| Oops. I just read your first message again carefully. mdadm is still a software raid solution. Is there no other option of using the onboard raid controller in Linux ? Is there a list of supported hardware controller ? I tried searching but didn't find much. |
|
| Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 30122 Location: 56N 3W
|
Posted: Thu Mar 01, 2012 6:04 pm Post subject: |
|
|
lostinspace2011,
Software raid - be it BIOS raid, kernel raid or whatever is popular because its low cost
All the calculations amd extra writes are done by your system CPU.
For raid0 or raid1 thats fairly trivial. There are no parity caculations - raid0 and raid1 pretty much involves rearranging your data on your drives.
For raid0, the data is split alternately across your drives, so reads and writes are both faster.
For raid1, data is written to both drives (an extra copy) but normally read from only one, so there is no read speed improvement.
However .. in kernel (mdadm) raid1 the kernel keeps the heads of the raid1 drives in different places on the drives and reads from the drive that needs the shortest head movement. This reduces the latencey, or time to get to your data.
For higher raid levels, where some redundant information is stored, with software raid, the system CPU has to do the 'parity' calualtion and work out what data goes where in what drive.
Software raid is still very cost effective on a modern multicore CPU as the raid overhead is a small fraction of one core.
Simplistically, hardware raid is a plug in computer for your PC. It has its own CPU, its own RAM, often battery backed to avoid data loss on power fail and its expensive. For raid0 and raid1 as I've described, it does very little.
In the UK I would expect to pay over £300 for a hardware raid card.
Your kernel error is interesting | kernel painic: | | VFS: Unable to mount root fs on unknown block (2,0) |
Tells that the kernel does not know how to communicate with your hard drive controller. Its not really a raid controller as the raid is in software.
Both your lspci outputs are actually the same. What happens inside lspic is that it extracts the Vendor ID and Device ID from four bytes in the PCI device, then looks them up in a lookup table to print a descriptive text string.
These strings change in different version of lspci. To see the numbers, run
One imporant piece of information from lspci is | Code: | | Kernel driver in use: ahci | so you need that kernel option bult into your kernel. Something like this:-
| Code: | SCSI device support
│ < > RAID Transport Class │ │
│ │ -*- SCSI device support │ │
│ │ < > SCSI target support │ │
│ │ [*] legacy /proc/scsi/ support │ │
│ │ *** SCSI support type (disk, tape, CD-ROM) *** │ │
│ │ <*> SCSI disk support │ │
│ │ < > SCSI tape support │ │
│ │ < > SCSI OnStream SC-x0 tape support │ │
│ │ <*> SCSI CDROM support │ │
│ │ [ ] Enable vendor-specific extensions (for SCSI CDROM) │ │
│ │ <*> SCSI generic support │ │
│ │ < > SCSI media changer support │ │
│ │ [*] Probe all LUNs on each SCSI device │ │
│ │ [ ] Verbose SCSI error reporting (kernel size +=12K) │ │
│ │ [ ] SCSI logging facility │ │
│ │ [ ] Asynchronous SCSI scanning │ │
│ │ SCSI Transports ---> │ │
│ │ [ ] SCSI low-level drivers ---> │ │
│ │ < > SCSI Device Handlers ---> │ │
│ │ < > OSD-Initiator library | Thats all the high level SCSI options you need, and the low level drivers on the | Code: | | <*> Serial ATA and Parallel ATA drivers ---> | menu, you need
| Code: | │ │ --- Serial ATA and Parallel ATA drivers │ │
│ │ [ ] Verbose ATA error reporting │ │
│ │ [*] ATA ACPI Support │ │
│ │ [ ] SATA Port Multiplier support │ │
│ │ *** Controllers with non-SFF native interface *** │ │
│ │ <*> AHCI SATA support |
Thats only the top level SCSI and SATA support you need to let the kernel see your hard drive controller. It may or may not be enough for your CDROM too. I need to see all of your lspci output for that.
Or you can ...
Run lspci -k and note the Kernel driver in use for all our your PCI devies. They don't all have or need drivers - thats ok.
In make menuconfig, use the seach to find them all and set them all to * except wifi which needs to be M.
Press / and enter the names you obtained from your lspci -k. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
| Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 30122 Location: 56N 3W
|
Posted: Fri Mar 02, 2012 3:33 pm Post subject: |
|
|
lostinspace2011,
Your email was very detailed. I'm responding here so others may learn from your experiences.
I don't know why the raid devices change numbers. I've had it happen to me when a broken udev update rendered my system unbootable and I had to use a USB stick to sort out the mess.
You need to change your /etc/fstab and grub.conf to match the new numbers.
Your PDF states | Code: | Enabled RAID BIOS on Intel card with drives connected to port 1 and 2 on the
motherboard. | then later | Code: | Create partition layout. Verify type is set to fs (RAID Auto)
| and just below that
When you put your two drives under BIOS raid control, your raid set is made at that time, by the BIOS. You should not then create partitions on your drives and use mdadm to make raid sets from your partitions.
When your donate your drivers to BIOS raid and then partition the resulting raid device, you get devices like /dev/md127p1, /dev/md127p2 and so on. meaning partitiion1 on md127, partition2 on md127 and so on.
When you turn off BIOS raid and make partitions on both your drives, then donate the partitions to raid sets, you get devices like /dev/md127, /dev/md126 notice the lack of partition numbers here.
A detialed example my help your understanding. With two drives you can have two sords of raid. Raid0 and raid1.
When you set up BIOS raid, you donate your drives (the entire drive) to a single raid level. When you partition the BIOS raid devices, each partition gets the raid level of the underlying BIOS raid device.
Whe BIOS raid is not used, you partition your drives identically and when you donate partitions to raid devices, you are free to choose different raid levels for different raid sets.
Your PDF shows you only created partitions on your /dev/sda but this is one of the drives underlying your BIOS raid set. It looks like they also appeared on /dev/sdb too or your | Code: | mdadm --create --verbose /dev/md1 --level=1 -e 0.90 --raid-devices=2 /dev/sda1 /dev/sdb1
mdadm --create --verbose /dev/md2 --level=1 --raid-devices=2 /dev/sda2 /dev/sdb2
mdadm --create --verbose /dev/md3 --level=1 --raid-devices=2 /dev/sda3 /dev/sdb3 | would have failed.
At this point you have BIOS raid running and you have made kernel raid devices on the same set of drives. This is probably a very bad thing - its likely neither will work. It won't harm your hardware.
While we are here, I need to point out the kernel raid autoassembly only works with raid superblock version 0.9. Thats only your /dev/md1 above.
From your | Code: | livecd ~ # cat /proc/mdstat
Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md3 : active raid1 sdb3[1] sda3[0]
972303952 blocks super 1.2 [2/2] [UU] | its clear that your root, on /dev/md3 has a version 1.2 superblock.
You need not set /etc/mdadm.conf in your install as it can't be read until root is mounted and mounting root requires that /dev/md3 be assembled, which has to be done without reading root because root is not yet assembled. yes is a circular dependency. You can either use kernel autoassemble to assemble root or use and initrd. I've already said that autoassembly needs raid superblock version 0.9, so thats out without remaking /dev/md3. That leaves the initrd approach.
Moving on | Code: | (chroot) livecd / # eselect profile list ...
# eselect profile set 1 | chooses the very bare default/linux/amd64/10.0 profile. Thats OK if you want a major learning experience. Your profile tries to set some good defualt USE flags for you. IF you want a desktop Gentoo system
| Code: | | [2] default/linux/amd64/10.0/desktop | is a better choice.
Looking forward I'm going to advise you to start again. I don't know what the effect will be of havng two different sorts of raid set up on the same drives will be. If this is your very first Gentoo install and your really want raid1 I propose the following:-
Turn off BIOS raid - it provides no advantage for Raid0 and Raid1 anyway.
Do a single drive install, following the handbook, when that works the way you like,
Migrate to kernel raid1 (you do not reinstall).
This makes the install standard and you get the feel for Gentoo. When its running, the migration to raid1 process involves replacing a drive in a raid1 set, so you get to practice that before yu have a drive failure and actually need to.
It will take longer than installing straight to raid but the learning experience makes it worth it.
Your kernel .config looks mostly harmless. There is some junk there you don't need but that only costs disk space and compile time. Save it for your reinstall, along with /etc/make.conf and /var/lib/portage/world
Your grub.conf looks worth saving too but it will need to be modified for a single drive boot.
Given a single drive install, the migration process is
Partition your second drive the way you want the raid1 to be.
make degraded raid sets (with one drive missing) on the partitions of the second drive.
make filesystems on the /dev/mdX devices (the kernel knows you have a drive missing but its supposed to work that way)
Boot a liveCD
mount the /dev/mdX filesystem tree at /mnt/gentoo
make a mount point say /mnt/old
mount the singke drive install at /mnt/old the read only option is a good idea here.
cp -a /mnt/old/* /mnt/gentoo
Now you have two identical installs - the original single drive install you started with and a degraded raid1 install.
You need to be able to tell them apart, so
touch /mnt/gentoo/etc/raid1 creates an empty file /etc/raid1
On the raid1 copy, edit /etc/fstab to mount the /dev/mdX devices
edit /grub.conf to mount the root=/dev/mdX root device
Install grub to the MBR of the second drive.
Reboot and go into the BIOS. Set the BIOS to boot from the second drive and allow he boot to contine.
If all is well, you have booted into the degraded raid1 install. Look for /etc/raid1.
If something went wrong, boot from the first drive and fix it.
When the degraded raid1 install works, you can add the drive from the single drive install to the raid1 install to bring it up to strenth.
Its a lot to take in from a single post. I may have glossed over a few points. Feel free to ask more as you go. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
| Back to top |
|
 |
lostinspace2011 Apprentice

Joined: 09 Sep 2005 Posts: 161 Location: UK
|
Posted: Fri Mar 02, 2012 5:24 pm Post subject: |
|
|
Thanks for your help. I left out a step in the documentation
Here is how I transferred the layout from sda to sdb.
Transfer the partition layout from sda to sdb
| Code: | | sfdisk -d /dev/sda | sfdisk --force /dev/sdb |
I have been using Gentoo for some time, just not on this system. I will try a clean installation with the BIOS RAID disabled. |
|
| Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 30122 Location: 56N 3W
|
Posted: Fri Mar 02, 2012 5:39 pm Post subject: |
|
|
lostinspace2011,
That step clarifies things.
No BIOS Raid
Raid Superblock ver 0.9 everywhere. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
| Back to top |
|
 |
lostinspace2011 Apprentice

Joined: 09 Sep 2005 Posts: 161 Location: UK
|
Posted: Sat Mar 03, 2012 3:48 am Post subject: |
|
|
I am setting up a new system. After partitioning /dev/sda, transferring my partition over to /dev/sdb using
| Code: | | sfdisk -d /dev/sda | sfdisk --force /dev/sdb |
And setting up the raid arrays using :
| Code: | mdadm --create --verbose /dev/md1 --assume-clean --level=1 -e 0.90 --raid-devices=2 /dev/sda1 /dev/sdb1
mdadm --create --verbose /dev/md2 --assume-clean --level=1 -e 0.90 --raid-devices=2 /dev/sda2 /dev/sdb2
mdadm --create --verbose /dev/md3 --assume-clean --level=1 -e 0.90 --raid-devices=2 /dev/sda3 /dev/sdb3 |
| Code: | cat /proc/mdstat
Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md3 : active raid1 sdb3[1] sda3[0]
972305024 blocks [2/2] [UU]
md2 : active raid1 sdb2[1] sda2[0]
4194240 blocks [2/2] [UU]
md1 : active raid1 sdb1[1] sda1[0]
262080 blocks [2/2] [UU]
unused devices: <none>
|
Everything seems OK, however if I reboot all the drive names change to :
| Code: | cat /proc/mdstat
Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md125 : active (auto-read-only) raid1 sdb1[1] sda1[0]
262080 blocks [2/2] [UU]
md126 : active (auto-read-only) raid1 sdb2[1] sda2[0]
4194240 blocks [2/2] [UU]
md127 : active (auto-read-only) raid1 sdb3[1] sda3[0]
972305024 blocks [2/2] [UU]
unused devices: <none> |
While this in itself may not be a problem, after I install my OS (Linux of course) I get a kernel panic. I suspect the kernel panic is due to the kernel not finding the partition I specified in grub.conf and fstab (i.e. : /dev/md1|2|3). |
|
| Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 30122 Location: 56N 3W
|
Posted: Sat Mar 03, 2012 5:39 pm Post subject: |
|
|
lostinspace2011,
Assored liveCDs, the gentoo one included seem to permanantly renumber raid sets from 127 down.
It really annoys me as I name them after the partitions donated to them, so md5 is /dev/sd[abcd]5 and so on.
You need to use the new numbers in both grub.con and /etc/fstab.
That all looks good ... apart from the kernel panic, which you seem to understand _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
| Back to top |
|
 |
lostinspace2011 Apprentice

Joined: 09 Sep 2005 Posts: 161 Location: UK
|
Posted: Sun Mar 04, 2012 6:46 am Post subject: |
|
|
One more question. Should I be able to see a valid partition table on /dev/md1/2/3 ?
This is what I get for fdisk -l
| Quote: | livecd ~ # fdisk -l
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x0006d207
Device Boot Start End Blocks Id System
/dev/sda1 2048 526335 262144 fd Linux raid autodetect
/dev/sda2 526336 8914943 4194304 fd Linux raid autodetect
/dev/sda3 8914944 1953525167 972305112 fd Linux raid autodetect
Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x0003672c
Device Boot Start End Blocks Id System
/dev/sdb1 2048 526335 262144 fd Linux raid autodetect
/dev/sdb2 526336 8914943 4194304 fd Linux raid autodetect
/dev/sdb3 8914944 1953525167 972305112 fd Linux raid autodetect
Disk /dev/sdc: 4026 MB, 4026531840 bytes
31 heads, 30 sectors/track, 8456 cylinders, total 7864320 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdc1 8192 7864319 3928064 b W95 FAT32
Disk /dev/md1: 268 MB, 268369920 bytes
2 heads, 4 sectors/track, 65520 cylinders, total 524160 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000
Disk /dev/md1 doesn't contain a valid partition table
Disk /dev/md2: 4294 MB, 4294901760 bytes
2 heads, 4 sectors/track, 1048560 cylinders, total 8388480 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000
Disk /dev/md2 doesn't contain a valid partition table
Disk /dev/md3: 995.6 GB, 995640344576 bytes
2 heads, 4 sectors/track, 243076256 cylinders, total 1944610048 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0xff4402a4
Disk /dev/md3 doesn't contain a valid partition table |
Does that seem correct ? |
|
| Back to top |
|
 |
lostinspace2011 Apprentice

Joined: 09 Sep 2005 Posts: 161 Location: UK
|
|
| Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 30122 Location: 56N 3W
|
Posted: Sun Mar 04, 2012 2:08 pm Post subject: |
|
|
lostinspace2011,
All things in linux are files. A block device, like a disk is a file of blocks.
A keyboard if a file of characters (which can only be read), a printer is a file of characters (which can only be written)
OK, you can write the status lights on a keyboard and read the out of paper/ink status on your printer ... but you get the idea.
When you donate two files of blocks to a Multiple Device md127 file, you make another type of block device file.
You understand how fdisk /dev/sda works - you have used it.
You can (but don't) make partitions on a raid device with fdisk /dev/md127 you didn't do this, so there is no patition table on this block device.
For completness, you can also pile raid devices up. That is, donate raid devices to raid devices. This is nomally used to put two raid1 devices into raid0 (or is it the other way round?
However, the kernel now has a raid10 driver for this sort of thing. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|