linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Neil Brown <neilb@suse.de>
To: "Trela, Maciej" <Maciej.Trela@intel.com>
Cc: "linux-raid@vger.kernel.org" <linux-raid@vger.kernel.org>,
	"Williams, Dan J" <dan.j.williams@intel.com>,
	"Ciechanowski, Ed" <ed.ciechanowski@intel.com>
Subject: Re: [patch 1/1] [mdadm] Add partition checks when creating a new array
Date: Fri, 13 Nov 2009 13:49:24 +1100	[thread overview]
Message-ID: <19196.51508.947560.851117@notabene.brown> (raw)
In-Reply-To: message from Trela, Maciej on Thursday November 12

On Thursday November 12, Maciej.Trela@intel.com wrote:
> Hello Neil,
> I'm sending the patch that is connected with intel metadata compatibility.
> 
> The new code checks for existing partitions when creating an array.
> If the metadata overwrites the last partition, the warning is shown to the user. The patch supports only MBR and GPT partition table types.
> Despite the patch was implemented as IMSM compatibility issue I've decided to include the partition check for all metadata types as a generic code.
> I would appreciate any feedback.

Sorry for not responding the first time you posted this.

I agree with the principle.  However I would rather not add code for
reading different partition types to mdadm.  It would be much nicer if
that code came from a library.
Is there a good library that we could use?
libparted might be a possibility, but it seems rather over-weight.
/lib/libparted-1.9.so.12.0.0 is larger than /sbin/mdadm !!!

Are there any other libraries for reading different partition tables?
I guess we can open-code it if we have to but I'd be happy if another
solution could be found.

I should probably change to using libblkid to check for the various
filesystem types...

Is this check really relevant for anything other RAID1 array.  For any
other level, the fact that the metadata lies inside or outside the
current partitions is quite irrelevant as the old data will not be
useful anyway.

And I don't think it is sensible to report "unknown partition table".
If there is no partition table, there is nothing to check.

NeilBrown


  reply	other threads:[~2009-11-13  2:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-12 12:39 [patch 1/1] [mdadm] Add partition checks when creating a new array Trela, Maciej
2009-11-13  2:49 ` Neil Brown [this message]
2009-11-19 15:40   ` Trela, Maciej
2009-12-08  5:10     ` Neil Brown
2009-11-20 17:03   ` Luca Berra
2009-11-20 17:22     ` Mr. James W. Laferriere
2009-11-20 17:25       ` Mr. James W. Laferriere
2009-12-12 22:50     ` Asdo
2009-12-14 11:33       ` Trela, Maciej
  -- strict thread matches above, loose matches on Subject: below --
2009-11-05 12:01 Trela, Maciej

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=19196.51508.947560.851117@notabene.brown \
    --to=neilb@suse.de \
    --cc=Maciej.Trela@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=ed.ciechanowski@intel.com \
    --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 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).