Synology_app_mover icon indicating copy to clipboard operation
Synology_app_mover copied to clipboard

Synology Drive folder size issue after moving

Open fr0der1c opened this issue 1 year ago • 6 comments

I was moving Synology Drive from volume1 to volume2. Earlier I went to Drive Admin Console and set Settings-Package Usage-Location to volume2. Then I moved Synology Drive using this script.

Before moving, the "usage" on the Admin Console reports the File Versions take about 900GB. After moving, it becomes 1.4TB. Not sure why this is happening. I see /volume1/@synologydrive was still taking up space:

root@NAS:/volume1/@synologydrive# du -hd1 ./
913G	./@sync
0	./@tmp
913G	./

And /volume2/@synologydrive is taking up space too:

root@NAS:/volume1/@synologydrive# du -hd1 /volume2/@synologydrive
915G	/volume2/@synologydrive/@sync
357M	/volume2/@synologydrive/log
4.0K	/volume2/@synologydrive/@tmp
916G	/volume2/@synologydrive

I want to remove these File Versions to free up space, so I go to Admin Console and disable file versioning of all folders. It should free up space in the background. So I waited for an hour. But it turns out only @synologydrive on volume 1 is cleaned. Volume 2 seems to be intact:

root@NAS:/volume1/@synologydrive# du -hd1 /volume2/@synologydrive
915G	/volume2/@synologydrive/@sync
367M	/volume2/@synologydrive/log
4.0K	/volume2/@synologydrive/@tmp
916G	/volume2/@synologydrive
root@NAS:/volume1/@synologydrive# du -hd1 /volume1/@synologydrive
177M	/volume1/@synologydrive/@sync
0	/volume1/@synologydrive/@tmp
177M	/volume1/@synologydrive

And Admin Console still shows 913.4GB of File Versions after refreshing. It should be ~0GB. Something weird must be happening...

fr0der1c avatar May 07 '24 02:05 fr0der1c

Looking in /var/packages/SynologyDrive/etc/ I notice there's symlink named repo that points to /volume1/@synologydrive/@sync

The script does not edit this symlink! I'm not sure why nobody has noticed this issue before.

Does this return volume1 or volume2?

ls -l /var/packages/SynologyDrive/etc/repo

If the symlink still points to volume1:

  1. Stop Synology Drive in Package Center.
  2. Run the following comands:
rm /var/packages/SynologyDrive/etc/repo
ln -s /volume2/@synologydrive/@sync /var/packages/SynologyDrive/etc/repo
  1. Start Synology Drive.

007revad avatar May 07 '24 02:05 007revad

I've fixed it in https://github.com/007revad/Synology_app_mover/releases/tag/v3.0.49

But you'll still need to do the following to fix your Synology Drive:

  1. Stop Synology Drive in Package Center.
  2. Run the following comands:
rm /var/packages/SynologyDrive/etc/repo
ln -s /volume2/@synologydrive/@sync /var/packages/SynologyDrive/etc/repo
  1. Start Synology Drive.

007revad avatar May 07 '24 04:05 007revad

Now the weird thing comes:

root@NAS:/volume1/@synologydrive# ls -l /var/packages/SynologyDrive/etc/repo
lrwxrwxrwx 1 root root 29 May  5 13:27 /var/packages/SynologyDrive/etc/repo -> /volume2/@synologydrive/@sync

I've done nothing but it's already pointed to volume2. I still see 913.4GB of File Versions on Admin Console. Guess I shouldn't change Package Usage to volume 2 before moving using this script?

fr0der1c avatar May 07 '24 12:05 fr0der1c

Update: I ended up uninstalling Synology Drive, and those spaces are finally freed up.

fr0der1c avatar May 10 '24 12:05 fr0der1c

After re-installing Synology Drive was all your settings and data still showing in drive and on volume 2?

007revad avatar May 10 '24 22:05 007revad

I chose to remove all data when uninstalling, so it's a fresh install. I see 1GB of File Version in volume 2 now.

fr0der1c avatar May 11 '24 05:05 fr0der1c