Drive space not recovered after unsync on Mac

Hi,

I use the unsync feature well on every Mac device except 2018 MBP.

the sync desktop version is : 6449

Mac OS: 10.13.6
File System: APFS

In the MBP 2018, when I unsync files, the ssd space can’t be released.

Is this a kind of bug ?
How do I set space free manually ? (I lose 100G in 512G SSD)

Hi @lichang.liu,
There aren’t any known issues with unsync on that version of MacOS.

Are you receiving an error when trying to unsync?

Hi @Tony I don’t receiving any error when I unsync files.

Is there any way to let me free the space ?

Hi @lichang.liu,
It should be working. Can you try to unsync and then send a diagnostic from the odrive menu so I can take a look?

As a workaround, if it is urgent, you can delete the files/folders you want to unsync, and then restore them from the odrive trash. Make sure you do not have any auto trash rules set before this, otherwise those deletes will be pushed to the cloud. This is not something I would normally recommend, but it is an option if you are in a bind with disk space.

I sent the report to you on GMT+8 09:01. I will use time machine to restore the Mac to the last week cause this Mac is for official job I can’t wait you to figure out what happened. Please understand that. Hope to hear good news.

Hi @lichang.liu,
Unfortunately I am not seeing anything obvious. Was it the E08_A.mp4 file that you were trying to unsync? From the diagnostic it actually looks like it was unsynced.

If you still experience this issue after your restore, try deleting and recovering the file (see my notes above) and see what happens then.

I have same experience this morning, I guess it caused by notebook sleep mode. Those two event happened after I just reopen the notebook then do unsync immediately. Maybe that’s a direction can lead u find something.

Hi @lichang.liu,
Thanks for the additional details. I’ve been trying to reproduce this, but I haven’t been able to yet.

Can you answer these questions/try a few things when you get a chance?

  • Does a reboot of the system change anything?
  • If you delete a file on the remote storage and refresh the local folder that file was in, does odrive delete the local file?
  • If you delete a local file and then restore it from the odrive trash (will have to wait about 30 seconds for it to show up) is the placeholder created properly?
  • Are you unable to unsync both files and folders? Is this for all files and folders?
  • Do you have any folder sync rules set on the folders you are trying to unsync in?

Hi there, I have the same issue, i have unsynced around 50gig of folders from my odrive and it is not coming back on my SSD.

mac 10.14.5
prod 6523 odrive.

I have tried restarting, and updated all my systems. The space doesn’t come back. The main odrive folder reads 299gig and the internal big folders from my google drive read 500 gig! So the internal folder is bigger than the parent - confused! help please

Hi @mills42,
When odrive replaces a file with a placeholder it issues a delete on the file and then creates a placeholder file. It sounds like this is happening, but MacOS is not properly releasing the disk space for these deleted files.

Do you use Time Machine backups? I came across some information that describes how MacOS will create local backups if the Time Machine destination is not available, so deleted files will end up not releasing disk space.

Do you think this could be possible?

Some information on this:


Thanks Tony, I just tried that and it doesn’t seem to work either. Do you have any other suggestions? I really need to sort this out - I am running less than 10% free on my disk

Hi @mills42,
Thanks for the response. Since odrive is only deleting and creating files using standard filesystem calls, there isn’t anything special that odrive is doing during an unsync. It is literally just deleting the file then creating an empty new file with the same name.

It seems like there is an issue with the MacOS filesystem, Finder, or with the drive, itself.

What to try next:

  • Try running the MacOS disk utility to determine if there is a problem with the drive. Type in “Disk Utility” in spotlight search to bring up the app. Select your drive and then click on “First Aid” to check it for errors.

  • It is possible that you actually have the space available, but it is not being shown correctly in Finder. To check this, let’s open up a terminal session and run a few commands to see if we can get a better understanding of what is happening on your system:

    Open up a terminal (type “terminal” in Spotlight search):

    type in this command into the terminal and post what it outputs:

    df -h

    The items we are concerned with are the “/dev/disk…” entries, which will list the physical disk partitions.

  • Another command we can run will tally up the disk usage in the odrive folder, to hopefully get a more accurate reading. This command assumes you haven’t changed the location of the main odrive folder. If you have, the path will need to be adjusted.

    du -hs ~/odrive

    This first command will show the total disk usage within the odrive folder

    du -hs ~/odrive/*

    This next command will summarize the space taken up in each subfolder of the main odrive folder. You can continue using this technique to drill down into folders to check where disk utilization seems to be wrong. Let me know if you need more information on how to do this.

  • While we have terminal up, let’s also do a double-check for local snapshots on the system

    Type in this command to see this: tmutil listlocalsnapshots /

  • If nothing stands-out or changes with the above items, we can try deleting folders manually. For the folders you have unsynced but seemed not to free-up space, go to them in Finder and delete them completely. Empty the MacOS trash but DO NOT EMPTY THE ODRIVE TRASH because we will restore these items later. See if this changes anything.

    You can restore these deleted placeholders from the odrive trash at any time by going to the odrive menu and restoring the items under the “Trash bin” menu item.

For anyone else hitting this, the cause of this issue ended up being the Time Machine local snapshots. This page has more information on what those are: https://support.apple.com/en-us/HT204015
Even though unsync was freeing up the space that these files were taking, the local snapshots were “protecting” this data.

  • The command:
    tmutil listlocalsnapshots /
    will list the local snapshots on the system

  • The command:
    tmutil thinlocalsnapshots / 100000000000 1
    is supposed to “intelligently” prune the local snapshots to free up the designated space. In this case approximately 100GB. However, we found that it doesn’t seem to work as well as we had hoped.

  • The command:
    tmutil listlocalsnapshotdates / | grep 20 | while read f; do tmutil deletelocalsnapshots $f; done
    will delete each local snapshot, explicitly, to ensure that they are all removed and free up the local space on the disk.