oneembyuser 4 Posted February 15, 2020 Posted February 15, 2020 (edited) Windows 10 Build - 18363 (19H2) Emby 4.3.1.0 Media files are on the RAID 6 array (MegaRAID). Array size is 178 TiB. If I delete media files on Emby, the file is also deleted in the host system without going through Recycle Bin. However, Windows 10 doesn't seem to recognize that the file is gone, hence the free space shown on File Explorer or compmgmt.msc > Storage > Disk Management remain unchanged. Furthermore, the problem is 100% reproducable (at least for me), and each free space difference created by this method (i.e. deleting media files on Emby) kept on accumulating. In my case, the difference between actual file size and used space shown on file explorer now reaches 1TB. It's also persistent, meaning; CHKDSK /f doesn't fix the problem. Neither does Windows built-in error checking tool. Clear the Recycle Bin doesn't fix the problem. Manually recreate the folder which has been deleted from Emby, and delete them on File Explorer doesn't fix the problem. Restart over the past several months doesn't fix the problem. Updating or Reinstalling the Emby multiple times doesn't fix the problem. Windows Update over the past several months doesn't fix the problem. Not sure what the root cause is, and not sure this is a problem of Emby or Windows 10. But I suspect this problem won't happen, if Emby just send the file to Recycle Bin, instead of deleting them right off, when I delete the media files on Emby. Because Windows will be able to see which files are going to be deleted from the disk when I empty the Recycle Bin and adjust free space accordingly, just like the normal file deletion on Windows. Anyway, any suggestions on how to fix the wrong used/empty space reporting on File Explorer? Edited February 15, 2020 by oneembyuser
Luke 42085 Posted February 15, 2020 Posted February 15, 2020 Hi, that's really strange because on windows we use the recycle bin.
oneembyuser 4 Posted February 15, 2020 Author Posted February 15, 2020 (edited) Okay. I did one more test regarding this subject. This time, I deleted a media file on a single drive, not on an array. Before the deletion of a media file, Windows 10 File Explorer reported used space of 8,911,628,427,264 bytes and free space of 3,088,491,319,296 bytes, on that drive. When I deleted a single media file which is 12,917,272,125 bytes (Size on disk 12,917,272,576 bytes) from that drive, both the media file and NFO file (2,482 bytes and size on disk 4,096 bytes) were gone without going through Recycle Bin. And the reported used space and free space on File Explorer remained unchanged. I performed CHKDSK /f on that drive and rebooted the host. Used space shown on File Explorer changed to 8,911,628,431,360 bytes, which is 4,096 bytes more than the value before reboot. Not sure how on earth this is possible. If it's 4,096 byte lower than the value before reboot, it might be the case that Windows somehow recognized the NFO file is gone but not the media file. But Windows think used space gone up by 4,096 bytes. Anyway, after the reboot, I copied the deleted file from the backup on the other drive to that drive, and the used space went up to 8,924,545,703,936 bytes (which is 12,917,272,576 bytes more). Edited February 15, 2020 by oneembyuser
ebr 16195 Posted February 15, 2020 Posted February 15, 2020 What happens if you do the deletes through explorer?
oneembyuser 4 Posted February 16, 2020 Author Posted February 16, 2020 (edited) What happens if you do the deletes through explorer? It behaves as expected; When I delete any file on File Explorer - Files go to Recycle Bin (Used Space remains unchanged). When I empty the Recycle Bin - Recycle Bin is now empty (Used Space drops. The amount of drop in Used Space equals to the sum of size on disk of files that were deleted from Recycle Bin) and Shift + Delete on File Explorer produces the same result. Used Space drops as expected. Edited February 16, 2020 by oneembyuser
Luke 42085 Posted February 16, 2020 Posted February 16, 2020 That's really odd because all we're doing is using a windows api to handle the delete for us.
Solution oneembyuser 4 Posted February 16, 2020 Author Solution Posted February 16, 2020 I'm still unsure about the cause, but I found a solution. On an elevated cmd, rd /s /q [Drive Letter]:\$Recycle.bin resolved all issues immediately. I think that everytime I removed media files on Emby, those files were actually moved to Recycle Bin, but somehow it just didn't show up in Recycle Bin and also refused to be deleted when I empty Recycle Bin through the GUI. 1
RobinVGX 2 Posted January 9, 2021 Posted January 9, 2021 Sorry for bumping this, but can confirm I still have the same problem on Windows Build 19042.685 (20H2) Emby 4.5.4.0 The fix from @oneembyuser did work. Thanks! Any update on this @Luke?
Luke 42085 Posted January 9, 2021 Posted January 9, 2021 It's probably in the recycle bin so I would just empty that out.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now