2004-10-31 18:34:41

by Kianusch Sayah Karadji

[permalink] [raw]
Subject: Raid1 DM vs MD

Hi!

After loosing some Data this week ... the question upon with technology to
use for Soft-RAID1 emerged the last days.

So which one is the recomended approach?

Should I use MD or DM?

One benefit on using MD is that one can use it for root-devices without
initrd.

But where will the development go?

Will MD be supported in the future or will it be replaced by DM?

Will there be other raid levels supported in DM?

Which one has better Clean/Dirty recognition/detection?

I had one MD-Raid1 where a good copy of the mirror was overwritten by the
bad (old) copy ... I lost 3 Month worth of data and I am expecting loosing
a linux project and in the worst case - even a court case :(

Questions upon questions.

Sooner or later I'l migrate from SW-Raid to a HW-Raid-Controller ...

Thanx
Kianusch

---
SK-TECH.net
http://www.sk-tech.net


2004-10-31 18:43:22

by Jan Engelhardt

[permalink] [raw]
Subject: Re: Raid1 DM vs MD


>I had one MD-Raid1 where a good copy of the mirror was overwritten by the
>bad (old) copy ... I lost 3 Month worth of data and I am expecting loosing
>a linux project and in the worst case - even a court case :(

Yep, happened to me too, and ever since, I refrain from using MD, but instead a
good (read: my own) backup solution. It's even a little cheaper since you do
not to spare a partition/harddisk of the same size you're mirroring, but can
simply put the .tar.bz2 (+.acl.bz2) onto another fs.



Jan Engelhardt
--
Gesellschaft für Wissenschaftliche Datenverarbeitung
Am Fassberg, 37077 Göttingen, http://www.gwdg.de

2004-10-31 19:34:35

by Bernd Eckenfels

[permalink] [raw]
Subject: Re: Raid1 DM vs MD

In article <[email protected]> you wrote:
> I had one MD-Raid1 where a good copy of the mirror was overwritten by the
> bad (old) copy ... I lost 3 Month worth of data and I am expecting loosing
> a linux project and in the worst case - even a court case :(

This is the expected behaviour in your situation.

I mean, if you dont do backup for month something has to go wrong :)

But more seriouly, when did that overwrite happen? After reboot or have you
changed media? Was the data lost because of corruption or because the old
copy did not contained the data?

Bernd

2004-11-01 01:06:07

by NeilBrown

[permalink] [raw]
Subject: Re: Raid1 DM vs MD

On Sunday October 31, [email protected] wrote:
> Hi!
>
> After loosing some Data this week ... the question upon with technology to
> use for Soft-RAID1 emerged the last days.
>
> So which one is the recomended approach?
>
> Should I use MD or DM?

I would say "md", but I am biased.

>
> One benefit on using MD is that one can use it for root-devices without
> initrd.
>
> But where will the development go?

Forwards.
It is unlikely that support for useful functionality will go away.
I would prefer to see all arrays being assembled by an initrd-like
thing (initramfs??) but wouldn't dream of encouraging that until it
was easy to use and widely used. We aren't there yet.

>
> Will MD be supported in the future or will it be replaced by DM?

It is unlikely that md will be replaced by dm in the foreseeable
future.
It is possible that dm will increase in functionality and become very
widely used.

>
> Will there be other raid levels supported in DM?
>
> Which one has better Clean/Dirty recognition/detection?

While I know no details of DM, I doubt there is substantial difference
here. It isn't a hard problem.

>
> I had one MD-Raid1 where a good copy of the mirror was overwritten by the
> bad (old) copy ... I lost 3 Month worth of data and I am expecting loosing
> a linux project and in the worst case - even a court case :(

That sounds very unfortunate. Without knowing the details it is hard
to comment on why this might have happened and how it could have been
avoided, but with modern tools (mdadm) and a sufficiently modern
kernel (2.4 at least) this should never be able to happen (without
deliberate carelessness on the part of the sysadmin).


>
> Questions upon questions.
>
> Sooner or later I'l migrate from SW-Raid to a HW-Raid-Controller ...

Many believe that that would not be a win. Personally I share that
view. HW-Raid-Controllers are not "open". md (and dm) SW-Raid is.

Good Luck.

NeilBrown

2004-11-01 11:13:37

by Kianusch Sayah Karadji

[permalink] [raw]
Subject: Re: Raid1 DM vs MD

Hi!

>> Should I use MD or DM?
>
> I would say "md", but I am biased.

:)

> It is unlikely that support for useful functionality will go away. I
> would prefer to see all arrays being assembled by an initrd-like thing
> (initramfs??) but wouldn't dream of encouraging that until it was easy
> to use and widely used. We aren't there yet.

It seem that there has been some changes lately on the way when and by
whom the RAID devices are created (especially in the 2.6.x stream) ... but
one of the most frustrating experiences is the lack of decent
documentation - or maybe some examples... Raid Support on DM seems not be
documented at all ... and than there are some "SubTypes" like Raid
Semi-Raid-Controllers (CMD649 etc.). Or maybe I'm searched the wrong way
on google? Is there a central resource on the net for Linux & Raid I do
not know of?

>> I had one MD-Raid1 where a good copy of the mirror was overwritten by
>> the bad (old) copy ... I lost 3 Month worth of data and I am expecting
>> loosing a linux project and in the worst case - even a court case :(
>
> That sounds very unfortunate. Without knowing the details it is hard to
> comment on why this might have happened and how it could have been
> avoided, but with modern tools (mdadm) and a sufficiently modern kernel
> (2.4 at least) this should never be able to happen (without deliberate
> carelessness on the part of the sysadmin).

Hmmm ...

RedHat ES 2.x ... so no mdadm but raidtools ... The System was set up with
HA-Linux so the sysadmin just had to initiate the TakeOver ... According
to /dev/mdstat the System was okay ... but where do I see which copy is
the "master" and where do I see in which direction the synchronisation is
going to take place - before the raid is started?

Also I did not find a way to start the raid with just one of the mirrors.

As I said my biggest problem is the lack of documentation.

>> Sooner or later I'l migrate from SW-Raid to a HW-Raid-Controller ...
>
> Many believe that that would not be a win. Personally I share that
> view. HW-Raid-Controllers are not "open". md (and dm) SW-Raid is.

Well ... yes ... but with HW-Raid users do not have to think very much.
(I'm talking about REAL Raid Controllers - like 3ware, ICP, Adaptek - not
about Soft-Raid-Controllers) Simply plug in the HardDisk und look how the
system syncs the disc. And in my case I'm talking about mirroring 2TB
Data ... MD takes up to 12Hours for syncing the raid - and
stopping/starting MD during this time is always risky.

Kianusch

2004-11-01 11:56:45

by Måns Rullgård

[permalink] [raw]
Subject: Re: Raid1 DM vs MD

Neil Brown <[email protected]> writes:

>> Sooner or later I'l migrate from SW-Raid to a HW-Raid-Controller ...
>
> Many believe that that would not be a win. Personally I share that
> view. HW-Raid-Controllers are not "open". md (and dm) SW-Raid is.

What happened to the proposed standard for on-disk format? Didn't
Adaptec also publish their format?

--
M?ns Rullg?rd
[email protected]

2004-11-01 19:29:56

by Bernd Eckenfels

[permalink] [raw]
Subject: Re: Raid1 DM vs MD

In article <[email protected]> you wrote:
> Well ... yes ... but with HW-Raid users do not have to think very much.

Actually they have the same problems. And with a Failover Cluster, you need
special Hardware (and most often special drivers which are not supported on
Linux)

Greetings
Bernd