FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 06-28-2008, 12:02 PM
Florian Philipp
 
Default DMRAID and complex setups

Hi list!

I a PC of mine I've got two 160GB and a 320GB disk. I'd like to create a
JBOD (a.k.a. Concatenation) of the two 160GB disks and create a RAID1
out of that JBOD and the 320GB disk. Can dmraid / mdadm handle such
setups? Is there anything I have to take care of? Would a mixed setup
of fake-RAID (NVidia MoBo-controller) and Linux softRAID fare better?

Thanks in advance!

Florian Philipp
 
Old 06-28-2008, 07:24 PM
Daniel Iliev
 
Default DMRAID and complex setups

On Sat, 28 Jun 2008 14:02:23 +0200
Florian Philipp <lists@f_philipp.fastmail.net> wrote:

> Hi list!
>
> I a PC of mine I've got two 160GB and a 320GB disk. I'd like to
> create a JBOD (a.k.a. Concatenation) of the two 160GB disks and
> create a RAID1 out of that JBOD and the 320GB disk. Can dmraid /
> mdadm handle such setups? Is there anything I have to take care of?
> Would a mixed setup of fake-RAID (NVidia MoBo-controller) and Linux
> softRAID fare better?
>
> Thanks in advance!
>
> Florian Philipp


Hi,

Never tried this myself but I think you should have no problems with
mdadm. AFAIK JBOD is called "linear mode" in kernel and mdadm terms.
Given that you have compiled the necessary modules you'll have to do
something like:

mdadm --create /dev/md0 --level=linear --raid-devices=2 /dev/sd{a,b}1
mdadm --create /dev/md0 --level=mirror --raid-devices=2 /dev/{md0,sdc}


HTH

--
Best regards,
Daniel
--
gentoo-user@lists.gentoo.org mailing list
 
Old 07-05-2008, 03:28 PM
Florian Philipp
 
Default DMRAID and complex setups

On Sat, 28 Jun 2008 22:24:46 +0300
Daniel Iliev <daniel.iliev@gmail.com> wrote:

> On Sat, 28 Jun 2008 14:02:23 +0200
> Florian Philipp <lists@f_philipp.fastmail.net> wrote:
>
> > Hi list!
> >
> > I a PC of mine I've got two 160GB and a 320GB disk. I'd like to
> > create a JBOD (a.k.a. Concatenation) of the two 160GB disks and
> > create a RAID1 out of that JBOD and the 320GB disk. Can dmraid /
> > mdadm handle such setups? Is there anything I have to take care of?
> > Would a mixed setup of fake-RAID (NVidia MoBo-controller) and Linux
> > softRAID fare better?
> >
> > Thanks in advance!
> >
> > Florian Philipp
>
>
> Hi,
>
> Never tried this myself but I think you should have no problems with
> mdadm. AFAIK JBOD is called "linear mode" in kernel and mdadm terms.
> Given that you have compiled the necessary modules you'll have to do
> something like:
>
> mdadm --create /dev/md0 --level=linear --raid-devices=2 /dev/sd{a,b}1
> mdadm --create /dev/md0 --level=mirror --raid-devices=2 /dev/{md0,sdc}
>
>
> HTH
>
Just a small update: No, it does not work. At bootup the RAID1 is
created but with only the single disk.

I'm now thinking about my options:
a) Never reboot
b) Put "mdadm -I /dev/md0" into /etc/conf.d/local.start
c) Use LVM for mirroring

Neither b nor c are very pleasant:
b) gives me 37 minutes with high disk activity and no working RAID;
c) doesn't allow online resizing (AFAIK) but there are workarounds
(degrading to linear -> resizing -> upgrading to mirror; unpleasant,
but working).

At least there is some hope that the issue with c) will be solved in a
future version.

However, there might be other options:

- Could I disable the kernel auto-detection and instead add a custom
init-script prior to checkfs and localmount?

- Baselayout2 uses an init-script for mdraid. Does that mean it doesn't
rely on kernel auto-detection? If so, could it work with baselayout2 or
at least, would it be easier to get it working?
 
Old 07-06-2008, 09:03 AM
Francesco Talamona
 
Default DMRAID and complex setups

On Saturday 05 July 2008, Florian Philipp wrote:
> - Could I disable the kernel auto-detection and instead add a custom
> init-script prior to checkfs and localmount?

It's impractical, check carefully all partitions with

mdadm -E <partition>

If it's not automatically assembled but you can do it manually, it means
something is fooling mdadm.

Try also to comment ARRAY lines in /etc/mdadm.conf.

HTH
Francesco

--
Linux Version 2.6.25-gentoo-r6, Compiled #1 PREEMPT Sat Jul 5 18:06:28
CEST 2008
One 2.2GHz AMD Athlon 64 Processor, 2GB RAM, 4408.92 Bogomips Total
aemaeth
--
gentoo-user@lists.gentoo.org mailing list
 
Old 07-06-2008, 09:32 AM
Florian Philipp
 
Default DMRAID and complex setups

On Sun, 6 Jul 2008 11:03:45 +0200
Francesco Talamona <ti.liame@email.it> wrote:

> On Saturday 05 July 2008, Florian Philipp wrote:
> > - Could I disable the kernel auto-detection and instead add a custom
> > init-script prior to checkfs and localmount?
>
> It's impractical, check carefully all partitions with
>
> mdadm -E <partition>
>
> If it's not automatically assembled but you can do it manually, it
> means something is fooling mdadm.
>
> Try also to comment ARRAY lines in /etc/mdadm.conf.
>
> HTH
> Francesco
>
What actually happens is that the kernel starts md1 (consisting of md0
and hdd7) BEFORE md0 (hda and hdb) is created. The most likely cause is
that the kernel starts its autodetection on the disk where /
(or /boot?) lie.

mdadm.conf has the following lines:

DEVICE /dev/hda1 /dev/hdb1
DEVICE /dev/md0 /dev/hdd7

ARRAY /dev/md0 devices=/dev/hda1,/dev/hdb1
ARRAY /dev/md1 devices=/dev/md0,/dev/hdd7

Since I can add kernel parameters for starting raids
(see /usr/src/linux/Documentation/md.txt) I'm thinking about telling
the kernel explicitly to start md0 in the hope that this happens
before autodetection.

Stay tuned
 
Old 07-06-2008, 10:58 AM
Florian Philipp
 
Default DMRAID and complex setups

On Sun, 6 Jul 2008 11:32:36 +0200
Florian Philipp <lists@f_philipp.fastmail.net> wrote:

> On Sun, 6 Jul 2008 11:03:45 +0200
> Francesco Talamona <ti.liame@email.it> wrote:
>
> > On Saturday 05 July 2008, Florian Philipp wrote:
> > > - Could I disable the kernel auto-detection and instead add a
> > > custom init-script prior to checkfs and localmount?
> >
> > It's impractical, check carefully all partitions with
> >
> > mdadm -E <partition>
> >
> > If it's not automatically assembled but you can do it manually, it
> > means something is fooling mdadm.
> >
> > Try also to comment ARRAY lines in /etc/mdadm.conf.
> >
> > HTH
> > Francesco
> >
> What actually happens is that the kernel starts md1 (consisting of
> md0 and hdd7) BEFORE md0 (hda and hdb) is created. The most likely
> cause is that the kernel starts its autodetection on the disk where /
> (or /boot?) lie.
>
> mdadm.conf has the following lines:
>
> DEVICE /dev/hda1 /dev/hdb1
> DEVICE /dev/md0 /dev/hdd7
>
> ARRAY /dev/md0 devices=/dev/hda1,/dev/hdb1
> ARRAY /dev/md1 devices=/dev/md0,/dev/hdd7
>
> Since I can add kernel parameters for starting raids
> (see /usr/src/linux/Documentation/md.txt) I'm thinking about telling
> the kernel explicitly to start md0 in the hope that this happens
> before autodetection.
>
> Stay tuned
>

Eureka!

The kernel boot-parameter
raid=noautodetect md=0,/dev/hda1,/dev/hdb1 md=1,/dev/hdd7,/dev/md0

seem to work. Now the raids are built in the right order.
 
Old 07-06-2008, 11:02 AM
Daniel Iliev
 
Default DMRAID and complex setups

On Sun, 6 Jul 2008 11:32:36 +0200
Florian Philipp <lists@f_philipp.fastmail.net> wrote:

> On Sun, 6 Jul 2008 11:03:45 +0200
> Francesco Talamona <ti.liame@email.it> wrote:
>
> > On Saturday 05 July 2008, Florian Philipp wrote:
> > > - Could I disable the kernel auto-detection and instead add a
> > > custom init-script prior to checkfs and localmount?
> >
> > It's impractical, check carefully all partitions with
> >
> > mdadm -E <partition>
> >
> > If it's not automatically assembled but you can do it manually, it
> > means something is fooling mdadm.
> >
> > Try also to comment ARRAY lines in /etc/mdadm.conf.
> >
> > HTH
> > Francesco
> >
> What actually happens is that the kernel starts md1 (consisting of
> md0 and hdd7) BEFORE md0 (hda and hdb) is created. The most likely
> cause is that the kernel starts its autodetection on the disk where /
> (or /boot?) lie.
>
> mdadm.conf has the following lines:
>
> DEVICE /dev/hda1 /dev/hdb1
> DEVICE /dev/md0 /dev/hdd7
>
> ARRAY /dev/md0 devices=/dev/hda1,/dev/hdb1
> ARRAY /dev/md1 devices=/dev/md0,/dev/hdd7
>
> Since I can add kernel parameters for starting raids
> (see /usr/src/linux/Documentation/md.txt) I'm thinking about telling
> the kernel explicitly to start md0 in the hope that this happens
> before autodetection.
>
> Stay tuned
>

You could also try something like this in local.start:


mdadm --stop /dev/md0
mdadm --stop /dev/md1

mdadm -A /dev/md0 --uuid <the UUID of md0> -c partitions
mdadm -A /dev/md1 --uuid <the UUID of md1> -c partitions


--
Best regards,
Daniel
--
gentoo-user@lists.gentoo.org mailing list
 
Old 07-06-2008, 11:22 AM
Florian Philipp
 
Default DMRAID and complex setups

On Sun, 6 Jul 2008 14:02:14 +0300
Daniel Iliev <daniel.iliev@gmail.com> wrote:

> On Sun, 6 Jul 2008 11:32:36 +0200
> Florian Philipp <lists@f_philipp.fastmail.net> wrote:
>
> > On Sun, 6 Jul 2008 11:03:45 +0200
> > Francesco Talamona <ti.liame@email.it> wrote:
> >
> > > On Saturday 05 July 2008, Florian Philipp wrote:
> > > > - Could I disable the kernel auto-detection and instead add a
> > > > custom init-script prior to checkfs and localmount?
> > >
> > > It's impractical, check carefully all partitions with
> > >
> > > mdadm -E <partition>
> > >
> > > If it's not automatically assembled but you can do it manually, it
> > > means something is fooling mdadm.
> > >
> > > Try also to comment ARRAY lines in /etc/mdadm.conf.
> > >
> > > HTH
> > > Francesco
> > >
> > What actually happens is that the kernel starts md1 (consisting of
> > md0 and hdd7) BEFORE md0 (hda and hdb) is created. The most likely
> > cause is that the kernel starts its autodetection on the disk
> > where / (or /boot?) lie.
> >
> > mdadm.conf has the following lines:
> >
> > DEVICE /dev/hda1 /dev/hdb1
> > DEVICE /dev/md0 /dev/hdd7
> >
> > ARRAY /dev/md0 devices=/dev/hda1,/dev/hdb1
> > ARRAY /dev/md1 devices=/dev/md0,/dev/hdd7
> >
> > Since I can add kernel parameters for starting raids
> > (see /usr/src/linux/Documentation/md.txt) I'm thinking about telling
> > the kernel explicitly to start md0 in the hope that this happens
> > before autodetection.
> >
> > Stay tuned
> >
>
> You could also try something like this in local.start:
>
>
> mdadm --stop /dev/md0
> mdadm --stop /dev/md1
>
> mdadm -A /dev/md0 --uuid <the UUID of md0> -c partitions
> mdadm -A /dev/md1 --uuid <the UUID of md1> -c partitions
>
>

It would not have been that easy because at that point, there would
be an active lvm volume group on that raid and because the raid would
already have been assembled it would need a resync after the next
complete assembly.
 

Thread Tools




All times are GMT. The time now is 09:59 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org