Re: Single-drive RAID0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 9 Feb 2011 14:33:01 +0000 "Wojcik, Krzysztof"
<krzysztof.wojcik@xxxxxxxxx> wrote:

> 
> Steps to reproduce:
> 1. Create partition on disk (for example: 1 partition, size=half of /dev/sda disk)
> 2. Create filesystem on partition (ext3)
> 3. Mount partition and create some control data on partition
> 4. Unmount partition
> 5. Create RAID0 on disk (mdadm -C /dev/md/vol_1 -amd -e 0.9 -c 64 -l 0 -n 1 /dev/sda --force)
> 6. md127 and md127p1 appears in /dev as expected
> 7. Try to mount md127p1 and verify control data on them

I couldn't get this to fail for me.
It is possible that there is something subtle about the precise device
geometry.
Could you send me
   sfdisk -l /dev/sda
(or whatever device you are using)

However when I ran the script without requesting native metadata I did
get some results somewhat similar to yours - and they were not consistent
which is an important similarity.

This patch should fix that particular problem.  Let me know if you
can still produce any of these errors with the patch applied.

Thanks,
NeilBrown



diff --git a/drivers/md/md.c b/drivers/md/md.c
index 0cc30ec..6818ff4 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -4138,10 +4138,10 @@ array_size_store(mddev_t *mddev, const char *buf, size_t len)
 	}
 
 	mddev->array_sectors = sectors;
-	set_capacity(mddev->gendisk, mddev->array_sectors);
-	if (mddev->pers)
+	if (mddev->pers) {
+		set_capacity(mddev->gendisk, mddev->array_sectors);
 		revalidate_disk(mddev->gendisk);
-
+	}
 	return len;
 }
 
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux