1 (edited by david@infonet.com.br 2011-12-16 20:41:15)

Topic: resize (grown) incomplete

In last night tried to do an resize of the partition of our server Dell Power Edge 2900 / PERC 6/i with the GParted Live CD. But before the beginning of the expansion process, GParted first started the 'checking file system'.

    After two and a half hours, not knowing when the process would end, I decided then to cancel it, it is a web server in production.

    After the system boot, I ran parted in the shell, to see if anything was wrong, and to my surprise the partition had been expanded, but that's the problem: when I run the command 'df -h' it tells me the original size, without the expansion.


- See below the result through the print in parted, the partition is the number 5: 

Model: DELL PERC 6/i (scsi)
Disk /dev/sda: 2096GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type      File system  Flags
1      32.3kB  107MB   107MB   primary   ext3         boot
2      107MB   42.0GB  41.9GB  primary   ext3
3      42.0GB  50.4GB  8390MB  primary   linux-swap
4      50.4GB  2096GB  2046GB  extended
5      50.4GB  2096GB  2046GB  logical   ext3

Size of partition number 5: 2046GB (expanded!!!)

- See now, below, the result via the 'df -h', the partition is /dev/sda5:

[root@itabi ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda2              38G   11G   26G  29% /
/dev/sda1              99M   39M   56M  41% /boot
tmpfs                 8.0G     0  8.0G   0% /dev/shm
/dev/sda5             1.3T  1.1T  170G  87% /infonet
tmpfs                 768M  143M  626M  19% /infonet/httpd-webmail/var/www/tmpsession

Size of partition number 5 (/dev/sda5):  1.3T (not expanded!!!)


    Any idea how to fix this?

2

Re: resize (grown) incomplete

The expand process includes steps such as grow partition, and grow file system in that order.

It would appear that the grow partition completed successfully, but that the file system grow was not completed.

Since you interrupted the process mid-stream, I suggest that you run a file system check to get the file system in a consistent state.

Then you can either:
a)  Use the menu option "Partition --> Check" on sda5 to check and grow the file system to fit within the partition.
  or
b)  Use the menu option "Partition --> Resize/Move" on sda5 if you wish to shrink the partition back to it's original size.

3

Re: resize (grown) incomplete

gedakc wrote:

a)  Use the menu option "Partition --> Check" on sda5 to check and grow the file system to fit within the partition.

It is this option (e2fsck) that takes a long time? Which I cancel? Is there some other way to fix this inconsistency that does not take so long?


gedakc wrote:

b)  Use the menu option "Partition --> Resize/Move" on sda5 if you wish to shrink the partition back to it's original size.

I would not shrink.  sad

Gparted always runs automatically the e2fsck or it only runs when it finds any inconsistency in the partition?

The parted utility (in the shell command) also performs this check to resize the partition?

Thanks for you help.

4

Re: resize (grown) incomplete

david@infonet.com.br wrote:

It is this option (e2fsck) that takes a long time? Which I cancel? Is there some other way to fix this inconsistency that does not take so long?

If this takes a very long time to run, then the file system is most likely in need of some repairs.  It would be best to run the file system check through to completion, even if it does take a long time.

5

Re: resize (grown) incomplete

Gparted always runs automatically the e2fsck? If so, it runs e2fsck with the '-f' option (Force checking even if the file system seems clean)?

6

Re: resize (grown) incomplete

GParted will always run a file system check before resizing a partition.  I believe that this is the safest way to try to reduce the possibility of data loss.

7

Re: resize (grown) incomplete

gedakc wrote:

The expand process includes steps such as grow partition, and grow file system in that order.

It would appear that the grow partition completed successfully, but that the file system grow was not completed.

You're right.

Then searching about grow of the filesystem on RedHat, found the utility 'resize2fs'.

Then run the command 'resize2fs / dev/sda5', online, and everything was ok.

Thank you.

8

Re: resize (grown) incomplete

'Glad to hear you were able to resolve the problem.  smile

To help others searching for answers to similar problems, you can edit the initial post and prefix "SOLVED" in front of the title.

9

Re: resize (grown) incomplete

gedakc wrote:

To help others searching for answers to similar problems, you can edit the initial post and prefix "SOLVED" in front of the title.

When I try to edit the post:

"Warning! The following errors must be corrected before your message can be posted:
•Too more links in message. Allowed 0 links. Reduce number of links and post it again."

What kind of link?

10

Re: resize (grown) incomplete

Good question David.  This might be related to the recent upgrade of the forum software.  I will bring this to the attention of the forum administrator, JanC.

11

Re: resize (grown) incomplete

Can you change it now?