Bug#809447: mdadm: update=metadata with 4TB disks result in different sizes and superblock versions

NeilBrown neilb at suse.de
Sun Jan 3 22:19:40 UTC 2016


On Thu, Dec 31 2015, Ralph Kaptur wrote:

> the size has shrinked and the filesystem no longer working.

I suspect this will be fixed by

diff --git a/super0.c b/super0.c
index 7f8001479edc..59a6a034fb6a 100644
--- a/super0.c
+++ b/super0.c
@@ -405,7 +405,8 @@ static void getinfo_super0(struct supertype *st, struct mdinfo *info, char *map)
 	info->array.utime = sb->utime;
 	info->array.chunk_size = sb->chunk_size;
 	info->array.state = sb->state;
-	info->component_size = sb->size*2;
+	info->component_size = sb->size;
+	info->component_size *= 2;
 
 	if (sb->state & (1<<MD_SB_BITMAP_PRESENT))
 		info->bitmap_offset = 8;


You array currently has two superblocks on it, which will be confusing.

If you stop the array and then
  mdadm --zero-super --metadata=1.0 /dev/sdb1 /dev/sdc1
the new incorrect metadata should be removed.

If you apply the above patch to mdadm (maybe get clean source with
   git clone git://neil.brown.name/mdadm
then apply the patch and run "make") you should be able to assemble
--update=metadata and get a working array.

Thanks for the report.

NeilBrown
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-mdadm-devel/attachments/20160104/9e1f7544/attachment-0001.sig>


More information about the pkg-mdadm-devel mailing list