LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Slackware64 13.1 raid-0 system (https://www.linuxquestions.org/questions/slackware-14/slackware64-13-1-raid-0-system-859765/)

mlpa 01-31-2011 07:56 AM

Slackware64 13.1 raid-0 system
 
Hi, I have a new computer with 3 disks connected in a raid-0 system with two arrays. I create the arrays using Intel (Intel Rapid Storage Technology) utility, press crtl+I during boot.

I install windows without a problem, is running just fine.
I install Slackware64 -current in a device named /dev/md126p5 and it went well.

My problem was with installing Lilo. It gave me a raid fatal error.

I'm I doing something wrong?

Darth Vader 01-31-2011 10:46 AM

You should use a RAID1 partition, with metadata version 0.90, for the /boot partition. LILO and GRUB can work only in those RAID1 partitions.

mlpa 01-31-2011 11:13 AM

Thanks for the reply, but the main idea for my system is to have a greater performance.
Create a array raid1 was not in my idea.

I have search for information about raid and Linux, can some share experience.
For instance I think that my raid system is a firmware raid.
But there exists software raid and hardware raid.

In Intel page its said to use the intel program at boot to create the arrays and Linux using mdadm will support the arrays.

But in some wikis like Linux Raid, Gentoo Software Raid and Gentoo Bios Raid have different methods.

What is best software raid or bios raid?

Darth Vader 01-31-2011 11:27 AM

Like I said, you need a little (1-4GB) RAID1 partition, mounted on /boot, and LILO installed on this partition, to be able to successfully boot your RAID0/RAID10/RAID5 partition and operating system.

As final note, LILO and GRUB can boot ONLY from a RAID1 partition.

mlpa 01-31-2011 03:01 PM

There is some reason for that? Here can I find information about lilo and raid?
Here in this page I have information about lilo and raid1.

It's needed to have the two drivers specified in lilo. Can't I pass /dev/mdxxx?

And the other question is best software Raid or bios fake Raid?

I supposed that the chipset raid could have a higher performance.

mRgOBLIN 01-31-2011 03:57 PM

You'll need am mdadm version 3.x.x for this support.

Software raid works very well and from my experience actually works better than BIOS level (Not pure hardware) RAID.
BIOS level raid is probably the best option if you need to share data between your Linux and Windows partitions.

This thread should interest you.

http://www.linuxquestions.org/questi...anager-807930/

Darth Vader 01-31-2011 03:57 PM

1. There is some reason for that?

Yes. LILO don't known how to assemble the raid devices from fake RAID or software RAID. LILO is not a kernel with device drivers, only a bootloader and work in REAL MODE, like old good MS-DOS.

The RAID1 is a special case, because every partition used is a identical copy. Really, LILO see only the /dev/sda1 or /dev/sdb1, depending which device is booted.

2. Here can I find information about lilo and raid?

How about README_RAID.TXT from Slackware installation kit? :D

3. And the other question is best software Raid or bios fake Raid?

Technically, the Linux software RAID always get best performances than the BIOS fake RAIDs. And it is more versatile. Of course, the best results have the Hardware RAID, with dedicated raid cards.

Here you have my /etc/lilo.conf, used to boot a partitionable RAID0 array, using a RAID1 partition for /boot.

Code:

# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section

lba32 # Allow booting past 1024th cylinder with a recent BIOS

# Append any additional kernel parameters:
append="console=tty1 vt.default_utf8=1 video=1280x1024-24@60.0"

boot = /dev/md0

map = /boot/boot.map

raid-extra-boot = mbr

# default = Linux-generic

# Boot BMP Image.
# Bitmap in BMP format: 640x480x8
#bitmap = /boot/slack.bmp
# Menu colors (foreground, background, shadow, highlighted
# foreground, highlighted background, highlighted shadow):
#bmp-colors = 255,0,255,0,255,0
# Location of the option table: location x, location y, number of
# columns, lines per column (max 15), "spill" (this is how many
# entries must be in the first column before the next begins to
# be used. We don't specify it here, as there's just one column.
#bmp-table = 60,6,1,16
# Timer location x, timer location y, foreground color,
# background color, shadow color.
#bmp-timer = 65,27,0,255

# Standard menu.
# Or, you can comment out the bitmap menu above and
# use a boot message with the standard menu:
message = /boot/boot_message.txt

# Wait until the timeout to boot (if commented out, boot the
# first entry immediately):
prompt

# Timeout before the first entry boots.
# This is given in tenths of a second, so 600 for every minute:
timeout = 100

# Override dangerous defaults that rewrite the partition table:
change-rules
reset

# VESA framebuffer console @ 1280x1024x64k
vga=794

# Normal VGA console
# vga = normal
# VESA framebuffer console @ 1024x768x64k
# vga=791
# VESA framebuffer console @ 1024x768x32k
# vga=790
# VESA framebuffer console @ 1024x768x256
# vga=773
# VESA framebuffer console @ 800x600x64k
# vga=788
# VESA framebuffer console @ 800x600x32k
# vga=787
# VESA framebuffer console @ 800x600x256
# vga=771
# VESA framebuffer console @ 640x480x64k
# vga=785
# VESA framebuffer console @ 640x480x32k
# vga=784
# VESA framebuffer console @ 640x480x256
# vga=769

# End LILO global section

# Linux bootable partition config begins
image = /boot/vmlinuz-2.6.37-bigmem64
    root = /dev/md1p1
    label = LX2.6.37-BM64
    initrd = /boot/initrd-2.6.37-bigmem64.gz
read-only
# Linux bootable partition config ends

# Linux bootable partition config begins
image = /boot/vmlinuz-2.6.36.3-bigmem64
    root = /dev/md1p1
    label = LX2.6.36.3-BM64
    initrd = /boot/initrd-2.6.36.3-bigmem64.gz
read-only
# Linux bootable partition config ends

# Linux bootable partition config begins
image = /boot/vmlinuz-generic-smp-2.6.35.10-smp
    root = /dev/md1p1
    label = Linux-generic
    initrd = /boot/initrd-2.6.35.10-smp.gz
read-only
# Linux bootable partition config ends

In my setup using Software RAID, /dev/md0 is the RAID1 array, using the 0.90 metadata version, and /dev/md1 is the partitionable RAID0 array, using 1.2 metadata version. Of course, /dev/md1p1 is 1st partition from the partitionable array.

Also, I use an initrd to assemble the RAID arrays, before the real system boot.

mostlyharmless 01-31-2011 04:35 PM

Grub, unlike LILO, can use a RAID0 array to boot, you'll need an initrd to setup the array though. In fact, I have Slackware 13.1 dual booting with WinXP off of such an array.

mlpa 01-31-2011 05:19 PM

Quote:

Originally Posted by Darth Vader (Post 4243915)
1. There is some reason for that?

Yes. LILO don't known how to assemble the raid devices from fake RAID or software RAID. LILO is not a kernel with device drivers, only a bootloader and work in REAL MODE, like old good MS-DOS.

The RAID1 is a special case, because every partition used is a identical copy. Really, LILO see only the /dev/sda1 or /dev/sdb1, depending which device is booted.

2. Here can I find information about lilo and raid?

How about README_RAID.TXT from Slackware installation kit? :D

3. And the other question is best software Raid or bios fake Raid?

Technically, the Linux software RAID always get best performances than the BIOS fake RAIDs. And it is more versatile. Of course, the best results have the Hardware RAID, with dedicated raid cards.

Here you have my /etc/lilo.conf, used to boot a partitionable RAID0 array, using a RAID1 partition for /boot.

Code:

# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section

lba32 # Allow booting past 1024th cylinder with a recent BIOS

# Append any additional kernel parameters:
append="console=tty1 vt.default_utf8=1 video=1280x1024-24@60.0"

boot = /dev/md0

map = /boot/boot.map

raid-extra-boot = mbr

# default = Linux-generic

# Boot BMP Image.
# Bitmap in BMP format: 640x480x8
#bitmap = /boot/slack.bmp
# Menu colors (foreground, background, shadow, highlighted
# foreground, highlighted background, highlighted shadow):
#bmp-colors = 255,0,255,0,255,0
# Location of the option table: location x, location y, number of
# columns, lines per column (max 15), "spill" (this is how many
# entries must be in the first column before the next begins to
# be used. We don't specify it here, as there's just one column.
#bmp-table = 60,6,1,16
# Timer location x, timer location y, foreground color,
# background color, shadow color.
#bmp-timer = 65,27,0,255

# Standard menu.
# Or, you can comment out the bitmap menu above and
# use a boot message with the standard menu:
message = /boot/boot_message.txt

# Wait until the timeout to boot (if commented out, boot the
# first entry immediately):
prompt

# Timeout before the first entry boots.
# This is given in tenths of a second, so 600 for every minute:
timeout = 100

# Override dangerous defaults that rewrite the partition table:
change-rules
reset

# VESA framebuffer console @ 1280x1024x64k
vga=794

# Normal VGA console
# vga = normal
# VESA framebuffer console @ 1024x768x64k
# vga=791
# VESA framebuffer console @ 1024x768x32k
# vga=790
# VESA framebuffer console @ 1024x768x256
# vga=773
# VESA framebuffer console @ 800x600x64k
# vga=788
# VESA framebuffer console @ 800x600x32k
# vga=787
# VESA framebuffer console @ 800x600x256
# vga=771
# VESA framebuffer console @ 640x480x64k
# vga=785
# VESA framebuffer console @ 640x480x32k
# vga=784
# VESA framebuffer console @ 640x480x256
# vga=769

# End LILO global section

# Linux bootable partition config begins
image = /boot/vmlinuz-2.6.37-bigmem64
    root = /dev/md1p1
    label = LX2.6.37-BM64
    initrd = /boot/initrd-2.6.37-bigmem64.gz
read-only
# Linux bootable partition config ends

# Linux bootable partition config begins
image = /boot/vmlinuz-2.6.36.3-bigmem64
    root = /dev/md1p1
    label = LX2.6.36.3-BM64
    initrd = /boot/initrd-2.6.36.3-bigmem64.gz
read-only
# Linux bootable partition config ends

# Linux bootable partition config begins
image = /boot/vmlinuz-generic-smp-2.6.35.10-smp
    root = /dev/md1p1
    label = Linux-generic
    initrd = /boot/initrd-2.6.35.10-smp.gz
read-only
# Linux bootable partition config ends

In my setup using Software RAID, /dev/md0 is the RAID1 array, using the 0.90 metadata version, and /dev/md1 is the partitionable RAID0 array, using 1.2 metadata version. Of course, /dev/md1p1 is 1st partition from the partitionable array.

Also, I use an initrd to assemble the RAID arrays, before the real system boot.

Like I'm using fake raid, do I need a initrd special?

And another question. I have 3 disk. One array and two volumes with Raid0.
Can I make another volume with raid1 with the same disks?

Darth Vader 01-31-2011 05:25 PM

Quote:

Originally Posted by mlpa (Post 4243984)
Like I'm using fake raid, do I need a initrd special?

Yup! Of course you need a initrd, to assemble the arrays before the real system boot on your RAID0.

Here is a little script, mkinitrd-2.6.35.10-smp.sh, used by me, to generate a properly initrd.

Code:

#!/bin/sh

KVERSION=2.6.35.10-smp
ROOTFS=ext4
ROOTDEV=/dev/md1p1

mkinitrd -c -u -R -k $KVERSION -f $ROOTFS -r $ROOTDEV -m jbd2:mbcache:ext4 -o /boot/initrd-$KVERSION.gz


mlpa 01-31-2011 05:50 PM

And for the other question, I know anything that can help?

mlpa 02-01-2011 06:59 PM

Quote:

Originally Posted by Darth Vader (Post 4243989)
Yup! Of course you need a initrd, to assemble the arrays before the real system boot on your RAID0.

Here is a little script, mkinitrd-2.6.35.10-smp.sh, used by me, to generate a properly initrd.

Code:

#!/bin/sh

KVERSION=2.6.35.10-smp
ROOTFS=ext4
ROOTDEV=/dev/md1p1

mkinitrd -c -u -R -k $KVERSION -f $ROOTFS -r $ROOTDEV -m jbd2:mbcache:ext4 -o /boot/initrd-$KVERSION.gz


Just one question, I have software raid or fake raid?

mlpa 02-01-2011 07:01 PM

Quote:

Originally Posted by mostlyharmless (Post 4243951)
Grub, unlike LILO, can use a RAID0 array to boot, you'll need an initrd to setup the array though. In fact, I have Slackware 13.1 dual booting with WinXP off of such an array.

Can you confirm that this tutorial is close to what you have?

mostlyharmless 02-02-2011 07:56 AM

Close enough, but I'm running Slackware so the procedure to set it up is different, and I had Windows installed first. Once it's setup, it's relatively easy to change distro. I had Slackware 12.1 when I set it up, tried OpenSUSE 11.3 and now am on Slackware 13.1; I didn't have to repartition, or reinstall Windows...

mlpa 02-02-2011 08:55 AM

Quote:

Originally Posted by mostlyharmless (Post 4245790)
Close enough, but I'm running Slackware so the procedure to set it up is different, and I had Windows installed first. Once it's setup, it's relatively easy to change distro. I had Slackware 12.1 when I set it up, tried OpenSUSE 11.3 and now am on Slackware 13.1; I didn't have to repartition, or reinstall Windows...

Can you share your method?

mostlyharmless 02-02-2011 10:35 AM

Sure, although if you go to "search" on this forum and type "slackware raid dmraid" you will get some excellent step by step explanations, mostly by Erik_FL. There are a number of them going back quite some time.

I should mention that I mirror my RAID0 array with another disk, so that I actually dual boot Windows and Slackware on a mirror composed of a 320G disk and a RAID0 array composed of two 160G disks. Both mirrors have an MBR with a copy of GRUB, and the BIOS can boot either one. Both mirrors have three identical partitions: a Windows partition, a boot partition and an encrypted LUKS partition which contains swap and / using LVM for Slackware. Slackware uses dmraid in an initrd to initialize the RAID0 array, then mdadm to setup the mirror. Windows uses a driver to recognize the RAID0 array, then uses "Dynamic Disks" (LDM, not to be confused with Linux's LVM) to mirror the RAID0 drive to the other 320G drive.

It is, in fact, easiest to set up the whole RAID0 array if you have another disk to install from, rather than having to use the live CD. If you use a live CD, you'll have to have another place, a zip drive, or USB thumb drive (or floppy!) to store your boot files until you're ready to go. In my case, I installed on the regular disk first, then used sfdisk to copy over to the RAID0 array, resynced the mirrors and voila! You don't have to do it that way.

The Slackware help files detail how to setup RAID and LVM with encryption, using the mkinitrd script as shown in the above posts. All you have to do, in addition, is go into the /boot/initrd-tree directory after generating the initrd, modify the file "init" so that you have "dmraid -ay" near the beginning of the file. You will have to provide a copy of "dmraid" in /boot/initrd-tree/sbin with the necessary librairies (or make a statically linked version) and then re-run "mkinitrd" without any parameters. You can also modify the initrd to search for the LUKS key on a floppy, zip or USB drive or prompt you if there isn't one present.

mlpa 02-02-2011 12:24 PM

Quote:

Originally Posted by mostlyharmless (Post 4245986)
Sure, although if you go to "search" on this forum and type "slackware raid dmraid" you will get some excellent step by step explanations, mostly by Erik_FL. There are a number of them going back quite some time.

I should mention that I mirror my RAID0 array with another disk, so that I actually dual boot Windows and Slackware on a mirror composed of a 320G disk and a RAID0 array composed of two 160G disks. Both mirrors have an MBR with a copy of GRUB, and the BIOS can boot either one. Both mirrors have three identical partitions: a Windows partition, a boot partition and an encrypted LUKS partition which contains swap and / using LVM for Slackware. Slackware uses dmraid in an initrd to initialize the RAID0 array, then mdadm to setup the mirror. Windows uses a driver to recognize the RAID0 array, then uses "Dynamic Disks" (LDM, not to be confused with Linux's LVM) to mirror the RAID0 drive to the other 320G drive.

It is, in fact, easiest to set up the whole RAID0 array if you have another disk to install from, rather than having to use the live CD. If you use a live CD, you'll have to have another place, a zip drive, or USB thumb drive (or floppy!) to store your boot files until you're ready to go. In my case, I installed on the regular disk first, then used sfdisk to copy over to the RAID0 array, resynced the mirrors and voila! You don't have to do it that way.

The Slackware help files detail how to setup RAID and LVM with encryption, using the mkinitrd script as shown in the above posts. All you have to do, in addition, is go into the /boot/initrd-tree directory after generating the initrd, modify the file "init" so that you have "dmraid -ay" near the beginning of the file. You will have to provide a copy of "dmraid" in /boot/initrd-tree/sbin with the necessary librairies (or make a statically linked version) and then re-run "mkinitrd" without any parameters. You can also modify the initrd to search for the LUKS key on a floppy, zip or USB drive or prompt you if there isn't one present.

I think that you miss one point. I use fake raid and I think that during install the driver used was mdadm.
I have Windows already installed in a array Raid0.

This is new to me.

mostlyharmless 02-02-2011 02:04 PM

You can use mdadm instead of dmraid in your initrd if you want. Mdadm 3.0 supports fakeraid for some chipsets. Did you look at the thread suggested by mRgoBlin? Windows uses it's own driver for each manufacturer; it doesn't matter about that.

mlpa 02-02-2011 02:44 PM

Yeah I read the post, and like I'm using slackware64 -current with the latest mdadm it mount and install fine. My problem is the bootloader :(

mostlyharmless 02-02-2011 04:28 PM

Grub 0.97 used to be in /extra, or you can find it anywhere, patch it to make splash screens, read dynamic disks, make a pot of coffee, etc. You only have to install it once.

caduqued 04-30-2011 06:49 PM

Quote:

Originally Posted by Darth Vader (Post 4243989)
Yup! Of course you need a initrd, to assemble the arrays before the real system boot on your RAID0.

Here is a little script, mkinitrd-2.6.35.10-smp.sh, used by me, to generate a properly initrd.

Code:

#!/bin/sh

KVERSION=2.6.35.10-smp
ROOTFS=ext4
ROOTDEV=/dev/md1p1

mkinitrd -c -u -R -k $KVERSION -f $ROOTFS -r $ROOTDEV -m jbd2:mbcache:ext4 -o /boot/initrd-$KVERSION.gz




Hi Mr. Vader,

Thanks a lot for this info. Using your script I was able to set-up finally my RAID 0 Slackware 13.37... Thanks a lot.

mRgOBLIN 04-30-2011 07:05 PM

There is also /usr/share/mkinitrd/mkinitrd_command_generator.sh that is able to generate a suitable initrd command or initrd.conf that you might find useful.

slkrover 05-01-2011 11:56 AM

The best way I found was to run the 3 hdd raid-0 with windows and then install virtualbox and run slack from it. I dont like it but it gets the performance I want without all the driver install.

caduqued 05-02-2011 03:57 AM

Well,

In my case I am running full slackware using (mainly) RAID 0. I only followed the instructions at README_RAID.txt that came with the Slackware ISO, and to make the initrd as per this thread... and that was all.

/boot: RAID 1
/ : RAID 0
swap : RAID 1

And my machine is working flawlessly ;)


All times are GMT -5. The time now is 10:36 PM.