1 (edited by aleixosk 2011-12-07 19:27:14)

Topic: [SOLVED] GParted unable to shrink ext4 partition

Hello all,

Last time I partitioned my hard disk without errors, it was with the Ubuntu 9.10 Live CD. Since then I haven't been able to shrink my main partition to less than a certain point. GParted seemed to be stuck, so I tried doing it manually. Then I noticed that resize2fs didn't get through past 3 (scanning inode table), so I tried with GParted Live 0.9.0-7(newest version at that time), Ubuntu 9.10 (as it was suggested here, only thread I found), even tried Paragon Partition Manager. I thought it may be a hardware problem since Paragon also failed, but is it possible that it has something to do with this bug?

e2fsck doesn't report anything, nor any other command I've tried. I need some help with this.

P.S.: haven't tried GParted Live 0.10.0-3, I kind of lost hope.

Thanks in advance.

2

Re: [SOLVED] GParted unable to shrink ext4 partition

Have you tried running "chkdsk /f /r" on the drive partition from Windows?

3

Re: [SOLVED] GParted unable to shrink ext4 partition

I don't have a Windows partition.

4

Re: [SOLVED] GParted unable to shrink ext4 partition

Would you be able to try running e2fsck from a live CD?

It is important that the ext4 file system is not mounted when you run the file system check command.

The command that GParted uses is:

e2fsck -f -y -v /path-to-your-ext4-partition

where /path-to-your-ext4-partition is something like /dev/sda1

5

Re: [SOLVED] GParted unable to shrink ext4 partition

Sure, I used gParted Live 0.9.0-7. Here's the output:

user@debian:~$ sudo e2fsck -f -y -v /dev/sda2
e2fsck 1.42-WIP (02-Jul-2011)
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

  352434 inodes used (4.61%)
     747 non-contiguous files (0.2%)
     502 non-contiguous directories (0.1%)
         # of inodes with ind/dind/tind blocks: 0/0/0
         Extent depth histogram: 300567/404/36
13244756 blocks used (43.27%)
       0 bad blocks
       2 large files

  258514 regular files
   36186 directories
      59 character device files
      26 block device files
       0 fifos
     566 links
   57635 symbolic links (51327 fast symbolic links)
       5 sockets
--------
  352991 files

I wasn't able to shrink the partition after it either.

6

Re: [SOLVED] GParted unable to shrink ext4 partition

Would you be able to try the resize operation, save the gparted_details.htm file, and then post the file here?

It is advisable to use the latest GParted Live 0.10.0-3 since this includes many updates.

7

Re: [SOLVED] GParted unable to shrink ext4 partition

I doubt the gparted_details.htm file would have been useful, since i had to stop the operation manually. I remember it was completely normal, as if it would've worked hadn't it been canceled.
Anyways, I tried to resize it with the latest version and it actually finally worked. Should I still provide some feedback?
Thanks for your help anyhow.

8

Re: [SOLVED] GParted unable to shrink ext4 partition

If the problem is fixed now, you can add [SOLVED] to the thread title by editing the initial post.

Later versions usually work better than older ones  smile  (although there are some rare exceptions).

*** It is highly recommended to backup any important files before doing resize/move operations. ***