Partitions with == or \approx same size ?

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

 



Dear all,


First I'd like to thank you for the great work you've done with mdadm.
It's flexible, powerful and reasonably easy to use.

I have a question that seems both important for the redundancy of my RAID6
devices and too sharp for me, my friends and the newsgroup
fr.comp.stockage . I think your understanding of the inner workings of
mdadm should allow you to already know the answer.

A 12-disks machine was recently assembled with disks coming from several
sources (Linux Ubuntu server, kernel 2.6.15, RAID6 array). All 12 disks
are S-ATA with 250 GB capacity.

I understand that partitions should have the same size, meaning the same
number of bytes. All 12 disks have exactly 250059350016 bytes, but the
number of blocks that can be allocated are not the same from one disk to
another, ranging from 244196001 to 244198384. Small difference, but
significant nonetheless if this means that data can be lost. So I looked
for a number of blocks that would be the same for all disks. But the
number of blocks cannot be imposed when creating a partition, only the
number of cylinders.

On the disks with 244196001 blocks, 'fdisk -l' says:
	Units = cylinders of 16065 * 512 = 8225280 bytes

For the other half, it says:
	Units = cylinders of 2048 * 512 = 1048576 bytes

Since 16065 and 2048 have no common divisor, the smallest multiple common
to 8225280 and 1048576 is 8225280 × 1048576 / 512 = 16845373440. Thus
trying to have exactly the same number of bytes in each partition means
choosing a partition size that is a multiple of roughly 16 GB. Now the
total size (250059350016) divided by this step (16845373440) is roughly
14.84. I can only have 14 steps, leading to a partition size of
235835228160 and a loss of \approx 15 GB per disk or 150 GB total. That's
a lot.


Now I imagine that there might be embedded in mdadm a correction
mechanism. Since each partition is divided into stripes, the number of
stripes for each disk could be the number of stripes on the smallest
partition of the array. Thus I could create partitions as big as each disk
supports, and 'mdadm' would take care of the small differences. I'd have
my 150 GB back.

Could you tell me if such a mechanism exists in mdadm?
Or should I accept the "loss" of the 150 GB?


Thanks a lot for your help!
Sébastien.
-
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