linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [native] Bug report -cannot create a native raid on devel-3.2
@ 2011-01-28 15:30 Labun, Marcin
  2011-01-31  0:17 ` NeilBrown
  0 siblings, 1 reply; 2+ messages in thread
From: Labun, Marcin @ 2011-01-28 15:30 UTC (permalink / raw)
  To: neilb@suse.de
  Cc: linux-raid@vger.kernel.org, Kwolek, Adam, Neubauer, Wojciech,
	Ciechanowski, Ed, Williams, Dan J

Hi Neil,
Creation of a native raid fails:
mdadm -CR /dev/md/aaa -n 2 -l 1 /dev/sdb /dev/sdc
mdadm: ADD_NEW_DISK for /dev/sdb failed: Invalid argument.
In /var/log/messages:
md: sdb does not have a valid v1.2 superblock, not importing!


This on top on devel-3.2.
The bug is probably connected with fix 1cc7f4feb9a979 "Don't close fds in write_init_super".
In the call to get_dev_size from write_init_super1 the di->fd descriptor is zero and get_dev_size returns with error.
One of the first steps in load_super1 is call  free_super1(st). free_super1 releases st->info pointer and closes(di->fd);

The sequence in write_init_super1:
for (di = st->info; di && ! rv ; di = di->next) {
....

1060                 if (load_super1(&refst, di->fd, NULL)==0) {
1076 
  <..cut..>
1077                 if (!get_dev_size(di->fd, NULL, &dsize))
1078                         return 1;
< ...cut ... >
}


Thanks,
Marcin Labun






^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-01-31  0:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-28 15:30 [native] Bug report -cannot create a native raid on devel-3.2 Labun, Marcin
2011-01-31  0:17 ` NeilBrown

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).