[Top][All Lists]

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

Re: HFS and FAT FS-resizing returning soon (but to a separate library)

From: Jim Meyering
Subject: Re: HFS and FAT FS-resizing returning soon (but to a separate library)
Date: Sun, 15 Jan 2012 09:16:32 +0100

Chris Murphy wrote:

> On Jan 14, 2012, at 3:50 AM, Jim Meyering wrote:
>> I'm restoring resize capability (albeit only via a library)
>> that was present in parted-2.3/2.4 and earlier, so one way to check
>> is to actually use an older version of parted on HFS+/HFSX file systems.
> parted 2.3 successfully resizes (shrinks) an HFS+ volume. fsck_hfs on
> Mac OS X 10.6.8 automatically repaired invalid file count and free
> block count and automounted it. Unmounting and manually rebuilding the
> catalog with fsck_hfs -r finds additional problems which are reported
> to have been successfully repaired.

Those may indicate problems in parted's hfs* resizing code.
If you can find someone willing to fix them, please let us know.

> parted 2.3 will not resize a journaled HFS+ volume. It says:
> "Error: The sector size stored in the journal is not 512 bytes. Parted
> only supports 512 bytes length sectors."
> The disk is an AF 512e disk. Mac OS X sees the sectors as 512
> bytes. The VM sees them as 512 bytes as well. I don't understand what
> the error is about.

It's complaining that _HfsJJournalHeader.jhdr_size != sector_size (512).
What is its value for your disk? (you can see that by debugging parted
or by adding a print statement and recompiling)

        if (HFS_32_TO_CPU(jh->jhdr_size, is_le) != PED_SECTOR_SIZE_DEFAULT) {
                ped_exception_throw (
                        _("The sector size stored in the journal is not 512 "
                          "bytes.  Parted only supports 512 bytes length "
                return 0;

In http://dubeiko.com/development/FileSystems/HFSPLUS/tn1150.html,
you see some explanation:

    Because the journal does rely on accessing individual sectors, the
    sector size is stored in the jhdr_size field of the journal header
    (if the volume has a journal). ...

While I fixed the rest of parted to work with sectors larger
than 512 bytes (over 100 change sets), I fixed only the bare
minimum parts of the file system-manipulating code, i.e., open,
probe, close, but not resizing, so you can expect this restriction
to remain, unless someone else volunteers to work on it.

reply via email to

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