[parted-devel] resizing FAT partitions does not work at all

Jim Meyering jim at meyering.net
Fri Sep 25 08:15:11 UTC 2009


Curtis Gedak wrote:
> The script t3000-resize-fat.sh generates the same results for when I
> use parted-1.9.0.
>
> After some testing, it appears that parted does not like to resize
> FAT32 file systems if they are smaller than 256MB.
>
> By making the below posted changes to the script I was able to create
> a FAT32 file system of about 256 MB in size (aligned to a cylinder),
> and then successfully grow it by about 8MB (one cylinder).
>
> Hope this helps :-)
> Curtis Gedak

Hmm...
I tried what you suggested, but it still doesn't work with 1.9.
[however, I did track down one bug: two changes that recently
 moved from next to master modified FAT file system handling,
 and one introduced a bug.  I expect to revert them soon.]

Are you sure that your final resize succeeded?
If so, please show the actual commands you used
as well as before and after results of running this:

    parted -s $dev u s p

(I tried with 1.9 built from source, and the 1.8.8 from Fedora 11 as
well as the one from debian unstable -- all with this same result)
Here are the commands I used:

    dev=/dev/sde
    parted -s $dev mklabel gpt
    parted -s $dev mkpart primary fat32 63s 530144s

    # if needed, wait for the partition device (e.g., /dev/sdd1) to appear
    mkfs.vfat -F 32 ${dev}1
    parted -s $dev resize 1 63s 546147s

That final parted invocation always fails with this:

    No Implementation: GNU Parted cannot resize this partition to this size.
    We're working on it!

BTW, David Cantrell mentioned that HFS and HFS+ resize support
is in a similar position, so parted will have to retain it, too.

  http://bugzilla.redhat.com/523954#c3

For reference, here are the patches I'm looking at, now:

Add the test:
  [1/4] tests: attempt to resize a FAT file system
your changes:
  [2/4] tests: make t3000-resize-fat.sh pass
revert the fat FS changes:
  [3/4] Revert "Fix compile failures."
  [4/4] Revert "Add fat support for sector_size > 512."




More information about the parted-devel mailing list