public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* ataraid in 2.6.?
@ 2003-12-29  0:09 Nicklas Bondesson
  2003-12-29  9:49 ` Arjan van de Ven
  0 siblings, 1 reply; 11+ messages in thread
From: Nicklas Bondesson @ 2003-12-29  0:09 UTC (permalink / raw)
  To: linux-kernel

Hi!

Is the ataraid framework planned to be ported to 2.6.x? If so, when could
one expect it?

/Nicke


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: ataraid in 2.6.?
  2003-12-29  0:09 ataraid in 2.6.? Nicklas Bondesson
@ 2003-12-29  9:49 ` Arjan van de Ven
  2003-12-29 12:59   ` Nicklas Bondesson
  2003-12-29 17:08   ` Christophe Saout
  0 siblings, 2 replies; 11+ messages in thread
From: Arjan van de Ven @ 2003-12-29  9:49 UTC (permalink / raw)
  To: Nicklas Bondesson; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 355 bytes --]

On Mon, 2003-12-29 at 01:09, Nicklas Bondesson wrote:
> Hi!
> 
> Is the ataraid framework planned to be ported to 2.6.x? If so, when could
> one expect it?

the plan is to have a userspace device mapper app take it's place.
As for the timeframe; I'm looking at it but the userspace device mapper
code is still a bit of a mystory to me right now.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: ataraid in 2.6.?
  2003-12-29  9:49 ` Arjan van de Ven
@ 2003-12-29 12:59   ` Nicklas Bondesson
  2003-12-29 17:08   ` Christophe Saout
  1 sibling, 0 replies; 11+ messages in thread
From: Nicklas Bondesson @ 2003-12-29 12:59 UTC (permalink / raw)
  To: arjanv; +Cc: linux-kernel

Ok, so the ataraid framework will not be ported at all tp 2.6.x, it will be
replaced with a device mapper?

Where could one read more about the device mapper?

I'm currently running RAID1 using ataraid on a Promise TX2000 card using the
2.4.23 kernel (patched with Walt H's pdcraid patch set to the list
yesterday).

/Nicke

-----Original Message-----
From: linux-kernel-owner@vger.kernel.org
[mailto:linux-kernel-owner@vger.kernel.org] On Behalf Of Arjan van de Ven
Sent: den 29 december 2003 10:49
To: Nicklas Bondesson
Cc: linux-kernel@vger.kernel.org
Subject: Re: ataraid in 2.6.?

On Mon, 2003-12-29 at 01:09, Nicklas Bondesson wrote:
> Hi!
> 
> Is the ataraid framework planned to be ported to 2.6.x? If so, when 
> could one expect it?

the plan is to have a userspace device mapper app take it's place.
As for the timeframe; I'm looking at it but the userspace device mapper code
is still a bit of a mystory to me right now.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: ataraid in 2.6.?
  2003-12-29  9:49 ` Arjan van de Ven
  2003-12-29 12:59   ` Nicklas Bondesson
@ 2003-12-29 17:08   ` Christophe Saout
  2003-12-29 17:17     ` Arjan van de Ven
                       ` (2 more replies)
  1 sibling, 3 replies; 11+ messages in thread
From: Christophe Saout @ 2003-12-29 17:08 UTC (permalink / raw)
  To: arjanv; +Cc: Nicklas Bondesson, linux-kernel

Am Mo, den 29.12.2003 schrieb Arjan van de Ven um 10:49:
>
> the plan is to have a userspace device mapper app take it's place.
> As for the timeframe; I'm looking at it but the userspace device mapper
> code is still a bit of a mystory to me right now.

It is? I think it's kind of simple (probably, if you know what's going
on ;)). Which interface are you looking it?

I'm just looking at the ataraid code. Is my assumption correct, that it
simply interleaves sectors between two harddisks? Even sector number ->
hd1, odd number -> hd2?

Using the simple dmsetup tool one could try something like:

echo 0 $(expr $(blockdev --getsize /dev/<HD1>) \* 2) stripe 2 1
/dev/<HD1> 0 /dev/<HD2> 0 | dmsetup create ataraid

Where <HD1> and <HD2> should of course be replaced by the raw disks.

If everything is correct a device /dev/mapper/ataraid should be created.

Using libdevmapper something like:
dm_task_create(DM_DEVICE_CREATE)
dm_task_task_set_name (required)
dm_task_set_uuid (optional)
dm_task_add_target (only once in this case, contains the stripe target)
dm_task_set_ro (if readonly)
dm_task_set_major / _minor (if you don't want a dynamically allocated)
dm_task_run

--
Christophe Saout <christophe@saout.de>
Please avoid sending me Word or PowerPoint attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: ataraid in 2.6.?
  2003-12-29 17:08   ` Christophe Saout
@ 2003-12-29 17:17     ` Arjan van de Ven
  2003-12-29 17:27     ` Nicklas Bondesson
       [not found]     ` <200312291727.hBTHRDA13745@mx1.redhat.com>
  2 siblings, 0 replies; 11+ messages in thread
From: Arjan van de Ven @ 2003-12-29 17:17 UTC (permalink / raw)
  To: Christophe Saout; +Cc: Nicklas Bondesson, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1445 bytes --]

On Mon, Dec 29, 2003 at 06:08:21PM +0100, Christophe Saout wrote:
> Am Mo, den 29.12.2003 schrieb Arjan van de Ven um 10:49:
> >
> > the plan is to have a userspace device mapper app take it's place.
> > As for the timeframe; I'm looking at it but the userspace device mapper
> > code is still a bit of a mystory to me right now.
> 
> It is? I think it's kind of simple (probably, if you know what's going
> on ;)). Which interface are you looking it?
> 
> I'm just looking at the ataraid code. Is my assumption correct, that it
> simply interleaves sectors between two harddisks? Even sector number ->
> hd1, odd number -> hd2?

not always (one format has the hd2 offset by 10 sectors)

> Using the simple dmsetup tool one could try something like:
> 
> echo 0 $(expr $(blockdev --getsize /dev/<HD1>) \* 2) stripe 2 1
> /dev/<HD1> 0 /dev/<HD2> 0 | dmsetup create ataraid
> 
> Where <HD1> and <HD2> should of course be replaced by the raw disks.

> If everything is correct a device /dev/mapper/ataraid should be created.


> Using libdevmapper something like:
> dm_task_create(DM_DEVICE_CREATE)
> dm_task_task_set_name (required)
> dm_task_set_uuid (optional)
> dm_task_add_target (only once in this case, contains the stripe target)
> dm_task_set_ro (if readonly)
> dm_task_set_major / _minor (if you don't want a dynamically allocated)
> dm_task_run

thanks for the info! I'll look into what this means ;)

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: ataraid in 2.6.?
  2003-12-29 17:08   ` Christophe Saout
  2003-12-29 17:17     ` Arjan van de Ven
@ 2003-12-29 17:27     ` Nicklas Bondesson
       [not found]     ` <200312291727.hBTHRDA13745@mx1.redhat.com>
  2 siblings, 0 replies; 11+ messages in thread
From: Nicklas Bondesson @ 2003-12-29 17:27 UTC (permalink / raw)
  To: 'Christophe Saout', arjanv; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 2236 bytes --]

How do you set this (device mapping) up using the 2.6 kernel. I like the
ease of using ataraid in 2.4.x. Why not have both alternatives as options
(both ataraid and devicemapper)? Also have anyone of you looked at the patch
from Walt H that he sent in yesterday? I have to use this after replacing my
old hard drives (Maxtor 30GB) with WDC 80GB. The patch is attached. 

/Nicke

-----Original Message-----
From: linux-kernel-owner@vger.kernel.org
[mailto:linux-kernel-owner@vger.kernel.org] On Behalf Of Christophe Saout
Sent: den 29 december 2003 18:08
To: arjanv@redhat.com
Cc: Nicklas Bondesson; linux-kernel@vger.kernel.org
Subject: Re: ataraid in 2.6.?

Am Mo, den 29.12.2003 schrieb Arjan van de Ven um 10:49:
>
> the plan is to have a userspace device mapper app take it's place.
> As for the timeframe; I'm looking at it but the userspace device 
> mapper code is still a bit of a mystory to me right now.

It is? I think it's kind of simple (probably, if you know what's going on
;)). Which interface are you looking it?

I'm just looking at the ataraid code. Is my assumption correct, that it
simply interleaves sectors between two harddisks? Even sector number -> hd1,
odd number -> hd2?

Using the simple dmsetup tool one could try something like:

echo 0 $(expr $(blockdev --getsize /dev/<HD1>) \* 2) stripe 2 1 /dev/<HD1> 0
/dev/<HD2> 0 | dmsetup create ataraid

Where <HD1> and <HD2> should of course be replaced by the raw disks.

If everything is correct a device /dev/mapper/ataraid should be created.

Using libdevmapper something like:
dm_task_create(DM_DEVICE_CREATE)
dm_task_task_set_name (required)
dm_task_set_uuid (optional)
dm_task_add_target (only once in this case, contains the stripe target)
dm_task_set_ro (if readonly) dm_task_set_major / _minor (if you don't want a
dynamically allocated) dm_task_run

--
Christophe Saout <christophe@saout.de>
Please avoid sending me Word or PowerPoint attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[-- Attachment #2: pdcraid.patch --]
[-- Type: application/octet-stream, Size: 630 bytes --]

--- /usr/src/temp/linux-2.4.21-xfs/linux/drivers/ide/raid/pdcraid.c	2003-12-22 17:59:09.653139067 -0800
+++ linux/drivers/ide/raid/pdcraid.c	2003-07-21 20:47:14.000000000 -0700
@@ -361,7 +361,11 @@
 	if (ideinfo->sect==0)
 		return 0;
-	lba = (ideinfo->capacity / (ideinfo->head*ideinfo->sect));
-	lba = lba * (ideinfo->head*ideinfo->sect);
-	lba = lba - ideinfo->sect;
+	if (ideinfo->head!=255) {
+		lba = (ideinfo->capacity / (ideinfo->head*ideinfo->sect));
+		lba = lba * (ideinfo->head*ideinfo->sect);
+		lba = lba - ideinfo->sect; }
+	else {
+		lba = ideinfo->capacity - ideinfo->sect;
+	}
 
 	return lba;


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: ataraid in 2.6.?
       [not found]     ` <200312291727.hBTHRDA13745@mx1.redhat.com>
@ 2003-12-29 17:30       ` Arjan van de Ven
  2003-12-29 21:43         ` Nicklas Bondesson
  2003-12-29 22:18         ` Nicklas Bondesson
  0 siblings, 2 replies; 11+ messages in thread
From: Arjan van de Ven @ 2003-12-29 17:30 UTC (permalink / raw)
  To: Nicklas Bondesson; +Cc: 'Christophe Saout', linux-kernel

[-- Attachment #1: Type: text/plain, Size: 785 bytes --]

On Mon, Dec 29, 2003 at 06:27:08PM +0100, Nicklas Bondesson wrote:
> How do you set this (device mapping) up using the 2.6 kernel. I like the
> ease of using ataraid in 2.4.x. Why not have both alternatives as options
> (both ataraid and devicemapper)?

because ataraid is nothing more than a devicemapper....
duplicating that is rather silly... 
The outcome is to be a /sbin/ataraid binary or some such that will do all
the magic to detect the raid and tell the kernel device mapper to set it all
up.

> Also have anyone of you looked at the patch
> from Walt H that he sent in yesterday? I have to use this after replacing my
> old hard drives (Maxtor 30GB) with WDC 80GB. The patch is attached. 

I sent it to Marcelo for applying last week, and he applied it today

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: ataraid in 2.6.?
@ 2003-12-29 17:35 Christophe Saout
  0 siblings, 0 replies; 11+ messages in thread
From: Christophe Saout @ 2003-12-29 17:35 UTC (permalink / raw)
  To: Nicklas Bondesson; +Cc: linux-kernel

Am Mo, den 29.12.2003 schrieb Nicklas Bondesson um 18:27:

> How do you set this (device mapping) up using the 2.6 kernel. I like the
> ease of using ataraid in 2.4.x. Why not have both alternatives as options
> (both ataraid and devicemapper)?

I think the reason is to avoid unnecessary code duplication.
device-mapper provides a generic method to do such things. Also the
developers are heading towards removing code from the kernel that can be
done in userspace. There are plans to remove partition detection from
the kernel in 2.7 and move the detection and setup code to a userspace
program (using device-mapper) which can be placed in the initramfs (so
that the user won't notice any difference). Ataraid detection and setup
could also be placed there later.

If someone writes an ataraid detection and setup program in userspace it
could be placed on an initrd.

You can find the dmsetup tool in Sistina's device-mapper package.

--
Christophe Saout <christophe@saout.de>
Please avoid sending me Word or PowerPoint attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html


^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: ataraid in 2.6.?
  2003-12-29 17:30       ` Arjan van de Ven
@ 2003-12-29 21:43         ` Nicklas Bondesson
  2003-12-29 22:18         ` Nicklas Bondesson
  1 sibling, 0 replies; 11+ messages in thread
From: Nicklas Bondesson @ 2003-12-29 21:43 UTC (permalink / raw)
  To: 'Arjan van de Ven'; +Cc: 'Christophe Saout', linux-kernel

Yes, I agree. Duplicating it is rather silly :)

Where did he apply it?

/Nicke

-----Original Message-----
From: Arjan van de Ven [mailto:arjanv@redhat.com] 
Sent: den 29 december 2003 18:30
To: Nicklas Bondesson
Cc: 'Christophe Saout'; linux-kernel@vger.kernel.org
Subject: Re: ataraid in 2.6.?

On Mon, Dec 29, 2003 at 06:27:08PM +0100, Nicklas Bondesson wrote:
> How do you set this (device mapping) up using the 2.6 kernel. I like 
> the ease of using ataraid in 2.4.x. Why not have both alternatives as 
> options (both ataraid and devicemapper)?

because ataraid is nothing more than a devicemapper....
duplicating that is rather silly... 
The outcome is to be a /sbin/ataraid binary or some such that will do all
the magic to detect the raid and tell the kernel device mapper to set it all
up.

> Also have anyone of you looked at the patch from Walt H that he sent 
> in yesterday? I have to use this after replacing my old hard drives 
> (Maxtor 30GB) with WDC 80GB. The patch is attached.

I sent it to Marcelo for applying last week, and he applied it today


^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: ataraid in 2.6.?
  2003-12-29 17:30       ` Arjan van de Ven
  2003-12-29 21:43         ` Nicklas Bondesson
@ 2003-12-29 22:18         ` Nicklas Bondesson
  1 sibling, 0 replies; 11+ messages in thread
From: Nicklas Bondesson @ 2003-12-29 22:18 UTC (permalink / raw)
  To: 'Arjan van de Ven'; +Cc: 'Christophe Saout', linux-kernel

I'm planning to go with the device mapping in 2.6.0 to setup RAID1 using my
Promise TX2000 card. How do I know which device name it will choose? I have
looked in the 'devices.txt' but there is neither a ide-raid nor a specific
Promise device name mapping. Please advice.

/Nicke 

-----Original Message-----
From: Arjan van de Ven [mailto:arjanv@redhat.com] 
Sent: den 29 december 2003 18:30
To: Nicklas Bondesson
Cc: 'Christophe Saout'; linux-kernel@vger.kernel.org
Subject: Re: ataraid in 2.6.?

On Mon, Dec 29, 2003 at 06:27:08PM +0100, Nicklas Bondesson wrote:
> How do you set this (device mapping) up using the 2.6 kernel. I like 
> the ease of using ataraid in 2.4.x. Why not have both alternatives as 
> options (both ataraid and devicemapper)?

because ataraid is nothing more than a devicemapper....
duplicating that is rather silly... 
The outcome is to be a /sbin/ataraid binary or some such that will do all
the magic to detect the raid and tell the kernel device mapper to set it all
up.

> Also have anyone of you looked at the patch from Walt H that he sent 
> in yesterday? I have to use this after replacing my old hard drives 
> (Maxtor 30GB) with WDC 80GB. The patch is attached.

I sent it to Marcelo for applying last week, and he applied it today


^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: ataraid in 2.6.?
@ 2003-12-29 22:28 Christophe Saout
  0 siblings, 0 replies; 11+ messages in thread
From: Christophe Saout @ 2003-12-29 22:28 UTC (permalink / raw)
  To: Nicklas Bondesson; +Cc: 'Arjan van de Ven', linux-kernel

Am Mo, den 29.12.2003 schrieb Nicklas Bondesson um 23:18:

> I'm planning to go with the device mapping in 2.6.0 to setup RAID1 using my
> Promise TX2000 card. How do I know which device name it will choose? I have
> looked in the 'devices.txt' but there is neither a ide-raid nor a specific
> Promise device name mapping. Please advice.

If you cannot wait for Arjan or anybody else to write an ataraid setup
tool, you can go with dmsetup and choose any name you want (see the
dmsetup man page). The only restriction is that dmsetup creates device
under /dev/mapper, you can though use symlinks to it like LVM2 does if
you need it under /dev/ataraid or something (in your initscript). If you
don't have a better idea you can just give it the same name as before.



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2003-12-29 22:28 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-29  0:09 ataraid in 2.6.? Nicklas Bondesson
2003-12-29  9:49 ` Arjan van de Ven
2003-12-29 12:59   ` Nicklas Bondesson
2003-12-29 17:08   ` Christophe Saout
2003-12-29 17:17     ` Arjan van de Ven
2003-12-29 17:27     ` Nicklas Bondesson
     [not found]     ` <200312291727.hBTHRDA13745@mx1.redhat.com>
2003-12-29 17:30       ` Arjan van de Ven
2003-12-29 21:43         ` Nicklas Bondesson
2003-12-29 22:18         ` Nicklas Bondesson
  -- strict thread matches above, loose matches on Subject: below --
2003-12-29 17:35 Christophe Saout
2003-12-29 22:28 Christophe Saout

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox