From: Neil Brown <neilb@cse.unsw.edu.au>
To: Lars Marowsky-Bree <lmb@suse.de>
Cc: linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org
Subject: Re: RFC - new raid superblock layout for md driver
Date: Thu, 21 Nov 2002 11:31:35 +1100 [thread overview]
Message-ID: <15836.10599.736315.623964@notabene.cse.unsw.edu.au> (raw)
In-Reply-To: message from Lars Marowsky-Bree on Thursday November 21
On Thursday November 21, lmb@suse.de wrote:
>
> However, for none-RAID devices like multipathing I believe that activating a
> drive on multiple hosts should be possible; ie, for these it might not be
> necessary to scribble to the superblock every time.
>
> (The md patch for 2.4 I sent you already does that; it reconstructs the
> available paths fully dynamic on startup (by activating all paths present);
> however it still updates the superblock afterwards)
I haven't thought much about multipat I admit.....
Mt feeling is that a multipath superblock should never be updated.
Just writen once at creation and left like that (raid0 and linear are
much the same) The only lose would be the utime update, and I don't
think that is a real lose.
> > /* constant this-device information - 64 bytes */
> > u64 address of superblock in device
> > u32 number of this device in array /* constant over reconfigurations
> > */
> > u32 device_uuid[4]
>
> What is "address of superblock in device" ? Seems redundant, otherwise you
> would have been unable to read it, or am missing something?
Suppose I have a device with a partition that ends at the end of the
device (and starts at a 64k align location). Then if there is a
superblock in the whole device, it will also be in the final
partition... but which is right? Storing the location of the
superblock allows us to disambiguate.
>
> Special case here might be required for multipathing. (ie, device_uuid == 0)
>
> > u32 pad3[9]
> >
> > /* array state information - 64 bytes */
> > u32 utime
>
> Timestamps (also above, ctime) are always difficult. Time might not be set
> correctly at any given time, in particular during early bootup. This field
> should only be advisory.
Indeed, they are only advisory.
>
> > u32 state /* clean, resync-in-progress */
> > u32 sb_csum
> > u64 events
> > u64 resync-position /* flag in state if this is valid)
> > u32 number of devices
> > u32 pad2[8]
> >
> > /* device state information, indexed by 'number of device in array'
> > 4 bytes per device */
> > for each device:
> > u16 position /* in raid array or 0xffff for a spare. */
> > u16 state flags /* error detected, in-sync */
>
> u16 != u32; your position flags don't match up. I'd like to be able to take
> the "position in the superblock" as a mapping here so it can be found in this
> list, or what is the proposed relationship between the two?
u16 for device flags. u32 (over kill for) array flags. Is there are
problem that I am missing?
There is an array of
struct {
u16 position; /* aka role. 0xffff for spare */
u16 state; /* error/insync */
}
in each copy of the superblock. It is indexed by 'number of this
device in array' which is constant for any given device despite any
configuration changes (until the device is removed from the array).
If you have two hot spares, then their 'postition' (aka role) will
initially be 0xffff. After a failure, one will be swapped in and it's
position becomes (say) 3. Once rebuild is complete, the insync flag
is set and the device becomes fully active.
Does that make it clear?
NeilBrown
next prev parent reply other threads:[~2002-11-21 0:31 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-20 23:47 RFC - new raid superblock layout for md driver Lars Marowsky-Bree
2002-11-21 0:31 ` Neil Brown [this message]
2002-11-21 0:35 ` Steven Dake
2002-11-21 1:10 ` Alan Cox
2002-12-08 22:35 ` Neil Brown
2002-11-21 19:39 ` Joel Becker
-- strict thread matches above, loose matches on Subject: below --
2002-11-20 15:55 Steve Pratt
2002-11-20 23:24 ` Neil Brown
2002-11-20 4:09 Neil Brown
2002-11-20 10:03 ` Anton Altaparmakov
2002-11-20 23:02 ` Neil Brown
2002-11-22 0:08 ` Kenneth D. Merry
2002-12-09 3:52 ` Neil Brown
2002-12-10 6:28 ` Kenneth D. Merry
2002-12-11 0:07 ` Neil Brown
2002-11-20 13:58 ` Bill Rugolsky Jr.
2002-11-20 23:17 ` Neil Brown
2002-11-20 14:09 ` Alan Cox
2002-11-20 23:11 ` Neil Brown
2002-11-21 0:30 ` Alan Cox
2002-11-21 0:10 ` John Adams
2002-11-21 0:30 ` Alan Cox
2002-11-20 16:03 ` Joel Becker
2002-11-20 23:31 ` Neil Brown
2002-11-21 1:46 ` Doug Ledford
2002-11-21 19:34 ` Joel Becker
2002-11-21 19:54 ` Doug Ledford
2002-11-21 19:57 ` Steven Dake
2002-11-21 20:38 ` Doug Ledford
2002-11-21 20:49 ` Steven Dake
2002-11-21 20:35 ` Kevin Corry
2002-11-21 21:29 ` Alan Cox
2002-11-21 21:22 ` Doug Ledford
2002-11-21 20:53 ` Kevin Corry
2002-11-21 21:55 ` Doug Ledford
2002-11-21 20:06 ` Joel Becker
2002-11-21 23:35 ` Luca Berra
2002-11-22 10:13 ` Joe Thornber
2002-12-02 21:38 ` Neil Brown
2002-12-03 8:24 ` Luca Berra
2002-11-20 17:05 ` Steven Dake
2002-11-20 23:30 ` Lars Marowsky-Bree
2002-11-20 23:48 ` Neil Brown
2002-11-21 0:29 ` Steven Dake
2002-11-21 15:23 ` John Stoffel
2002-11-21 19:36 ` Joel Becker
2002-11-22 7:11 ` Jeremy Fitzhardinge
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=15836.10599.736315.623964@notabene.cse.unsw.edu.au \
--to=neilb@cse.unsw.edu.au \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=lmb@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).