Hello all,
When I am creating an MKV file, the app tells me my drive, which has 250GB free according to my iMac, does not have enough space on it. I've emptied the trash, it's clear enough to process an MKV, yet can't unless I plug in an external.
Anyone know why? Is there a minimum space amount for it to process, if so how much and can I change it? Thanks!
Drive Space Falsely Full?
-
- Posts: 14
- Joined: Tue Dec 03, 2019 8:00 am
Re: Drive Space Falsely Full?
This is due to a combination of two things colliding.
The first is the way that MakeMKV checks for disk space. I don't know the exact details - only Mike will know for sure (and any other developers that work on the codebase) - but you can get an estimate that matches the estimate MakeMKV gets by opening up Terminal (Applications, Utilities, Terminal) and running the command "df -h ~" (that's the two letters d and f, followed by a space, followed by a dash and h, followed by a space, followed by the tilda character - shift backquote, the key left of the 1 key on the main part of the keyboard.) That command prints the size of the drive, the used space, and the available space, amongst other things.
The second is Time Machine keeping snapshots (on APFS formatted drives), to allow for speedy recovery of files if you delete something by mistake and want to recover it using Time Machine.
When you look in Finder, using Get Info on the drive, you'll see two figures next to Available: the available space, and, in brackets, a "purgeable" amount of space. That space is actually in use by Time Machine, but the Mac will (at least in theory) clear it when more space on the drive is required for whatever reason. MakeMKV doesn't know how to check for that, so it sees it as being in use, and complains.
If you're absolutely certain that there's enough space available, tell MakeMKV to proceed anyway. It should work - it should allocate disk space without checking if it's available, relying on the operating system providing an error if it isn't. Alternatively, you can disable Time Machine, per https://support.apple.com/en-us/HT204015, to free up that space manually.
Mike probably should update MakeMKV to use the 'official' Mac system calls to find out how much space is free, but in the meantime, the above should tell you what's going on and how to deal with it. Good luck.
The first is the way that MakeMKV checks for disk space. I don't know the exact details - only Mike will know for sure (and any other developers that work on the codebase) - but you can get an estimate that matches the estimate MakeMKV gets by opening up Terminal (Applications, Utilities, Terminal) and running the command "df -h ~" (that's the two letters d and f, followed by a space, followed by a dash and h, followed by a space, followed by the tilda character - shift backquote, the key left of the 1 key on the main part of the keyboard.) That command prints the size of the drive, the used space, and the available space, amongst other things.
The second is Time Machine keeping snapshots (on APFS formatted drives), to allow for speedy recovery of files if you delete something by mistake and want to recover it using Time Machine.
When you look in Finder, using Get Info on the drive, you'll see two figures next to Available: the available space, and, in brackets, a "purgeable" amount of space. That space is actually in use by Time Machine, but the Mac will (at least in theory) clear it when more space on the drive is required for whatever reason. MakeMKV doesn't know how to check for that, so it sees it as being in use, and complains.
If you're absolutely certain that there's enough space available, tell MakeMKV to proceed anyway. It should work - it should allocate disk space without checking if it's available, relying on the operating system providing an error if it isn't. Alternatively, you can disable Time Machine, per https://support.apple.com/en-us/HT204015, to free up that space manually.
Mike probably should update MakeMKV to use the 'official' Mac system calls to find out how much space is free, but in the meantime, the above should tell you what's going on and how to deal with it. Good luck.
-
- Posts: 14
- Joined: Tue Dec 03, 2019 8:00 am
Re: Drive Space Falsely Full?
Okay, I was wrong with my earlier post. You can't simply tell MakeMKV to go ahead - it'll fail, claiming a lack of free space. Instead, you need to get rid of the local Time Machine snapshots. The easiest way is to turn off Time Machine, wait a few minutes for the local snapshots to be removed, and then turn it back on again. That should do the trick.
It looks like using the POSIX APIs for checking space and writing files bypasses the Finder, and hence won't trigger the Finder to clean up the old snapshots to free up space. Mike could change the code to use Mac-specific APIs to write the data out (and hence trigger the cleanup), but that's likely to be problematic for portability. The key thing is: it's Time Machine local snapshots at fault here. Knowing that will make it easier to clean up space in future.
It looks like using the POSIX APIs for checking space and writing files bypasses the Finder, and hence won't trigger the Finder to clean up the old snapshots to free up space. Mike could change the code to use Mac-specific APIs to write the data out (and hence trigger the cleanup), but that's likely to be problematic for portability. The key thing is: it's Time Machine local snapshots at fault here. Knowing that will make it easier to clean up space in future.