bug-parted
[Top][All Lists]
Advanced

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

Re: bug with linux software raid


From: Jianbin Kang
Subject: Re: bug with linux software raid
Date: Mon, 20 Sep 2010 11:25:33 +0800

Thx for advance.
 I read the kernel source and found that for newer kernel (2.6.35.4,
maybe > 2.6.28),
 we can just scan /sys/block/`dev'/ext_range to get maximum supported
partitions.
 For extended-partition device, `ext_range' contains value '256'
(DISK_MAX_PARTS).
 For non-extended-partition device, `ext_range' is same as `range'.

                                                    Jianbin Kang

2010/9/20 Milan Niznansky <address@hidden>:
> Here is the subscription page:
> http://lists.gnu.org/mailman/listinfo/bug-parted
>
> As for the bug - observed that behavior too, but you are far more ahead
> on this :)
>
> Milan
>
>
> On Sun, 2010-09-19 at 23:30 +0800, 康剑斌 wrote:
>> Hello,
>> Parted fail to notify linux kernel with correct partitions information
>> with non-partitionable md devices. It is in fact partitionable when
>> kernel version > 2.6.28.
>>
>> The bug may be caused by `_device_get_partition_range()' in `linux.c'.
>> It reads /sys/block/`mddev'/range to get partition range of the raid
>> device. But in linux,
>> device with extended partitions support also has a sys file named
>> `ext_range'. The real range
>> of extended-partition device should be `range + ext_range - 1' (FIXME
>> ?). For md device, it has
>> value '1' in /sys/block/md1/range, and value '256' in
>> /sys/block/md1/ext_range, so it can support
>> 256 partitions. `_device_get_partition_range()' will return '1' in this
>> case, and parted then reports
>> only 1 partitions to the kernel.
>>
>> If a device with '1' in 'range' file and non-extended-partition support,
>> maybe `_device_get_partition_range()' should return 0 to indicate it
>> doesn't support partitions?
>>
>>
>> By the way, how to subscribe this mailing list?
>>
>>
>> Yours,
>> Jianbin Kange
>>
>>
>> _______________________________________________
>> bug-parted mailing list
>> address@hidden
>> http://lists.gnu.org/mailman/listinfo/bug-parted
>
>
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]