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

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



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.

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

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

-- 
        O T A V I O    S A L V A D O R
---------------------------------------------
 E-mail: otavio@debian.org      UIN: 5906116
 GNU/Linux User: 239058     GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
---------------------------------------------
"Microsoft sells you Windows ... Linux gives
 you the whole house."



Reply to: