Re: Problem with changing array_size

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

 



On Tue, Mar 30, 2010 at 6:53 AM, Kwolek, Adam <adam.kwolek@xxxxxxxxx> wrote:
> I found that setting new raid volume size using array_size entry in sysfs causes that inode references in vfs can be lost.
>
> Conditions:
>  SLES 11 (32bit) machine with
>        kernel: 2.6.33
>        mdadm : 3.1.2
>  5 SATA hdds in system:
>        SLES 11 on   /dev/sda
>        4 test disks /dev/hdb - /dev/hde
>
> Reproduction:
> 1. Configure:
>        # create native raid5 volume, with specified size (relatively small)
>        mdadm -C /dev/md/raid5vol_0 -amd -l 5 --chunk 64 --size 104857 -n 3 /dev/sdb /dev/sdc /dev/sde -R
>
>        # Create file system
>        mkfs /dev/md/raid5vol_0
>
>        # mount it and copy some files there
>        mount /dev/md/raid5vol_0 /mnt/vol
>        cp * /mnt/vol
>
> 2. Try to change volume size. This should affect volume, but not vfs
>        echo "157285" >/sys/block/md127/md/array_size

Of course this affects the filesystem.  You have reduced the size of
the volume from 209,664KB to 157,285KB.  Perhaps you are confusing the
--size parameter to mdadm (which is per member) and the md/array_size
attribute which is the total volume size??


> In the few tries (maybe at first shot) you would probably find that when you are trying to execute ls command on mounted volume message in user space appears:
>        ls: cannot access 'copied file name': Input/output error
> In kernel space messages can be found:
>  In response to size change:
>        Mar 30 16:27:03 linux kernel: md127: detected capacity change from 214695936 to 161059840
>        Mar 30 16:27:03 linux kernel: VFS: busy inodes on changed media or resized disk md127

Yes, the filesystem is horribly confused at this point because 50MB of
space has disappeared.

--
Dan
--
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