LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Incorrect disk space of external disk (https://www.linuxquestions.org/questions/linux-newbie-8/incorrect-disk-space-of-external-disk-4175533359/)

nix.noob 02-07-2015 12:11 PM

Incorrect disk space of external disk
 
I have an external disk connected to a raspberry pi to act as a nas, which I am accessing from a linux mint desktop machine.
The nas disk is 30GB, but according to my desktop machine, which connects through the file browser via samba, only around 318MB are reported as available.
If I try to copy a 400MB file it tells me there is insufficient space.
The disk is currently empty, so all 30GB should be available.

On the nas box, cfdisk seems to report the disk size and the partition size correctly:
Code:

                          cfdisk (util-linux 2.20.1)

                              Disk Drive: /dev/sda
                        Size: 30016659456 bytes, 30.0 GB
              Heads: 64  Sectors per Track: 32  Cylinders: 28626

    Name        Flags      Part Type  FS Type          [Label]        Size (MB)
 ------------------------------------------------------------------------------
    sda1        Boot        Primary  ext4                            30016.66*

I'm not sure where to look next.

EDDY1 02-07-2015 12:31 PM

Try df -h

yancek 02-07-2015 12:32 PM

If the partition is mounted, you can get the approximate 'used' space with df -h.

michaelk 02-07-2015 12:34 PM

Post the output of the command:
df -h

Is the drive still mounted?

Too late...

nix.noob 02-07-2015 01:36 PM

It is still mounted.
Code:

$ df -h
Filesystem      Size  Used Avail Use% Mounted on
rootfs          2.9G  2.6G  135M  96% /
/dev/root      2.9G  2.6G  135M  96% /
devtmpfs        214M    0  214M  0% /dev
tmpfs            44M  660K  43M  2% /run
tmpfs          5.0M    0  5.0M  0% /run/lock
tmpfs            88M    0  88M  0% /run/shm
/dev/mmcblk0p1  56M  15M  42M  26% /boot

nb, this is a raspberry pi, so the main filesystem is on an 8GB sd card.
/dev/sda1 is the 30GB disk. Or so I believe.

michaelk 02-07-2015 02:09 PM

The drive is not mounted. No indication of /dev/sda1 in the output.

Your writing data to your / partition which shows 135M available. Look at the contents of the USBs mount point directory i.e /media/USBSSD to see if there are any files which should be deleted since your / usage is 96%. Mount the drive again.

nix.noob 02-07-2015 02:33 PM

Quite right.
I think what had happened was that I had rebooted the machine and my fstab file had tabs instead of spaces, so it didnt automatically mount on start up.
Thanks for the help.


All times are GMT -5. The time now is 08:46 PM.