All of lore.kernel.org
 help / color / mirror / Atom feed
From: Neil Brown <neilb@suse.de>
To: Jon Nelson <jnelson-linux-raid@jamponi.net>
Cc: LinuxRaid <linux-raid@vger.kernel.org>
Subject: Re: mdadm ignoring homehost?
Date: Thu, 2 Apr 2009 09:46:55 +1100	[thread overview]
Message-ID: <18899.61151.445765.360191@notabene.brown> (raw)
In-Reply-To: message from Jon Nelson on Wednesday April 1

On Wednesday April 1, jnelson-linux-raid@jamponi.net wrote:
> ping?

Oh yeah, that's right, I was going to reply to that - thanks for the
reminder. 

> 
> On Tue, Mar 24, 2009 at 11:57 AM, Jon Nelson
> <jnelson-linux-raid@jamponi.net> wrote:
> >
> > I have a raid1 comprised of a local physical device (/dev/sda) and a
> > network block device (/dev/nbd0).
> > When the machine hosting the network block device comes up, however,
> > it creates /dev/md127.
> > Why?

Because you cannot please all the people, all the time.

People seem to want their arrays to auto-assemble - you know, just
appear and do the right thing, read their mind probably, because
creating config files is too hard.
So I've endeavoured to make that happen.

The biggest problem with auto-assembly is what to do if two arrays
claim to have the same name. (e.g. /dev/md0) - which one wins.
The 'homehost' is (currently) used to resolve that.  An array only
gets to use the name it claims to have if it can show that it belongs
to "this" host.  If it doesn't it still get assembled, but with some
other more generic name.

But you want to actually stop some arrays from being assembled on a
particular host, in this case because the device is shared with
another host which "owns" the array.  mdadm cannot currently cope with
that.   But we have the source Luke!

Maybe I could make a three-way distinction with the 'homehost':
  - this host
  - no host specified
  - some other host

and only auto-assemble the first two. I suspect that would
inconvenience someone else though....

For now, my only suggestion is to provide a "DEVICES" line in you
mdadm.conf which lists all the device that you do want assembled into
arrays, but excluded /dev/sdb.

NeilBrown



> >
> > On the machine hosting the network block device, /dev/sdb is what
> > backs /dev/nbd0.
> > This is physical storage for /dev/nbd0:
> >
> > frank:~ # mdadm --examine /dev/sdb
> > /dev/sdb:
> >          Magic : a92b4efc
> >        Version : 1.0
> >    Feature Map : 0x1
> >     Array UUID : cf24d099:9e174a79:2a2f6797:dcff1420
> >           Name : turnip:11
> >  Creation Time : Mon Dec 15 07:06:13 2008
> >     Raid Level : raid1
> >   Raid Devices : 2
> >
> >  Avail Dev Size : 160086384 (76.34 GiB 81.96 GB)
> >     Array Size : 156247976 (74.50 GiB 80.00 GB)
> >  Used Dev Size : 156247976 (74.50 GiB 80.00 GB)
> >   Super Offset : 160086512 sectors
> >          State : clean
> >    Device UUID : 01524a75:c309869c:6da972c9:084115c6
> >
> > Internal Bitmap : 2 sectors from superblock
> >      Flags : write-mostly
> >    Update Time : Tue Mar 24 11:41:41 2009
> >       Checksum : 643e99c0 - correct
> >         Events : 111338
> >
> >
> >    Array Slot : 2 (failed, failed, empty, 1)
> >   Array State : _u 2 failed
> > frank:~ #
> >
> >
> > As you can see, the "Name" attribute is "turnip:11". The hostname is
> > "frank". Why did frank bring up the device?
> > The only thing in frank's /etc/mdadm.conf is "HOMEHOST frank" which I
> > didn't think was necessary anyway.
> >
> >
> >
> > --
> > Jon
--
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

  reply	other threads:[~2009-04-01 22:46 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-24 16:57 mdadm ignoring homehost? Jon Nelson
2009-04-01 15:15 ` Jon Nelson
2009-04-01 22:46   ` Neil Brown [this message]
2009-04-06 14:47     ` [Patch] " Doug Ledford
2009-04-06 19:33       ` Luca Berra
2009-04-17  3:49       ` Neil Brown
2009-04-17  7:08         ` Gabor Gombas
2009-04-20  5:23           ` Neil Brown
2009-04-21  6:34             ` Gabor Gombas
2009-04-21  7:06               ` Luca Berra
2009-04-17 18:17         ` Doug Ledford
2009-04-17 18:40           ` Piergiorgio Sartor
2009-04-18  7:54             ` Luca Berra
2009-04-18  8:36               ` Piergiorgio Sartor
2009-04-18 10:19                 ` Luca Berra
2009-04-18 13:06                   ` Piergiorgio Sartor
2009-04-20  5:58                     ` Neil Brown
2009-04-20 12:29                       ` Doug Ledford
2009-04-20 18:17                       ` Piergiorgio Sartor
2009-04-20 19:49                         ` Leslie Rhorer
2009-04-20 20:04                           ` Piergiorgio Sartor
2009-04-20 21:18                           ` Luca Berra
2009-04-20 21:13                         ` Luca Berra
2009-04-20 21:24                           ` Piergiorgio Sartor
2009-04-20 23:47                             ` Doug Ledford
2009-04-21  0:00                               ` Doug Ledford
2009-04-21  8:57                                 ` Michal Soltys
2009-04-21  6:29                               ` Luca Berra
2009-04-21 18:15                           ` Piergiorgio Sartor
2009-04-22 16:06                             ` Andrew Burgess
2009-04-23  1:20                               ` Doug Ledford
2009-04-23  5:51                                 ` Luca Berra
2009-04-23  6:09                                   ` Luca Berra
2009-04-23 11:05                                   ` Doug Ledford
2009-04-23 21:31                                     ` Luca Berra
2009-04-24 16:46                                       ` Doug Ledford
2009-04-24 19:15                                 ` Piergiorgio Sartor
2009-04-26 11:52                                   ` Doug Ledford
2009-04-26 12:14                                     ` Piergiorgio Sartor
2009-04-26 12:58                                       ` Piergiorgio Sartor
2009-04-26 18:06                                         ` Doug Ledford
2009-04-26 19:08                                           ` Piergiorgio Sartor
2009-04-26 21:37                                       ` Michal Soltys
2009-04-18 14:34             ` Andrew Burgess
2009-04-18  8:12           ` Luca Berra
2009-04-18  8:44             ` Piergiorgio Sartor
2009-04-18 13:35             ` Doug Ledford
2009-04-18 13:52               ` Piergiorgio Sartor
2009-04-18 14:50                 ` Doug Ledford
2009-04-18 14:48               ` Jon Nelson
2009-04-20  6:08               ` Neil Brown
2009-04-20 12:26                 ` Luca Berra
2009-04-20 12:36                 ` Doug Ledford
2009-04-18 13:58           ` Bill Davidsen
2009-04-20  7:23           ` Neil Brown
2009-04-20 13:15             ` Doug Ledford
2009-04-21  6:54               ` Neil Brown
2009-05-11  6:47               ` Neil Brown
2009-04-01 22:47 ` Michal Soltys

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=18899.61151.445765.360191@notabene.brown \
    --to=neilb@suse.de \
    --cc=jnelson-linux-raid@jamponi.net \
    --cc=linux-raid@vger.kernel.org \
    /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.