Received: with ECARTIS (v1.0.0; list linux-xfs); Fri, 23 May 2003 07:55:22 -0700 (PDT) Received: from mail.iwr.uni-heidelberg.de (mail.iwr.uni-heidelberg.de [129.206.104.30]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h4NEtG2x003771 for ; Fri, 23 May 2003 07:55:17 -0700 Received: from kenzo.iwr.uni-heidelberg.de (IDENT:JXXk/7S4Axxy1Ryu3QY63EJIdEMgu5KX@kenzo.iwr.uni-heidelberg.de [129.206.120.29]) by mail.iwr.uni-heidelberg.de (8.12.9/8.12.9) with ESMTP id h4NEtCaF020730; Fri, 23 May 2003 16:55:12 +0200 (MET DST) Received: from kenzo.iwr.uni-heidelberg.de (localhost.localdomain [127.0.0.1]) by kenzo.iwr.uni-heidelberg.de (8.12.8/8.12.8) with ESMTP id h4NEtCf0001647; Fri, 23 May 2003 16:55:12 +0200 Received: from localhost (bogdan@localhost) by kenzo.iwr.uni-heidelberg.de (8.12.8/8.12.8/Submit) with ESMTP id h4NEtCxW001643; Fri, 23 May 2003 16:55:12 +0200 Date: Fri, 23 May 2003 16:55:12 +0200 (CEST) From: Bogdan Costescu To: Dariush Pietrzak cc: linux-xfs@oss.sgi.com Subject: Re: Problem with XFS on software RAID1 In-Reply-To: <20030523134818.GA1514@forumakad.pl> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 4120 X-ecartis-version: Ecartis v1.0.0 Sender: linux-xfs-bounce@oss.sgi.com Errors-to: linux-xfs-bounce@oss.sgi.com X-original-sender: bogdan.costescu@iwr.uni-heidelberg.de Precedence: bulk X-list: linux-xfs Content-Length: 2359 Lines: 57 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@IWR.Uni-Heidelberg.De