File deleted, but no free space on disk. What happened?


Recommended Posts

This morning I deleted a 40 GB file from one of my shares. I did this from my Windows 7 laptop. It seemed to go ok, but then the progress bar went red and I cancelled the command.

 

The file seems to be gone though, but none of my disks shows any extra space. So why don't I see any space increase? How to get this space back? Where did the file go?

Link to comment

This is probably not your issue, but... did you setup Samba Recycle Bin? I think you would remember doing so as it involves editing a file & setting a location for the recycle bin.

 

I set it up on my unRAID server. If I delete something stored on unRAID through my Windows system, the file is not deleted, but moved to the location where I set the recycle bin. Every so often, I telnet or ssh into unRAID to manually run a command to delete files from the recycle bin to free up space.

Link to comment

This is probably not your issue, but... did you setup Samba Recycle Bin? I think you would remember doing so as it involves editing a file & setting a location for the recycle bin.

 

I set it up on my unRAID server. If I delete something stored on unRAID through my Windows system, the file is not deleted, but moved to the location where I set the recycle bin. Every so often, I telnet or ssh into unRAID to manually run a command to delete files from the recycle bin to free up space.

 

I don't think so. Don't even know how to do that. Can you explain further?

Link to comment

If the file's gone, but the space hasn't been recovered, I'd suspect some corruption of the Reiser file system.    I suspect you need to run reiserfsck on each of your disks (at least those involved in the share the file was on) to see if it finds any issues.

 

Thanks, I will try that.

 

Is it possible to run multiple instances of reiserfsck in screen?

Link to comment

This morning I deleted a 40 GB file from one of my shares. I did this from my Windows 7 laptop. It seemed to go ok, but then the progress bar went red and I cancelled the command.

 

The file seems to be gone though, but none of my disks shows any extra space. So why don't I see any space increase? How to get this space back? Where did the file go?

 

I know this is very very simple, have you tried restarting the server? This has happened to me to randomly.. and after restart file sometimes comes back/or your free space will be re-calculated

 

I think this has happened with 2-3 files over the past 4 years, not a big deal... same thing with after having my server on for a two months.. and deleting/adding over and over again.. when I restart .. all of a sudden my share will get a bit bigger...just to check no corruption parity check seems fine after too

Link to comment

This morning I deleted a 40 GB file from one of my shares. I did this from my Windows 7 laptop. It seemed to go ok, but then the progress bar went red and I cancelled the command.

 

The file seems to be gone though, but none of my disks shows any extra space. So why don't I see any space increase? How to get this space back? Where did the file go?

 

I know this is very very simple, have you tried restarting the server? This has happened to me to randomly.. and after restart file sometimes comes back/or your free space will be re-calculated

 

I think this has happened with 2-3 files over the past 4 years, not a big deal... same thing with after having my server on for a two months.. and deleting/adding over and over again.. when I restart .. all of a sudden my share will get a bit bigger...just to check no corruption parity check seems fine after too

 

I tried that, but didn't work. Thanks for the input nevertheless.

Link to comment

If the file's gone, but the space hasn't been recovered, I'd suspect some corruption of the Reiser file system.    I suspect you need to run reiserfsck on each of your disks (at least those involved in the share the file was on) to see if it finds any issues.

 

Thanks, I will try that.

 

Is it possible to run multiple instances of reiserfsck in screen?

yes.
Link to comment

If the file's gone, but the space hasn't been recovered, I'd suspect some corruption of the Reiser file system.    I suspect you need to run reiserfsck on each of your disks (at least those involved in the share the file was on) to see if it finds any issues.

 

Thanks, I will try that.

 

Is it possible to run multiple instances of reiserfsck in screen?

yes.

 

Thanks Joe,

 

After I started a reiserfsck session, how do I start a new one? When I press ctrl-A c it just show A c on screen and nothig happens.

 

I did it before with upto 6 preclears, but now it won't work. Can you please explain?

Link to comment

I ran reiserfsck on all disks, but still wasn't able to get the 40 GB space back while the file seems to bedeleted.

 

Interesting.  I suspect (but don't know for sure, as I'm not sure how Linux handles this) that there is a file with a strange name out on your system that's actually the file you deleted.  Set your Windows Explorer parameters so it shows hidden files and system files;  then browse your UnRAID disks and see if there's a file that looks "weird" (like, for example, the temp files that Windows creates when running various check utilites, like the Malicious Software Removal tool that runs each month).

 

Are you SURE the space wasn't restored?

 

Link to comment

I ran reiserfsck on all disks, but still wasn't able to get the 40 GB space back while the file seems to bedeleted.

 

Interesting.  I suspect (but don't know for sure, as I'm not sure how Linux handles this) that there is a file with a strange name out on your system that's actually the file you deleted.  Set your Windows Explorer parameters so it shows hidden files and system files;  then browse your UnRAID disks and see if there's a file that looks "weird" (like, for example, the temp files that Windows creates when running various check utilites, like the Malicious Software Removal tool that runs each month).

 

Are you SURE the space wasn't restored?

In that same vein, I'd do a search on all files around the 40GB size, and make sure they all are good files, and your mystery file isn't hiding out somewhere. Possibly sort by modification date.
Link to comment

I ran reiserfsck on all disks, but still wasn't able to get the 40 GB space back while the file seems to bedeleted.

All it takes to keep a set of blocks in use (not free them for reuse) is a single open file descriptor.

 

This was a trick used by many programs.  Open up a temp file, keep it open, and delete it.  It could then be read and written and would automatically delete itself when the process ended and the file-descriptor was closed. (or when the server was rebooted)

 

Your SAMBA process might still have the file open.  Or, as others have said, perhaps the file was moved to a temporary name.

 

Since you are not likely to have many 40Gig files, perhaps you can use the find command to locate it

find /mnt/user -size +30G -exec ls -ld {} \;

It will print the locations of all the files over 30Gig in size.

Link to comment

Since you are not likely to have many 40Gig files, perhaps you can use the find command to locate it

find /mnt/user -size +30G -print

 

Nice to have a Linux guru around here  :)

 

If you Telnet to your server (or just run it on the console if you have one) and run that, it will run notably faster than a Windows command would that has to do all the back-and-forth file activities on the network  :)

Link to comment

Since you are not likely to have many 40Gig files, perhaps you can use the find command to locate it

find /mnt/user -size +30G -print

 

Nice to have a Linux guru around here  :)

 

If you Telnet to your server (or just run it on the console if you have one) and run that, it will run notably faster than a Windows command would that has to do all the back-and-forth file activities on the network  :)

I updated the command in the prior post to have it print the long listing including the size.
Link to comment
  • 3 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.