dm-striped device sizes must be multiple of chunk-size. FC5 and rawhide

Dwaine Garden dwainegarden at rogers.com
Mon Mar 27 01:16:05 UTC 2006


--- Dwaine Garden <dwainegarden at rogers.com> wrote:

> Upgrading to kernel 2.6.16-2088 and I'm getting the
> following error when booting.
> 
> device-mapper: dm-stripe: Target length not
> divisible
> by chunk size.
> device-mapper: error adding target to table.
> 
> There was a patch submitted to 2.6.16, that limits
> dm-stripe to targets that are multiples of the chunk
> size.   
> 
> [PATCH] dm stripe: Fix bounds
> 
> The dm-stripe target currently does not enforce that
> the size of a stripe
> device be a multiple of the chunk-size.  Under
> certain
> conditions, this can
> lead to I/O requests going off the end of an
> underlying device.  This
> test-case shows one example.
> 
> echo "0 100 linear /dev/hdb1 0" | dmsetup create
> linear0
> echo "0 100 linear /dev/hdb1 100" | dmsetup create
> linear1
> echo "0 200 striped 2 32 /dev/mapper/linear0 0
> /dev/mapper/linear1 0" | \
>    dmsetup create stripe0
> dd if=/dev/zero of=/dev/mapper/stripe0 bs=1k
> 
> This will produce the output:
> dd: writing '/dev/mapper/stripe0': Input/output
> error
> 97+0 records in
> 96+0 records out
> 
> And in the kernel log will be:
> attempt to access beyond end of device
> dm-0: rw=0, want=104, limit=100
> 
> The patch will check that the table size is a
> multiple
> of the stripe
> chunk-size when the table is created, which will
> prevent the above striped
> device from being created.
> 
> This should not affect tools like LVM or EVMS, since
> in all the cases I can
> think of, striped devices are always created with
> the
> sizes being a
> multiple of the chunk-size.
> 
> The size of a stripe device must be a multiple of
> its
> chunk-size.
> 
> (akpm: that typecast is quite gratuitous)
> 
> Signed-off-by: Kevin Corry <kevcorry at us.ibm.com>
> Signed-off-by: Alasdair G Kergon <agk at redhat.com>
> Signed-off-by: Andrew Morton <akpm at osdl.org>
> Signed-off-by: Linus Torvalds <torvalds at osdl.org>
> 
> 
> I have tried setting the bios chunck size to 64, 32,
> 16k and re-installed from the DVD.  I used both
> FC5T3
> and FC5 install DVD.  I have tried 8 times with
> re-installs.  It would seem that a computer with
> dm-stripe can not be further upgraded because of the
> patch which was submitted to 2.6.16 kernel.  The
> patch
> is perfectly good, to fix a problem.   
> 
> How do you fix the stripe so it is a multiple of
> chunk-size?  If we can not fix it manually, we
> should
> notify people not to use dmraid with Bios software
> raid.
> 
> I'm going to submit a bug report for this.
> 
> dmsetup status
> via_ecfdfiehfa: 0 312499998 striped
> VolGroup00-LogVol01: 0 4063232 linear
> VolGroup00-LogVol00: 0 308150272 linear
> via_ecfdfiehfap2: 0 312287535 linear
> via_ecfdfiehfap1: 0 208782 linear
> 
> 
> *** Active Set
> name   : via_ecfdfiehfa
> size   : 312499998
> stride : 128
> type   : stripe
> status : ok
> subsets: 0
> devs   : 2
> spares : 0
> 
> 
> -- 
> fedora-test-list mailing list
> fedora-test-list at redhat.com
> To unsubscribe: 
>
https://www.redhat.com/mailman/listinfo/fedora-test-list
> 

I have submitted a bug report for the people
interested.

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=186842

Dwaine




More information about the fedora-test-list mailing list