Skip to content

Commit f7bee80

Browse files
KrzysztofWojcikIntelneilbrown
authored andcommitted
md: Fix raid1->raid0 takeover
Takeover raid1->raid0 not succeded. Kernel message is shown: "md/raid0:md126: too few disks (1 of 2) - aborting!" Problem was that we weren't updating ->raid_disks for that takeover, unlike all the others. Signed-off-by: Krzysztof Wojcik <krzysztof.wojcik@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
1 parent 02214dc commit f7bee80

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎drivers/md/raid0.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -670,6 +670,7 @@ static void *raid0_takeover_raid1(mddev_t *mddev)
670670
mddev->new_layout = 0;
671671
mddev->new_chunk_sectors = 128; /* by default set chunk size to 64k */
672672
mddev->delta_disks = 1 - mddev->raid_disks;
673+
mddev->raid_disks = 1;
673674
/* make sure it will be not marked as dirty */
674675
mddev->recovery_cp = MaxSector;
675676

0 commit comments

Comments
 (0)