xfs
[Top] [All Lists]

Re: Problem with XFS on software RAID1

To: Dariush Pietrzak <eyck@xxxxxxxxxxxx>
Subject: Re: Problem with XFS on software RAID1
From: Bogdan Costescu <bogdan.costescu@xxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 23 May 2003 16:55:12 +0200 (CEST)
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: <20030523134818.GA1514@xxxxxxxxxxxx>
Sender: linux-xfs-bounce@xxxxxxxxxxx
On Fri, 23 May 2003, Dariush Pietrzak wrote:

>  I stumbled upon a problem with xfs. It seems that it doesen't work with
> software RAID1 the way I expected. 

Remember the old saying:

The computer does what you tell it to do, not what you want it to do.

>  Summary: One cannot use the same filesystem filtered through MD code and
> without it ( filesystem is on /dev/sdaX, you can't mount it via /dev/md0,
> or - filesystem was created on /dev/md0, you can't mount it via /dev/sdaX )

I'm afraid that you don't understand what MD does and some more reading is 
due on your part.
First, MD has its own disk partition type (0xfd) for the driver to be able 
to autorecognize them. Then some part of the partition is reserved, in it 
the driver keeps some internal data, like the RAID level and member 
number, which are used when mounting it and are important in case of 
shuffling of disks (f.e. hda and hde are swapped, but their member number 
should not change). When offering the partition to the filesystem, this 
area is hidden, so that the FS sees a smaller partition. A normal 0x83 
partition doesn't have this restriction, the FS sees the entire disk area.

>  It hurts in two areas - one is that I'm trying to migrate existing system
> into RAID1, I added another disk, partitioned it just like the first one, 
> expected to migrate nicely...

Nope. The key for migrations like this is the degraded mode: create MD 
partition on second drive, set up the MD device in degraded mode, put data 
there, change partition type on first disk to MD, use hotadd to add the 
first disk to the MD device.

>  Another is - when I've got RAID1-ed partition, I expect to be able to
> mount both copies without using raid in emergencies.

You are able to mount them alone, but again in degraded mode, still using 
the MD driver. Remember: what was written by MD should be read by MD.

> Am I doing something wrong? Should xfs code be aware of software RAID
> superblocks? Is MD code doing something wrong?

Yes. No[*]. No.

[*] not in this case anyway; there was a discussion about stripes some 
weeks ago...

-- 
Bogdan Costescu

IWR - Interdisziplinaeres Zentrum fuer Wissenschaftliches Rechnen
Universitaet Heidelberg, INF 368, D-69120 Heidelberg, GERMANY
Telephone: +49 6221 54 8869, Telefax: +49 6221 54 8868
E-mail: Bogdan.Costescu@xxxxxxxxxxxxxxxxxxxxx




<Prev in Thread] Current Thread [Next in Thread>