On Wednesday January 18, cizek@xxxxxxx wrote: > > Hi, > > Are there any known issues with changing the number of active devices in > a RAID1 array? There is now, thanks. > > I'm trying to add a third mirror to an existing RAID1 array of two disks. > > I have /dev/md5 as a mirrored pair of two 40 GB disks. Directly on top > of it is a 40 GB XFS filesystem. > > When I do "mdadm --grow /dev/md5 -n 3" the count of devices changes from > 2 to 3, as expected. > If the XFS filesystem is mounted, the array size changes to 3.0 GB. > If it is not mounted everything works fine. > > Is this supposed to work, is it required that the array be inactive to > add a disk, or am I just doing > something stupid? It is supposed to work, it doesn't, but it is the code doing something stupid, not you. Try the patch below. > > If there is a better forum for this question, please direct me there. > In any case TIA for any help. This is exactly the correct forum. NeilBrown Signed-off-by: Neil Brown <neilb@xxxxxxx> ### Diffstat output ./drivers/md/md.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff ./drivers/md/md.c~current~ ./drivers/md/md.c --- ./drivers/md/md.c~current~ 2006-01-17 17:42:31.000000000 +1100 +++ ./drivers/md/md.c 2006-01-19 10:29:46.000000000 +1100 @@ -3488,7 +3488,7 @@ static int update_raid_disks(mddev_t *md bdev = bdget_disk(mddev->gendisk, 0); if (bdev) { mutex_lock(&bdev->bd_inode->i_mutex); - i_size_write(bdev->bd_inode, mddev->array_size << 10); + i_size_write(bdev->bd_inode, (loff_t)mddev->array_size << 10); mutex_unlock(&bdev->bd_inode->i_mutex); bdput(bdev); } - 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