remove mdadm stripe limitation, pls

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

 



I got in trouble trying to mount RAID0 drives from brocen HW
controller. The mdadm utility is locked to 4k stripe minimum, but these
drives have 1s (512bytes) stripes. 

Then, I dig into kernel and found there are no actual stripe limitation
seems. So, all the limits are in mdadm code. I patched soure and all
works ok. 
mdadm --build /dev/md0 --level=0 --chunk=1s --raid-devices=2 /dev/sdd
/dev/sdc 

First: there are UNDOCUCMENTED option in --chunk, size could be given
in sectors (s). 

Second: 1s used as INVALID_SECTORS constant. I changed it to 0xffff 

Third: The sector number is stored in K. I removes this division, maybe
it is only for output. 

Where to connect with mdadm team to ask for changes? What I skipped to
patch? 

[mdadm.h] 
1737c1737 
< * a value for 'invalid'. Use '1'. 
--- 
> * a value for 'invalid'. Use '-1'. 
1739c1739 
< #define INVALID_SECTORS 1 
--- 
> #define INVALID_SECTORS 0xffff 
[mdadm.c] 
381,384c381,382 
< if (s.chunk == INVALID_SECTORS || 
< s.chunk < 8 || (s.chunk&1)) { 
< pr_err("invalid chunk/rounding value: %s\n", 
< optarg); 
--- 
> if (s.chunk == INVALID_SECTORS) { 
> pr_err("invalid chunk/rounding value: %s\n",optarg); 
[Build.c] 
387,388d384 
< /* Convert sectors to K */ 
< s.chunk /= 2; 
145c145 
< array.chunk_size = s->chunk*1024; 
--- 
> array.chunk_size = s->chunk*512; 
[Create.c] 
696c696 
< info.array.chunk_size = s->chunk*1024; 
--- 
> info.array.chunk_size = s->chunk*512;
--
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