Debian 10 Instance Out of Space

carlarogers

Member
Joined
Jan 1, 2020
Messages
58
Reaction score
10
Credits
527
I have no idea how to free up space when one of the partitions is full.

Debian instance running as a virtual machine hosted by VM Ware. The instance is allocated 1T of storage. There is 1.5T free on the hard disk where there is running, accouting for 1T used by this instance of debian allocated 1T, but one of the partitions within the 1T of Debian ran out of space:


1699132134475.png


1699131378501.png


1699132567861.png



1699131830348.png



The problem is deleting a lot of large files listed by the command indicated above did not free up any space. The files are deleted but the space is still dedicated to the processes that were using the files, or something like that. I got that information from research I have done to try solving this problem.

Is there any way to free some space in SD2 in Debian?
 


I have no idea how to free up space when one of the partitions is full.
....
The problem is deleting a lot of large files listed by the command indicated above did not free up any space. The files are deleted but the space is still dedicated to the processes that were using the files, or something like that. I got that information from research I have done to try solving this problem.

Is there any way to free some space in SD2 in Debian?
Removing files but df not showing free space can occur for a few reasons.

It may be that the deleted files have left their data on disk until they are overwritten by other files, and the operating system has cached the files in memory, so they are still counted in the df output. A few commands may sort this out:
Code:
sync
sync
sync
Maybe only one sync command is necessary, but 3 is insurance :)

To flush the caches, as root user:
Code:
echo 3 > /proc/sys/vm/drop_caches
That command frees up page cache, dentries (directory entries) and inodes. Check the df output before and after running that to see if it helped.

It may be the case that deleted files are still in use from memory. Reboot to get rid of that possibility. And check what starts automatically so it's not interfering, and stop those if possible.

It may be that there are mounted filesystems and the deleted files may not be on the disk that is full. Check that possibility with the mount command to see what's mounted and that deletions are what you think they are.
 
Also, if you can't get to the drive by booting the VM, just boot the VM to the same .iso you used to install the VM and use that live instance to mount the drive and delete what you need to delete.
 
Also, if you can't get to the drive by booting the VM, just boot the VM to the same .iso you used to install the VM and use that live instance to mount the drive and delete what you need to delete.
I happened to notice yesterday I don't have the iso used to make the instance. I never knew about the potential need for having, and I also thought it always would be easy to get a copy the iso from debian.org. I went to debian.org, and discovered that an iso for debian 10 is not at all easy to find; I am not sure they have anywhere.

I have already shut down and restarted the vm, so I expect to be able to do that again.

My plan is to try in the morning
 
Last edited:
Removing files but df not showing free space can occur for a few reasons.

It may be that the deleted files have left their data on disk until they are overwritten by other files, and the operating system has cached the files in memory, so they are still counted in the df output. A few commands may sort this out:
Code:
sync
sync
sync
Maybe only one sync command is necessary, but 3 is insurance :)

To flush the caches, as root user:
Code:
echo 3 > /proc/sys/vm/drop_caches
That command frees up page cache, dentries (directory entries) and inodes. Check the df output before and after running that to see if it helped.

It may be the case that deleted files are still in use from memory. Reboot to get rid of that possibility. And check what starts automatically so it's not interfering, and stop those if possible.

It may be that there are mounted filesystems and the deleted files may not be on the disk that is full. Check that possibility with the mount command to see what's mounted and that deletions are what you think they are.
I had the impression that this command lists files in sda2 from the directory where it runs.

tree -fiaPhD /dev/sda2

I ran that within a large directory I can do without, a long list of files were listed. Now, since running rm thatDir, running that command in that dir returns nothing. I hope that means the files are deleted, hope the sync command and
echo 3 > /proc/sys/vm/drop_caches will free the space.

I will post the status when I have it
 
I had the impression that this command lists files in sda2 from the directory where it runs.

tree -fiaPhD /dev/sda2

I ran that within a large directory I can do without, a long list of files were listed. Now, since running rm thatDir, running that command in that dir returns nothing. I hope that means the files are deleted, hope the sync command and
echo 3 > /proc/sys/vm/drop_caches will free the space.

I will post the status when I have it
That tree command outputs a lot. If you want to find large files, try a command like:
Code:
find . -xdev -type f -size +100M -exec ls -lah {} \; | sort -rnk 5
which will show the top five largest files over 100M in the directory in which it is run.
If you wish to run it over the whole filesystem, replace the . with /
If you run it from / it will take a little time.
If you wish to find more of the largest files, replace the 5 with another number, such as 10.
If you wish to look at files less than 100M in size, change the number.
 

Members online


Top