[parted-devel] filesystem-related functions in libparted
Lisa Vitolo
syn.shainer at gmail.com
Wed Aug 1 16:16:56 UTC 2012
Thanks a lot. This was very useful!
Regards,
Lisa
2012/8/1 Curtis Gedak <gedakc at gmail.com>
> Hi Lisa,
>
> Responses to questions follow in-line.
>
>
> On 12-07-27 05:49 AM, Lisa Vitolo wrote:
>
>> I need to implement these two things:
>> 1) knowing the minimum size a partition can be resized to (for when there
>> is a filesystem and we don't want to destroy its data);
>>
>
> The minimum size for a partition depends on the minimum size of the file
> system. The minimum partition size can also be affected by the type of
> alignment used. For example with modern disk drives, the size of a
> cylinder is 255 heads * 63 sectors per track = 16,065 sectors. Please note
> that cylinder alignment is used for legacy operating systems, such as DOS.
> Newer operating systems and disk drives work well with, and often default
> to MiB alignment.
>
>
> 2) resizing a partition together with its filesystem, if resizing is
>> supported for that particular filesystem.
>> I've read that for resizing a filesystem I need to call directly the
>> filesystem services as you don't support it anymore starting from libparted
>> 3.0, and that's okay.
>>
>
> The resizing capability for FAT16, FAT32, HFS, and HFS+ was re-introduced
> in a separate library with parted 3.1.0.
>
>
> For the second task, from what I heard libparted still provides
>> ped_file_system_open and ped_file_system_get_resize_**constraint, but it
>> seems I'm not able to access them in my code. I've included the headers
>> parted.h and filesys.h, but I still receive an error from the compiler (not
>> the linker) that it doesn't find them. My version of parted is 3.0-1. What
>> am I missing? :)
>>
>
> I suggest that you start your project using the latest version of
> parted-3.1 (not 3.0-1).
> http://lists.gnu.org/archive/**html/bug-parted/2012-03/**msg00001.html<http://lists.gnu.org/archive/html/bug-parted/2012-03/msg00001.html>
>
> For an example of how to link with the new libparted-fs-resize library,
> you might look at the GParted source code. Specifically configure.in,
> and src/Makefile.am.
> http://gparted.org
>
> Regards,
> Curtis Gedak
>
>
>
--
They say a little knowledge is a dangerous thing, but it's not one half so
bad as a lot of ignorance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/parted-devel/attachments/20120801/303637b7/attachment.html>
More information about the parted-devel
mailing list