bug-parted
[Top][All Lists]
Advanced

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

Re: enlarging a partition


From: Pascal GREGIS
Subject: Re: enlarging a partition
Date: Fri, 14 Apr 2006 15:04:02 +0200
User-agent: Mutt/1.4.2.1i

Thank you Leslie for your patch.
However it's not enough for my needs because the type of filesystem is still 
checked so parted refuses to enlarge the partition marked xfs.
So I patched a little more so it doesn't check the filesystem type.
Here is my patch:
http://opensource.synerway.com/patchs/parted-1.7.0rc4-nofs_resize.patch

It seemd to work well until today.
I created a new partition /dev/hda4 lie it :
$ parted /dev/hda mkpart 25000 32000

I create an xfs on it:
$ mkfs.xfs /dev/hda4

Then I enlared it:
$ parted /dev/hda resize 4 25000 38000

And I got:
$ cat /proc/partitions
...
   3   4   12695312 /dev/hda4

Then I mounted it and performed a successfull xfs_growfs on it.

Then it appeared to not work anymore.
Here's what I did:
$ parted /dev/hda rm 4
$ parted /dev/hda print
...
 3   3000MB    25GB   22GB   xfs
$ parted /dev/hda resize 3 3000 38000
$ parted /dev/hda print
...
 3   3000MB    38GB   35GB   xfs
$ cat /proc/partitions
...
   3   3   21484375 /dev/hda4

The content in /proc/partitions indicates that the growth of the partition has 
not been taken into account by the system or the kernel.
Then mounting it and performing an xfs_growfs fails because it considers the 
partition is still 22GB large and there is no space left to enlarge the xfs 
filesystem.

It seems that parted does a part of the work wrong, probably because of my 
patch because I backported my patch for the 1.6.23 version of parted and it 
behaves the same.

It would be helpfull it you could have a look at my patch and tell me what's 
wrong if you can.
If you reply to this message, please make a group reply because I won't be here 
next week and my collegue that I put in cc can take the info.

Thank you a lot.

Pascal


address@hidden a écrit, le Fri 07 Apr 2006 à 11:25:49PM :
> 
> The previous patch might not work.  Please use this one.
> 
>   Leslie
> 
> -- 
> gpg --keyserver pgp.mit.edu --recv-keys 0x52D70289
> http://nic-nac-project.de/~skypher/

> --- parted.c.old      2006-04-07 18:53:14.000000000 +0200
> +++ parted.c  2006-04-07 23:23:55.000000000 +0200
> @@ -1610,20 +1610,14 @@
>                          goto error_destroy_constraint;
>                  ped_partition_set_system (part, NULL);
>          } else {
> +                constraint = constraint_from_start_end (*dev,
> +                                range_start, range_end);
>                  fs = ped_file_system_open (&part->geom);
>                  if (!fs)
>                          goto error_destroy_disk;
> -                constraint = constraint_intersect_and_destroy (
> -                                ped_file_system_get_resize_constraint (fs),
> -                                constraint_from_start_end (
> -                                        *dev, range_start, range_end));
>                  if (!ped_disk_set_partition_geom (disk, part, constraint,
>                                                    new_geom.start, 
> new_geom.end))
>                          goto error_close_fs;
> -                if (!ped_file_system_resize (fs, &part->geom, timer))
> -                        goto error_close_fs;
> -                /* may have changed... eg fat16 -> fat32 */
> -                ped_partition_set_system (part, fs->type);
>                  ped_file_system_close (fs);
>          }
>  







reply via email to

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