Mailing List Archive

DRBD on top of software RAID1 on Linux
Hello,
This is something like FAQ question , but I just want to be sure.
Can DRBD run with no problems on top of RAID1? Are there some problems known
with this?

Regards
Andrej
--
/* Andrej Hosna - http://people.ibl.sk/adino - +421 903 852 696 */
/* IBL Software Engineering - http://www.ibl.sk - +421 7 43427214 */
Re: DRBD on top of software RAID1 on Linux [ In reply to ]
Alan Robertson wrote:

> Andrej Hosna wrote:
> >
> > Hello,
> > This is something like FAQ question , but I just want to be sure.
> > Can DRBD run with no problems on top of RAID1? Are there some problems known
> > with this?
>
> This doesn't answer your question, but is relevant:
> Software RAID doesn't work with journalling filesystems, and can corrupt
> data during online RAID rebuilds.
>
>

Oops ...
How then my system running /dev/drbd0 -> /dev/md1 (RAID1)-> ReiserFS
Or am I just lucky enough for now and next week my system'll crash ?
I'm not quit sure, but AFAIK only RAID2 and above are not compatible with JFS,
with RAID1 you may play just safe. Am I wrong ?
Re: DRBD on top of software RAID1 on Linux [ In reply to ]
Andrej Hosna wrote:
>
> Hello,
> This is something like FAQ question , but I just want to be sure.
> Can DRBD run with no problems on top of RAID1? Are there some problems known
> with this?

This doesn't answer your question, but is relevant:
Software RAID doesn't work with journalling filesystems, and can corrupt
data during online RAID rebuilds.

-- Alan Robertson
alanr@example.com
Re: DRBD on top of software RAID1 on Linux [ In reply to ]
Alan Robertson wrote:
>
> Andrej Hosna wrote:
> >
> > Hello,
> > This is something like FAQ question , but I just want to be sure.
> > Can DRBD run with no problems on top of RAID1? Are there some problems known
> > with this?
>
> This doesn't answer your question, but is relevant:
> Software RAID doesn't work with journalling filesystems, and can corrupt
> data during online RAID rebuilds.

I forgot to say that this is fixed in 2.4 kernels.

-- Alan Robertson
alanr@example.com
Re: DRBD on top of software RAID1 on Linux [ In reply to ]
Dim Zegebart wrote:
>
> Alan Robertson wrote:
>
> > Andrej Hosna wrote:
> > >
> > > Hello,
> > > This is something like FAQ question , but I just want to be sure.
> > > Can DRBD run with no problems on top of RAID1? Are there some problems known
> > > with this?
> >
> > This doesn't answer your question, but is relevant:
> > Software RAID doesn't work with journalling filesystems, and can corrupt
> > data during online RAID rebuilds.
>
> Oops ...
> How then my system running /dev/drbd0 -> /dev/md1 (RAID1)-> ReiserFS
> Or am I just lucky enough for now and next week my system'll crash ?
> I'm not quit sure, but AFAIK only RAID2 and above are not compatible with JFS,
> with RAID1 you may play just safe. Am I wrong ?

My understanding is that with 2.2 kernels, this can corrupt your filesystem
if you do a RAID rebuild while the filesytem is mounted and actively being
written. As I understand it, you won't see problems until you do a RAID
rebuild while it's mounted, and then only if you're running a 2.2 kernel.

Marcelo remembers the details of this better than I do. Marcelo?

-- Alan Robertson
alanr@example.com
Re: DRBD on top of software RAID1 on Linux [ In reply to ]
On Wed, 6 Dec 2000, Alan Robertson wrote:

> Dim Zegebart wrote:
> >
> > Alan Robertson wrote:
> >
> > > Andrej Hosna wrote:
> > > >
> > > > Hello,
> > > > This is something like FAQ question , but I just want to be sure.
> > > > Can DRBD run with no problems on top of RAID1? Are there some problems known
> > > > with this?
> > >
> > > This doesn't answer your question, but is relevant:
> > > Software RAID doesn't work with journalling filesystems, and can corrupt
> > > data during online RAID rebuilds.
> >
> > Oops ...
> > How then my system running /dev/drbd0 -> /dev/md1 (RAID1)-> ReiserFS
> > Or am I just lucky enough for now and next week my system'll crash ?
> > I'm not quit sure, but AFAIK only RAID2 and above are not compatible with JFS,
> > with RAID1 you may play just safe. Am I wrong ?
>
> My understanding is that with 2.2 kernels, this can corrupt your filesystem
> if you do a RAID rebuild while the filesytem is mounted and actively being
> written. As I understand it, you won't see problems until you do a RAID
> rebuild while it's mounted, and then only if you're running a 2.2 kernel.
>
> Marcelo remembers the details of this better than I do. Marcelo?

Journalling requires strict write ordering in some operations.

The raid resync code simply reads and writes data throught the buffer
cache which may break the write ordering.

drbd resync has the same problem.