[linux-lvm] Data corruption on large, multi-device filesystem

Alasdair G Kergon agk at redhat.com
Thu Jan 20 16:53:17 UTC 2005


On Wed, Jan 19, 2005 at 02:14:43PM -0800, joe at eiler.net wrote:
> I don't see any corruption on the files unless I specify the -i option to
> lvcreate.  
 
That's a useful observation: different code gets run when -i is used, and
I've taken a look and there are two 32-bit limits in that code.  

One appears to be intentional for performance reasons and can be worked 
around by increasing the chunk size (default 64K), though it really should
detect when the limit is exceeded and tell you!

The other unintentional limit (which is the one affecting you I think) 
leads to wrap-around at striped device offsets beyond ~2^32 sectors
i.e. 2^39 bytes into a PV, or ~2^40 bytes (2TB) into an LV in your
case of 2 stripes.  The fix for that is a basic exercise in C.  
[Ref.  stripe_map() in drivers/md/dm-stripe.c]

Alasdair
-- 
agk at redhat.com




More information about the linux-lvm mailing list