WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: 30GB partition only allowing <1GB ?  (Read 5971 times)

Offline mb0

  • Jr. Member
  • **
  • Posts: 86
30GB partition only allowing <1GB ?
« on: August 01, 2012, 10:12:03 AM »
i created the partition /dev/sda2 to be 30GB, (fdisk shows 31254426 blocks), but `df /dev/sda2` shows it's size as 950MB, and i have just been told it's full when copying files to it. What's up with this??

Offline Lee

  • Hero Member
  • *****
  • Posts: 645
    • My Core wiki user page
Re: 30GB partition only allowing <1GB ?
« Reply #1 on: August 01, 2012, 10:21:21 AM »
df shows the free space on a mounted fs, so try

df /mnt/sda2

If sda2 is mounted this should show its free space,otherwise it will show the free space of the root fs (which is likely in RAM, so not large)
32 bit core4.7.7, Xprogs, Xorg-7.6, wbar, jwm  |  - Testing -
PPR, data persistence through filetool.sh          |  32 bit core 8.0 alpha 1
USB Flash drive, one partition, ext2, grub4dos  | Otherwise similar

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: 30GB partition only allowing <1GB ?
« Reply #2 on: August 01, 2012, 10:24:54 AM »
Also don't forget to mount partion. Use

df -h ...

to get result in "human readable" units.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline mb0

  • Jr. Member
  • **
  • Posts: 86
Re: 30GB partition only allowing <1GB ?
« Reply #3 on: August 01, 2012, 10:27:14 AM »
It is mounted and `df /mountpoint` returns exactly the same

(and FWIW it is already bigger than the RAM in the system)
« Last Edit: August 01, 2012, 10:29:56 AM by mb0 »

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: 30GB partition only allowing <1GB ?
« Reply #4 on: August 01, 2012, 10:29:29 AM »
In case you mistakenly exhausted the space of your rootfs, better delete those files as soon as possible to prevent any consequences.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: 30GB partition only allowing <1GB ?
« Reply #5 on: August 01, 2012, 10:31:28 AM »
Best to run a fsck, after umounting first.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline mb0

  • Jr. Member
  • **
  • Posts: 86
Re: 30GB partition only allowing <1GB ?
« Reply #6 on: August 01, 2012, 10:36:57 AM »
fsck /dev/sda2:
Code: [Select]
fsck (busybox 1.19.3, 2011-10-30 01:47:29 UTC)
e2fsck 1.41.14 (22-Dec-2010)
/dev/sda2 has been mounted 922 times without being checked, check forced.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
/lost+found not found.  Create<y>? yes

Pass 4: Checking reference counts
Pass 5: Checking group summary information

/dev/sda2: ***** FILE SYSTEM WAS MODIFIED *****
/dev/sda2: 162/62848 files (42.0% non-contiguous), 249033/251007 blocks

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: 30GB partition only allowing <1GB ?
« Reply #7 on: August 01, 2012, 10:48:03 AM »
That filesystem looks suspicious in several aspects...

mounted 922 times without being checked - is that about consistent with its history?

42.0% non-contiguous - unusually high!

/lost+found not found. - shouldn't occur without serious fs corruption (unless it was rm'ed manually)

Which fs type is that exactly? journalled or not?


"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline mb0

  • Jr. Member
  • **
  • Posts: 86
Re: 30GB partition only allowing <1GB ?
« Reply #8 on: August 01, 2012, 10:53:20 AM »
it's ext4.. 922 times does seem higher than i would have expected (probably expected closer to 90?) and it's never been fsck'd..

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: 30GB partition only allowing <1GB ?
« Reply #9 on: August 01, 2012, 11:04:02 AM »
Can you run another fsck but with the "-v" option and post output again?
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline mb0

  • Jr. Member
  • **
  • Posts: 86
Re: 30GB partition only allowing <1GB ?
« Reply #10 on: August 01, 2012, 11:09:58 AM »
sudo fsck -v /dev/sda2:
Code: [Select]
fsck (busybox 1.19.3, 2011-10-30 01:47:29 UTC)
e2fsck 1.41.14 (22-Dec-2010)
/dev/sda2: clean, 162/62848 files, 249033/251007 blocks

intersting huh?

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: 30GB partition only allowing <1GB ?
« Reply #11 on: August 01, 2012, 11:13:22 AM »
Oh, sorry, make that "-vf". ;)
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline mb0

  • Jr. Member
  • **
  • Posts: 86
Re: 30GB partition only allowing <1GB ?
« Reply #12 on: August 01, 2012, 11:18:06 AM »
Code: [Select]
fsck (busybox 1.19.3, 2011-10-30 01:47:29 UTC)
e2fsck 1.41.14 (22-Dec-2010)
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

     162 inodes used (0.26%)
      68 non-contiguous files (42.0%)
       0 non-contiguous directories (0.0%)
         # of inodes with ind/dind/tind blocks: 0/0/0
         Extent depth histogram: 150/2
  249033 blocks used (99.21%)
       0 bad blocks
       1 large file

     139 regular files
      14 directories
       0 character device files
       0 block device files
       0 fifos
       0 links
       0 symbolic links (0 fast symbolic links)
       0 sockets
--------
     153 files

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: 30GB partition only allowing <1GB ?
« Reply #13 on: August 01, 2012, 11:29:26 AM »
"249033 blocks used (99.21%)" appears to agree with output of df.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline mb0

  • Jr. Member
  • **
  • Posts: 86
Re: 30GB partition only allowing <1GB ?
« Reply #14 on: August 01, 2012, 11:45:58 AM »
yes, but..

fdisk /dev/sda, 'p'

Code: [Select]
Disk /dev/sda: 40.0 GB, 40007761920 bytes
255 heads, 63 sectors/track, 4864 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks  Id System
/dev/sda1   *        3892        4864     7815622+ 83 Linux
/dev/sda2               1        3891    31254426  83 Linux

Partition table entries are not in disk order
Which is in line with what i expected.