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

Bug#474698: partman-base: Inconsistent output if sector size != 512 bytes



Otavio Salvador <otavio@debian.org> writes:

> Ferenc Wagner <wferi@niif.hu> writes:
>
>> Frans Pop <elendil@planet.nl> writes:
>>
>>> On Tuesday 08 April 2008, Ferenc Wagner wrote:
>>>> I can imagine that the following patch would fix this issue:
>>>
>>> Looks logical.
>>
>> And it indeed fixes the parted_devices output (thanks for compiling
>> it!), but unfortunately not the partman dialog.  Because that gets the
>> info straight from parted_server in partman-md/init.d/md-devices:
>>
>>         open_dialog PARTITIONS
>>         free_space=''
>>         while { read_line num id size type fs path name; [ "$id" ]; }; do
>>                 if [ "$fs" = free ]; then
>>                         free_space=$id
>>                         free_size=$size
>>                 fi
>>         done
>>         close_dialog
>>
>> In the present case parted_server returns:
>> num=(-1) id=(0-4161535) size=(4161536) type=(primary) fs=(free) path=(/dev/md0) name=()
>> that is, it erroneously reports half the real size.
>>
>> I could go on to replace PED_SECTOR_SIZE_DEFAULT with dev->sector_size
>> throughout partman-base/parted_server.c, but I'm getting suspicious.
>> Isn't there a good reason for this state of affairs?
>
> Yes. Parted support for sector size different from 512 is a work in
> progress. It works for most cases but some doesn't.

Thanks, that clears it up.

> Do you have any disk with sector size bigger then 512 bytes for
> testing? ramdisk is not the best way of doing that.

RAID1 of two ramdisks... :)  Jokes aside, fdisk says it has sector
size 1024 and parted can open it (but not the constituent ramdisks).

> I've made a test patch locally here but I can't test it.

Unfortunately I don't have any such real hardware either, but why not
test with the above trick?
-- 
Regards,
Feri.



Reply to: