[Top][All Lists]

[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 17:38:36 +0200
User-agent: Mutt/

After some additionnal tests, it seems that there is something with the kernel.
I was using the kernel and it didn't reboot after I enlarged the 
partition with parted.
I just tested the same manip with kernel and this times it reboots 
correctly and takes the modification into account after the reboot.

It is somewhat problematic for me to change the kernel version, if I could make 
it work with the it would be great. Sadly I'm afreaid you can't 
probably do anything for me.

HOwever, if you just can tell me if my patch is correct or not, it would always 
be helpfull.

Thanks in advance.


PS: do not forget to group-reply if you reply to this mail.

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:

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 

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.


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]