Question

Volume showing less space than available

Posted June 16, 2019 960 views
DigitalOceanUbuntu 18.04

This volume is supposed to have 5 Gigabytes of space, as shown on the control panel; however, I am getting no more space errors:

These seem alright:

sudo lsblk:

NAME    MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT     
loop0     7:0    0 89.4M  1 loop /snap/core/6818
loop1     7:1    0 88.4M  1 loop /snap/core/6964
loop2     7:2    0 54.2M  1 loop /snap/lxd/10756
sda       8:0    0    5G  0 disk /alloy         
sdb       8:16   0    5G  0 disk /sinnoh        
sdc       8:32   0    5G  0 disk /redstone      
vda     252:0    0   25G  0 disk                
├─vda1  252:1    0 24.9G  0 part /              
├─vda14 252:14   0    4M  0 part                
└─vda15 252:15   0  106M  0 part /boot/efi      
vdb     252:16   0  434K  1 disk                

sudo fdisk -l /dev/sda:

Disk /dev/sda: 5 GiB, 5368709120 bytes, 10485760 sectors
Disk model: Volume
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

sudo df -hia /alloy/:

Filesystem     Inodes IUsed IFree IUse% Mounted on
/dev/sda          16K   401   16K    3% /alloy

These do not:

git pull: No space left on device
hg commit: No space left on device

sudo df -ha /alloy/:

Filesystem      Size  Used Avail Use% Mounted on
/dev/sda        380M  345M     0 100% /alloy

So I’m not exactly sure what’s going on here.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
3 answers

Hello!

You can check for any files that are currently open. Use the following command:

lsof | grep deleted

If you see any files that are currently open, check the process/service related to them. Usually the web server (apache/httpd or nginx) or mysql might need a restart to release and update the disk space usage.

Hope this helps.

You can always contact their support team about that.

The thing is lsblk will list you the size of the partition where df will list you the size of the filesystem.

Did you recently tried to upgrade the disk size of the partition?

Alex

I’m sure you’ve already checked the alloy directory and if there are any files within the directory itself. Keep in mind that there might be some hidden files.

find /alloy -xdev -printf '%h\n' | sort | uniq -c | sort -k 1 -n

Will print out a list of directories and the number of files they contain with the largest at the bottom. With that information, you should be able to work out what is going on.

Another thing you can do is to perform a file system check.

Alex

  • No hidden files, apparently; also, fsck.ext4 turns out fine:

    /dev/disk/by-id/scsi-0DO_Volume_alloy: clean, 323/16384 files, 113113/131072 blocks
    
    • Can you see some files using up the disk space in the /alloy partition or it’s empty for you? You can check this by the command I paste above.

      Also if you’re using any server panel you can check this from there as sometimes you might miss something via ssh.

      As already mentioned usually this happens when there are open files. However since you’ve rebooted the server this should not be the case here.

      Let me know how it goes.

      Alex

      • This doesn’t seem to add up to 5 GB:

              1                                
              1 /alloy/redstone/aiern/data     
              1 /alloy/redstone/rs_aiern/data  
              1 /alloy/sinnoh                  
              1 /alloy/sinnoh/chimchar/data    
              2 /alloy/redstone                
              4 /alloy                         
              6 /alloy/redstone/aiern          
              6 /alloy/redstone/rs_aiern       
              6 /alloy/sinnoh/chimchar         
             76 /alloy/sinnoh/chimchar/data/0  
            102 /alloy/redstone/aiern/data/0   
            107 /alloy/redstone/rs_aiern/data/0
        
        • You can check the actual size by accessing the directory and see the actual usage:

          cd /alloy
          du -sh ./*/
          
          

          or just do:

          du -sh /alloy
          

          Also when you say that this partition should have 5GB, I’ve looked at the output of the disk usage you sent earlier:

          Filesystem      Size  Used Avail Use% Mounted on
          /dev/sda        380M  345M     0 100% /alloy
          

          As you can see it says 380M

          Did you recently tried to upgrade the disk size of the partition? Can you check the size again?

          Alex

          • Actually, everything from the question still applies; so I ran sudo lsblk, sudo fdisk -l /dev/sda, sudo df -hia /alloy/, and sudo df -ha /alloy/. At this point, I think it might be a problem with DO’s drives. There doesn’t seem to be any partitions on the drive which might be taking up space either.

Submit an Answer