1

Topic: Resized partition- df still shows old size.

From another post for a SuSE forum:
I just resized several partitions on my disk (which is in itself a fairly scary thought...) with GParted. Everything was going smoothly until GParted just crashed, but from what I could tell, it was finished. It had enlarged/moved my SuSE seemingly correctly, and Yast was able to see the new size of 61 or so GBs.

The problem is, df nor any method except Yast seem to notice the change. I'm not sure if this will take another reboot but I'd like my extra 17 gigs to be usable.

Also, after checking things out in Konqueror I found that its idea of my partition was more or less totally inaccurate. It labeled the partition as "66G Media" but it reported the volume to be only '43.7' GBs.

So did something not copy/repartition correctly or do I need to do anything special to make that space usable?
---------------------------------------------------------
I decided to come here after deciding the people who wrote the software probably knew more smile
So:
Since the posting, I decided that the partition was resized, but the filesystem was never grown to fill the space. I'm sure there's a way to grow it (manually from the livecd or something) but I just don't know how. Any ideas?

2

Re: Resized partition- df still shows old size.

timothyb89 wrote:

Since the posting, I decided that the partition was resized, but the filesystem was never grown to fill the space. I'm sure there's a way to grow it (manually from the livecd or something)

Hm, and what about the FS ? You didn't mention any kind of  !
Probably ext3 ? maybe reiserfs :-/
Anyway, using fdisk will show you how it is atm.

Larry
GParted-project Admin
Former GParted-LiveCD maintainer (2007)

3

Re: Resized partition- df still shows old size.

Yes, it is ext3, sorry about that.

4

Re: Resized partition- df still shows old size.

So is this the problem, or could my filesystem be corrupt? When I posted on another forum, I was told that my data could possibly disappear on a reboot. And there might be damage already, so is it safe to even use the partition?

LarryT wrote:

Anyway, using fdisk will show you how it is atm.

What did you mean by that?

5

Re: Resized partition- df still shows old size.

Givbe the output of the following command, please :

# fdisk -l

This will show up if something is wrong with partition and even file system.

Larry
GParted-project Admin
Former GParted-LiveCD maintainer (2007)

6

Re: Resized partition- df still shows old size.

Thanks for the reply!

Anyway, heres the output from fdisk:

$ fdisk -l

Disk /dev/sda: 160.0 GB, 160000000000 bytes
255 heads, 63 sectors/track, 19452 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1           6       48163+  de  Dell Utility
/dev/sda2   *           7        3664    29382885    7  HPFS/NTFS
/dev/sda3           19061       19452     3148740   db  CP/M / CTOS / ...
/dev/sda4            3665       19060   123668370    5  Extended
/dev/sda5            3665        6665    24105501   83  Linux
/dev/sda6            8007       10005    16056936    7  HPFS/NTFS
/dev/sda7           10006       10475     3775243+   b  W95 FAT32
/dev/sda8           18506       19060     4458006   82  Linux swap / Solaris
/dev/sda9           10476       18505    64500943+  83  Linux
/dev/sda10           6666        8006    10771551   83  Linux

Partition table entries are not in disk order

And the partition in question is /dev/sda9

I don't know what this means, but I'm guessing that the + at the end of the two partitions isn't a good thing, seeing as I know /dev/sda1 is damaged and it also has the '+'

Just in case, here is the output from fdisk -v:

$ fdisk -v
fdisk v2.12r

And now bash and dcop are proving to haver some issues, and bash seems to give this:

shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory

I don't know if it means anything, but I guess it could be important. Many of my KDE apps are giving errors about dcopserver not running, but when I restart it (as it is running) it doesn't do anything but crash everything.

7

Re: Resized partition- df still shows old size.

I think this may be a problem with parted or the kernel-- I use parted (not with the gparted front end) from the command line, and I have the same problem after resizing. In this case, /dev/hdc5 is the issue.

A bunch of tools (see below), including e2fsck, show 8 GB on hdc5. However, df reports hdc5 only has 5GB, and linux tells me hdc5 is out of space after I use up 136552 Kbytes.

Here are examples of the outputs giving the sizes.

fdisk -l shows:
# fdisk -l /dev/hdc

Disk /dev/hdc: 30.7 GB, 30750031872 bytes
255 heads, 63 sectors/track, 3738 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdc1   *           1         892     7164958+   c  W95 FAT32 (LBA)
/dev/hdc3             893        3738    22860495    f  W95 Ext'd (LBA)
/dev/hdc5             893        1912     8193118+  83  Linux
/dev/hdc6            1913        3738    14667313+  83  Linux

df shows the ORIGINAL size of about 5GB, not the new 8GB size.
# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/hdc5              5233940   4831516    136552  98% /
tmpfs                   128016         0    128016   0% /dev/shm
/dev/hdc6             13409184   3764784   8963248  30% /home

parted shows
# parted /dev/hdc print
Disk geometry for /dev/hdc: 0.000-29325.515 megabytes
Disk label type: msdos
Minor    Start       End     Type      Filesystem  Flags
1          0.031   6997.060  primary   fat32       boot, lba
3       6997.061  29321.762  extended              lba
5       6997.091  14998.183  logical   ext3       
6      14998.214  29321.762  logical   ext3       
Information: Don't forget to update /etc/fstab, if necessary.             


Versions:
# parted --version
GNU Parted 1.6.21 with HFS shrink patch 16
falcon:~# df --version
df (coreutils) 5.2.1
Written by Torbjorn Granlund, David MacKenzie, and Paul Eggert.

Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

# uname -a
Linux falcon 2.4.27-2-386 #1 Wed Aug 17 09:33:35 UTC 2005 i686 GNU/Linux

(That's Debian Sarge).

8

Re: Resized partition- df still shows old size.

I rebooted into the livecd and ran fsck from there, and my undersized partition was detected smile
GParted was able to finish resizing and now everything is working again smile