LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Cannot access free space on hard disk (https://www.linuxquestions.org/questions/linux-newbie-8/cannot-access-free-space-on-hard-disk-4175609297/)

StefanP 07-06-2017 07:46 AM

Cannot access free space on hard disk
 
I am using debian8 and lately I have problem copying files onto my hard disk. Even though I deleted a lot of files to free up space when I try to copy even a 1 gig file it tells me tit cannot because the drive is full. I checked with the "disks" application and it shows I have 100 gigs free. I empried the trash bin also of any files. What can I do except reformat and install debian so that I can use the hard drive again at its full capacity?

MensaWater 07-06-2017 08:20 AM

This often happens if you delete a file that is "open" by some process. Most often these are log files.

When you delete an open file it actually only deletes the file name but leaves the file inode which contains the data intact so it is still using the space.

The quickest way to solve this is simply to reboot the system as that will stop all processes and thereby close all open files.

Before deleting a file in future you can run "lsof <filename>" on it to see if any process is using it. If so you should first stop the process then delete the file.

pan64 07-06-2017 08:35 AM

you can try:
Code:

df -h
df -ih

can you post the result?

MensaWater 07-06-2017 08:45 AM

Quote:

Originally Posted by pan64 (Post 5731402)
you can try:
Code:

df -h
df -ih

can you post the result?

...and du -h on any directory shown by df output. If df -h and du -h on the same directory show different space utilization it is usually due to what I was describing previously.


All times are GMT -5. The time now is 01:20 AM.