1 (edited by dhumble 2010-02-20 17:40:49)

Topic: SOLVED: Resized ext3 but system does not see new size

I wanted to upgrade from Kubuntu Jaunty (9.04) to Karmic (9.10) but the upgrader told me that I needed an extra more space on '/'.  I did all the tidying up I could and then ran GParted from the booted System Rescue v1.3.4 CD.

I first moved the swap to the end of the physical disk and then I resized /dev/sda6 to 14GiB.  This was successful and gave me 8.21GiB free.  However, when I rebooted into Kubuntu 9.04 it only gave the original size...

g0twn@G0TWN:~$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda6             8.0G  5.7G  1.9G  76% /
tmpfs                1007M     0 1007M   0% /lib/init/rw
varrun               1007M  332K 1007M   1% /var/run
varlock              1007M     0 1007M   0% /var/lock
udev                 1007M  164K 1007M   1% /dev
tmpfs                1007M   12K 1007M   1% /dev/shm
lrm                  1007M  2.2M 1005M   1% /lib/modules/2.6.28-18-generic/volatile
/dev/sda5              41G   30G   11G  75% /media/My Documents
/dev/sdb1             148G   50G   97G  34% /home
g0twn@G0TWN:~$


I then ran GParted in Kubuntu to check and even it showed '/' as now being 14GiB but the system still thinks it is 8GB!???


David

2

Re: SOLVED: Resized ext3 but system does not see new size

If the partition has grown, but the file system is still the original size then you can fix this problem by booting System Rescue CD, selecting the partition, choosing the menu item "Partition --> Check", and then applying this operation.

Hope that helps.

3

Re: SOLVED: Resized ext3 but system does not see new size

Hi gedakc,

Thank you for your time.  If you meant, "boot System Rescue CD, start GParted, select the partition, choosing the menu item "Partition --> Check", and then applying this operation.", then that did not help.

g0twn@G0TWN:~$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda6             8.0G  5.7G  1.9G  76% /
tmpfs                1007M     0 1007M   0% /lib/init/rw
varrun               1007M  316K 1007M   1% /var/run
varlock              1007M     0 1007M   0% /var/lock
udev                 1007M  164K 1007M   1% /dev
tmpfs                1007M   12K 1007M   1% /dev/shm
lrm                  1007M  2.2M 1005M   1% /lib/modules/2.6.28-18-generic/volatile
/dev/sda5              41G   30G   11G  75% /media/My Documents
/dev/sdb1             148G   50G   97G  34% /home
g0twn@G0TWN:~$

GParted 0.4.8
Libparted 1.8.8.git-dirty
Check and repair file system (ext3) on /dev/sda6  00:01:31    ( SUCCESS )
     
   calibrate /dev/sda6  00:00:01    ( SUCCESS )
     
  path: /dev/sda6
start: 167782923
end: 197149679
size: 29366757 (14.00 GiB)
   check file system on /dev/sda6 for errors and (if possible) fix them  00:01:30    ( SUCCESS )
     
  e2fsck -f -y -v /dev/sda6
     
  Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information

229835 inodes used (25.02%)
7107 non-contiguous inodes (3.1%)
# of inodes with ind/dind/tind blocks: 14228/124/0
1518631 blocks used (41.37%)
0 bad blocks
1 large file

187400 regular files
21809 directories
112 character device files
26 block device files
2 fifos
507 links
20476 symbolic links (18612 fast symbolic links)
1 socket
--------

David

4

Re: SOLVED: Resized ext3 but system does not see new size

It is possible that you have encountered the following problem:
WARNING! Problem Resizing File Systems with GParted

Would you be able to provide the output from the following two commands?

fdisk -l -u

where one of the options is a lower case "L" and not the number one.

parted /path-to-your-device unit s print

where /path-to-your-device is something like /dev/sda.

5

Re: SOLVED: Resized ext3 but system does not see new size

g0twn@G0TWN:~$ sudo fdisk -l -u                                 
[sudo] password for g0twn:                                       

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x09520951

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63    83891429    41945683+   7  HPFS/NTFS
/dev/sda2        83891430   312576704   114342637+   f  W95 Ext'd (LBA)
/dev/sda5        83891493   167782859    41945683+   7  HPFS/NTFS
/dev/sda6       167782923   197149679    14683378+  83  Linux
/dev/sda7       304399683   312576704     4088511   82  Linux swap / Solaris
/dev/sda8       287627823   304399619     8385898+  83  Linux

Partition table entries are not in disk order

Disk /dev/sdb: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0xe0b7e0b7

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1              63   312576704   156288321   83  Linux


g0twn@G0TWN:~$ sudo parted /dev/sda6 unit s print
Model: Unknown (unknown)
Disk /dev/sda6: 29366757s
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number  Start  End        Size       File system  Flags
1      0s     29366756s  29366757s  ext3

sda8 is a temporary copy I made of sda6.  Just in case I lost data.

David

6

Re: SOLVED: Resized ext3 but system does not see new size

It is always advisable to have a backup copy of your data before editing partitions.  For the best protection it is best to have the backup on separate media.  Also you should be aware that when GParted makes a copy of the partition, it maintains all data such as the volume label and UUID.  Some GNU/Linux distributions mount partitions based on the UUID, so if these numbers are left the same on the same computer system then unpredictable results can occur when the file system is used.

Now on to your problem.

It appears that you still have empty space after the sda6 partition.
Would you be able to try growing the partition to it's original size using GParted Live 0.5.1-1?

My hope is that this will be a simple way to return the computer system to the way it was prior to the initial shrink operation.  Then the partition can be resized smaller.  Otherwise we might need to perform some hexediting.

7 (edited by dhumble 2010-02-20 17:41:34)

Re: SOLVED: Resized ext3 but system does not see new size

Many thanks for your time gedakc.  Yes, I do backup to another machine.  I was probably being over cautious whilst getting to grips with GParted.

I took your advice and things now seem OK.

g0twn@G0TWN:~$ sudo fdisk -l -u

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x09520951

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63    83891429    41945683+   7  HPFS/NTFS
/dev/sda2        83891430   312576704   114342637+   f  W95 Ext'd (LBA)
/dev/sda5        83891493   167782859    41945683+   7  HPFS/NTFS
/dev/sda6       167782923   197149679    14683378+  83  Linux
/dev/sda7       197149743   205326764     4088511   82  Linux swap / Solaris
/dev/sda8       205326828   312576704    53624938+  83  Linux

Disk /dev/sdb: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0xe0b7e0b7

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1              63   312576704   156288321   83  Linux

g0twn@G0TWN:~$ sudo parted /dev/sda6 unit s print
Model: Unknown (unknown)
Disk /dev/sda6: 29366757s
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number  Start  End        Size       File system  Flags
1      0s     29366756s  29366757s  ext3

smile  David

8

Re: SOLVED: Resized ext3 but system does not see new size

I am glad to hear that the problem is now solved.  smile

And thank you for editing your initial post to prefix the title with SOLVED.

9 (edited by Spinkow 2012-06-19 14:01:04)

Re: SOLVED: Resized ext3 but system does not see new size

Hi, guys, registered to thank you for the  great solution provided in here. You've saved tones of my nerves and time!  smile

10 (edited by tracey55 2013-07-08 07:26:13)

Re: SOLVED: Resized ext3 but system does not see new size

Thanks! I was having this issue, your ADS Press solution worked for me too!