Re: RAID size mismatch
martin f krafft <madduck@debian.org> writes:
> also sprach Ferenc Wagner <wferi@niif.hu> [2008.04.07.0111 +0200]:
>> After this partman presents me with the following menu items:
>>
>> 6. RAID1 device #0 - 8.3 MB Software RAID device
>> 7. > #1 4.2 MB
>>
>> What are those two different sizes?
>
> What does fdisk or cfdisk say? Do they also only see half the space?
Frans Pop <elendil@planet.nl> writes:
> Couldn't this just be some weirdness due to using /dev/ram?
Very well could. Actually, it is. See the fdisk -l ouput below:
~ # mdadm --create /dev/md0 --auto=yes -l1 -n2 /dev/ram0 /dev/ram1
mdadm: array /dev/md0 started.
~ # mdadm --create /dev/md1 --auto=yes -l1 -n2 /dev/xvdb /dev/xvdc
mdadm: array /dev/md1 started.
~ # cat /proc/mdstat
Personalities : [raid1]
md1 : active raid1 xvdc[1] xvdb[0]
16320 blocks [2/2] [UU]
md0 : active raid1 ram1[1] ram0[0]
8128 blocks [2/2] [UU]
~ # parted_devices
/dev/md1 16711680 Unknown
/dev/md0 4161536 Unknown
/dev/xvdc 16777216 Unknown
/dev/xvdb 16777216 Unknown
/dev/xvda 5368709120 Unknown
~ # fdisk -l [trimmed output]
Disk /dev/xvda: 5368 MB, 5368709120 bytes
255 heads, 63 sectors/track, 652 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/xvdb: 16 MB, 16777216 bytes
255 heads, 63 sectors/track, 2 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/xvdc: 16 MB, 16777216 bytes
255 heads, 63 sectors/track, 2 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Note: sector size is 1024 (not 512)
Disk /dev/md0: 8 MB, 8323072 bytes
2 heads, 4 sectors/track, 1016 cylinders
Units = cylinders of 8 * 1024 = 8192 bytes
Disk /dev/md1: 16 MB, 16711680 bytes
2 heads, 4 sectors/track, 4080 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Which shows that the ramdisk sector size is 1024 bytes, which probably
is the root of all evil. The partman menu looks like this:
6. RAID1 device #0 - 8.3 MB Software RAID device
7. > #1 4.2 MB
8. RAID1 device #1 - 16.7 MB Software RAID device
9. > #1 16.7 MB
10. /dev/xvda - 5.4 GB Unknown
11. /dev/xvdb - 16.8 MB Unknown
12. /dev/xvdc - 16.8 MB Unknown
I agree that installation into a RAID device over ramdisks isn't
something D-I should care much about, but can't this problem arise on
more persistend storage types perhaps?
--
Thanks,
Feri.
Reply to: