Why is there only 37.5 GB showing on my 1 TB hard drive?

12,280

Solution 1

You have a quite small root partition for system files and applications, most of the disk space is in your home partition for user data.

You will either need to clean up the root partition mainly by uninstalling applications, or also removing log and cache files and such things, or you have to modify your partition layout and shrink your home and grow the system partition. The latter will be a better long-term solution, as you're not going to need less system space in the future, naturally.

To modify partitions, you will have to boot into a live system, as partitions can usually not be resized while they are mounted. To do this, you can boot from the Ubuntu installer USB/DVD and select "Try Ubuntu without installing". This gives you a live desktop where you can use GParted to edit your partitions.

As your home partition is nearly empty currently and it does not look like you'll fill it up soon, I'd be generous and give the root partition around 200GB. Even 100GB should be more than necessary, but you have the space anyway.

Note that any partitioning or file system resize operation always comes with a small risk of data loss or corruption, so making a backup of your data is advisable.

Solution 2

Let's see:

/dev/sda7        38G   35G  989M  98% /
/dev/sda4       487M     0  487M   0% /media/neil/HP_TOOLS
/dev/sda5       868G  113M  823G   1% /media/neil/HOME
/dev/sda1       200M   30M  170M  15% /media/neil/BOOT

All four volumes are on that same 1 terabyte hard drive named /dev/sda. You have a 38G root partition, but your /media/neil/HOME is 868G. That's the bulk of the disk. Someone partitioned things this way, and so that's what it is.

Note that under df, the unsuffixed K, M or G units are 1024-based, whereas the size of your 1TB drive is 1000-based. 907 classic gigabytes (907 x 1024 x 1024 x 1024) works out to 973 GB. There is still a bit missing there toward a terabyte; maybe you have a large swap partition, or perhaps more than one? Note that we are not seeing partitions /dev/sda2, /dev/sda3 and /dev/sda6. From the df output, which shows only mounted filesystems, we have no idea how large these are and what they are used for, if anything.

Solution 3

I think 40gb is enough for root file system. 1tb hard drive was partitioned well enough but not mounted correctly. In current scheme your personal files(aside of system files) was reside on the root partition. /dev/sda5 that mounted on /media/neil/HOME should be mounted on /home. I assume the username you're using was Neil. You should make folder on /media/neil/home/Neil and move all files from your home folder /home/Neil to there. Then you should make changes to /etc/fstab to mount /dev/sda5 at /home.

Solution 4

What's wrong with 'du -sh /*' ? It will show you what root folder takes up the space, then you can go from there. Though I agree most probably your home folder is on the wrong partition.. you could check with 'echo ~neil'

Share:
12,280

Related videos on Youtube

Genius149
Author by

Genius149

Updated on September 18, 2022

Comments

  • Genius149
    Genius149 over 1 year

    In the last couple of days, Ubuntu 19.04 (Disco Dingo) has been flashing at me saying I've got about 360 MB left and my / folder shows a pie chart with 37.5 GB in the middle of it. It is a 3 year old HP ProBook with an 1 TB disk that came with Ubuntu pre-installed

    Surely Ubuntu doesn't suddenly take up nearly a terabyte of space?

    Output of df -h -x{tmp,devtmp,squash}fs:

    Filesystem      Size  Used Avail Use% Mounted on
    /dev/sda7        38G   35G  989M  98% /
    /dev/sda4       487M     0  487M   0% /media/neil/HP_TOOLS
    /dev/sda5       868G  113M  823G   1% /media/neil/HOME
    /dev/sda1       200M   30M  170M  15% /media/neil/BOOT
    

    Does this help explain the missing GB? Screenshot of Disk

    • Byte Commander
      Byte Commander almost 5 years
      Can you edit your question and include the output of typing df -h -x{tmp,devtmp,squash}fs in a terminal please?
    • Rinzwind
      Rinzwind almost 5 years
      Got a trash bin on that disk? And do a smart test... It could just be broken. Or also possible a filesystem check
    • Genius149
      Genius149 almost 5 years
      Hi Rinzwind, yes I have a trashbin - and it's empty. I've managed to run autoclean and cleaned my cache using what I assume is the Ubuntu equivalent of the DOS command prompt that Windows users know and love. The bit that confuses me is that my my thing said 40.2Gb available. I think I may have fixed it though...
    • Genius149
      Genius149 almost 5 years
      Hopefully I've solved my own problem. In the Disk Usage Analyser, I clicked the < symbol in the top left then clicked on each of the folders. Hopefully my screen shot will show what I mean - if I can work out how to post it!
    • vidarlo
      vidarlo almost 5 years
      @Genius149 Open a terminal, and run df -h -x{tmp,devtmp,squash}fs . Edit the full output into your question.
    • Genius149
      Genius149 almost 5 years
      I think I've done it @ByteCommander I did try copying some files over to my HOME folder but then it said "you don't have permissions to edit" so only a partial success. It's late for me now so I'll pick it up in the morning but thanks for your help so far :)
    • mook765
      mook765 almost 5 years
      Run sudo chown $USER: /media/neil/HOME to get permission. This partition is not a /home-partition, thus all your files in /home reside in your root-partition. The root-partition seems to hold all your documents and videos and so on. The big partition is empty, probably meant to be a /home-partition but not mounted at /home.
    • mook765
      mook765 almost 5 years
      Also sda1 looks strange, from size and usage I'd say it is the EFI System Partition, but why it's not mounted at /boot/efi?
    • Genius149
      Genius149 almost 5 years
      I tried that and chown: cannot access '/media/neil/HOME': No such file or directory was the result. Resizing and mounting partitions is new to me so I haven't got a scooby why things are mounted why or where. I'll have a tinker with it once I've done a back up.
    • vaquito
      vaquito almost 5 years
      Consider backing up what you need to save on another disk, and reinstall Ubuntu where you tell it to use the whole disk erasing everything. This will give you a useful partition layout. Then restore from the backup what you need.
    • tatsu
      tatsu almost 5 years
      @Genius149 if one of the answers solved your problem, please mark it by clicking the checkmark next to it (which turns green to signify that it is the answer).
    • Genius149
      Genius149 almost 5 years
      Thanks Tatsu. They probably all have in their own particular way. Retelling this question at work has resulted in the offer of a 128GB SSD so I'll just transfer it all on to that - probably via my 64GB USB stick.
  • vidarlo
    vidarlo almost 5 years
    I'm guessing that the actual home directory is also on /. Moving files from ~ to the /media/neil/HOME and mounting it on /home would probably help...
  • Genius149
    Genius149 almost 5 years
    Yes @Kaz That may have either happened when I first got it as that is what I used to do with Windows partitions and just used the space on the other partition for storage, or it arrived like that. It's taken me 3 years to get to this stage though. I've a vague understanding of your second paragraph but being a relative Ubuntu/Linux noob, I'm afraid it doesn't really mean much. I think as I investigate this it might start to make sense.
  • phuclv
    phuclv almost 5 years
    @Genius149 the 1024-based units and are what Windows uses and are binary prefixes in Ubuntu. Ubuntu GUI nowadays uses SI prefixes where 1 kB = 1000 byte. A 1 TB drive contains 1000 TB which is only 973 GiB but your drive has 38 GiB + 487 MiB + 868 GiB + 200 MiB ≈ 907 GiB so you're missing 66 GiB in your list. Note that it's not 360Mb, 37.5Gb or 1Tb as you said because they're units of bits. 1TB = 8Tb. You should show gparted's screenshot to have a better look of how partitions are arranged
  • Genius149
    Genius149 almost 5 years
    I've learnt a lot in the last couple of days and almost understand your answer lol. I'm taking the easy route and am hopefully clone it all on to a shiny second-hand 128Gig SSD. Need to get a T8 bit so I can open up the laptop first though.