From: Paul Clements <Paul.Clements@SteelEye.com>
To: sdake@mvista.com
Cc: linux-raid@vger.kernel.org, ptb@it.uc3m.es,
Neil Brown <neilb@cse.unsw.edu.au>
Subject: Re: [PATCH 2.6] md: persistent (file-backed) bitmap and asyncwrites
Date: Tue, 02 Sep 2003 21:04:24 -0400 [thread overview]
Message-ID: <3F553E18.F4361630@SteelEye.com> (raw)
In-Reply-To: 1062182369.4680.124.camel@persist.az.mvista.com
Steven Dake wrote:
>
> looks good
> i'd like to see the 2.4 kernel patches as well
>
> Could you post them at parisc-linux.org ?
Sure, here's my latest bitmap patch (v2.24) for 2.4.19-340 (SuSE):
http://parisc-linux.org/~jejb/md_bitmap/md_bitmap_2_24_2_4_19_SUSE_340.diff
It should apply with minimal difficulties to any recent 2.4 kernel.
--
Paul
> On Fri, 2003-08-29 at 08:41, Paul Clements wrote:
> > At long last... I've finally got my additions to Peter T. Breuer's raid1
> > bitmap code (fr1 v2.14, ftp://oboe.it.uc3m.es/pub/Programs/fr1-2.14.tgz)
> > in decent shape and fairly well tested.
> >
> > The bitmap and asynchronous write capability are primarily useful when
> > raid1 is employed in data replication (e.g., with a remote disk served
> > over nbd as the secondary device). However, the bitmap is also useful
> > for reducing resync times with ordinary (local) raid1 and raid5 arrays.
> >
> > The additions, above and beyond the original fr1 code, are basically:
> >
> > * disk storage for the bitmap (makes the bitmap persistent, so that a
> > full resync is never needed, even after a failure or reboot of the
> > primary server)
> >
> > * a kernel daemon to periodically (lazily) clear bits in the bitmap file
> > (this reduces the number and frequency of disk writes to the bitmap
> > file)
> >
> > * changing bits in the bitmap to 16-bit counters (this ensures that a
> > bit won't be cleared prematurely when there are multiple outstanding
> > I/Os to a block, which could result in data loss on the backup system if
> > a failure coincided)
> >
> > * allowing the bitmap to be rescaled -- i.e., changing the amount of
> > data that each bit represents (currently, the 2.6 code can handle a
> > chunk size up to 64k)
> >
> > * modifying the code so that it can be more easily leveraged by other
> > raid drivers (namely raid5)
> >
> > I originally wrote this code for 2.4 (I have a patch vs. 2.4.19 SuSE
> > kernel, if anyone is interested) and recently ported it to 2.6. The code
> > currently allows the use of a bitmap with raid1 arrays (this could also
> > be extended to raid5, but I haven't put the bitmap calls into raid5.c --
> > if anyone would like to do that, I'd love to see it happen -- it
> > shouldn't be hard if you're familiar with raid5 (...I'm not :/).
> >
> >
> > I have also modified Neil's mdadm tool to allow it to configure the
> > additional bitmap and async parameters. The attached patch is against
> > the 1.2 mdadm release. Briefly, the new options are:
> >
> > Creation:
> >
> > mdadm -C /dev/md0 -l 1 --persistent
> > --bitmap=/tmp/bitmap_md0_file,65536,15 --async=512 -n 2 /dev/xxx
> > /dev/yyy
> >
> > This creates a raid1 array with:
> >
> > two disks
> > a persistent superblock
> > asynchronous writes enabled (maximum of 512 outstanding writes)
> > bitmap enabled (using the file /tmp/bitmap_md0_file)
> > a bitmap chunksize of 64k (bitmap chunksize determines how much data
> > each bitmap bit represents)
> > the bitmap daemon set to wake up every 15 seconds to clear bits in the
> > bitmap file (if needed)
> > /dev/xxx as the primary disk
> > /dev/yyy as the backup disk (when asynchronous writes are enabled, the
> > second disk in the array is labelled as a "backup", indicating that it
> > is remote, and thus no reads will be issued to the device)
> >
> >
> > Assembling:
> >
> > mdadm -A /dev/md0 --bitmap=/tmp/bitmap_md0_file /dev/xxx /dev/yyy
> >
> > This assembles an existing array and configures it to use a bitmap file.
> > The bitmap file pathname is not stored in the array superblock, and so
> > must be specified every time the array is assembled.
> >
> >
> > Details:
> >
> > mdadm -D /dev/md0
> >
> > This will display information about /dev/md0, including some additional
> > information about the bitmap and async parameters.
> >
> >
> > I've also added some information to the /proc/mdstat file:
> >
> > # cat /proc/mdstat
> > Personalities : [raid1]
> > md1 : active raid1 loop0[0] loop1[1](B)
> > 39936 blocks [2/2] [UU]
> > async: 0/256 outstanding writes
> > bitmap: 1/1 pages (15 cached) [64KB], 64KB chunk, file:
> > /tmp/bitmap_md1
> >
> > unused devices: <none>
> >
> >
> > Finally, the patches are available here:
> >
> > kernel patch vs. 2.6.0-test3:
> >
> > http://parisc-linux.org/~jejb/md_bitmap/md_bitmap_2_28_2_6_0_TEST3.diff
> >
> > mdadm patch vs. 1.2.0:
> >
> > http://parisc-linux.org/~jejb/md_bitmap/mdadm_1_2_0.diff
> >
> >
> > So if you have any interest, please review, test, ask questions, etc.
> >
> > (And if you're really a glutton, the gory details of the design and
> > implementation can be found in Section 3 of my OLS Paper:
> > http://archive.linuxsymposium.org/ols2003/Proceedings/All-Reprints/Reprint-Clements-OLS2003.pdf)
> >
> >
> > Thanks,
> > Paul
> > -
> > To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> >
> >
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2003-09-03 1:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-29 15:41 [PATCH 2.6] md: persistent (file-backed) bitmap and async writes Paul Clements
2003-08-29 18:39 ` Steven Dake
2003-09-03 1:04 ` Paul Clements [this message]
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=3F553E18.F4361630@SteelEye.com \
--to=paul.clements@steeleye.com \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@cse.unsw.edu.au \
--cc=ptb@it.uc3m.es \
--cc=sdake@mvista.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.