On Sun, 26 Jun 2011 14:42:03 +0100, Luke Kenneth Casson Leighton 
<luke.leigh...@gmail.com> wrote:
> On Sun, Jun 26, 2011 at 2:25 PM, Andrew McGlashan
> <andrew.mcglas...@affinityvision.com.au> wrote:
> 
> > I hear what you are saying, but I had a related problem which was similar.
> 
>  well... it's funny, because this is exactly what i need.
> 
> > Anyway.... the long and short of it is, I can use mdadm without regard to
> > what devices are found, such as /dev/sda /dev/sdb /dev/sdc and the like as I
> > rely purely on the UUID functionality, which as you know, mdadm handles
> > perfectly well.  ;-)
> 
>  :)
> 
>  well.  that was nice.  the scenario you describe is precisely what i
> sort-of had planned, but didn't have the expertise to do so was going
> to recommend just two drives and then rsync to the other two.
> 
>  _however_, given that you've solved exactly what is needed / best /
> recommended for when you have 4 external drives (which i do) that's
> bloody fantastic :)
> 
>  ok, i bring in phil now, who i was talking to yesterday about this.
> what he said was (and i may get this wrong: it only went in partly) -
> something along the lines of "remember to build the drives with
> individual mdadm bitmaps enabled".  this will save a great deal of
> arseing about when re-adding drives which didn't get properly added:
> only 1/2 a 1Tb drive will need syncing, not an entire drive :)  the
> bitmap system he says has hierarchical granularity apparently.

What I said was: "internal" bitmaps

madam(8):

       -b, --bitmap= 
  
              Specify a file to store a write-intent bitmap in.  The
              file should not exist unless --force is also given.  The
              same file should be provided when assembling the array.
              If the word internal is given, then the bitmap is stored
              with the metadata on the array, and so is replicated on
              all devices.  If the word none is given with --grow mode,
              then any bitmap that is present is removed.

              To help catch typing errors, the filename must contain at
              least one slash ('/') if it is a real file (not 'internal'
              or 'none').

              Note: external bitmaps are only known to work on ext2 and
              ext3.  Storing bitmap files on other filesystems may
              result in serious problems.

and I probably also gave my half-arsed understanding of what that means.

Feel free to consult actual documentation for a proper understanding of
reality.

> also, he recommended taking at least one of the external drives *out*

I think I said: WTF?  You buy a machine that had 4 hot swap SATA bays,
and you're plugging crappy external USB drives into it instead?  Are you
mental?  (or at least, if I didn't say that out loud, that's what I was
thinking ;-)

I must say that I'm a little beffuddled about how you managed to make
the system sensitive to which device contains which MD component -- I
seem to remember you mentioning that you had devices listed in your
mdadm.conf -- just get rid of them.

The mdadm.conf on one of my servers looks like this:

=-=-=-=-
DEVICE partitions
CREATE owner=root group=disk mode=0660 auto=yes
HOMEHOST <system>
MAILADDR root
ARRAY /dev/md/2 metadata=1.2 UUID=65c09661:02fc3a16:402916d3:5d4987f4 
name=sheikh:2
ARRAY /dev/md/3 metadata=1.2 UUID=e82f516b:64bf463c:adf65c9c:fd728d05 
name=sheikh:3
ARRAY /dev/md/4 metadata=1.2 UUID=56adc7ca:c7097e9b:00ac12c0:d1d278f2 
name=sheikh:4
ARRAY /dev/md/5 metadata=1.2 UUID=6c5362e4:74b56fad:8c74a317:e4dce6d0 
name=sheikh:5
ARRAY /dev/md/6 metadata=1.2 UUID=99ed31bd:cc608687:76f7b5a3:7bca24bc 
name=sheikh:6
ARRAY /dev/md/7 metadata=1.2 UUID=87cdaf12:94c2a356:4ba1d3bd:c80ac3b3 
name=sheikh:7
ARRAY /dev/md/8 metadata=1.2 UUID=08e708b8:0989607b:d99709d2:8b5e4d58 
name=sheikh:8
ARRAY /dev/md/11 metadata=1.2 UUID=210e1b53:3937b017:c947361e:2d2884b1 
name=sheikh:11
=-=-=-=-

No mention of devices, which is a good job because that machine seems
to randomise the device mapping on each boot, and is capable of moving
them about when running if you pop the drive out of the machine and back
in again.

As also mentioned somewhere in the docs, the output of the command:

  mdadm --examine --scan

can be used to populate the relevant bits of mdadm.conf

Cheers, Phil.
-- 
|)|  Philip Hands [+44 (0)20 8530 9560]    http://www.hands.com/
|-|  HANDS.COM Ltd.                    http://www.uk.debian.org/
|(|  10 Onslow Gardens, South Woodford, London  E18 1NE  ENGLAND

Attachment: pgpufrVxAMzIe.pgp
Description: PGP signature

Reply via email to