Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Synology Drive folder size issue after moving #55

Closed
fr0der1c opened this issue May 7, 2024 · 6 comments
Closed

Synology Drive folder size issue after moving #55

fr0der1c opened this issue May 7, 2024 · 6 comments

Comments

@fr0der1c
Copy link

fr0der1c commented May 7, 2024

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...

@007revad
Copy link
Owner

007revad commented May 7, 2024

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 added a commit that referenced this issue May 7, 2024
v3.0.48
- Bug fix for Synology Drive stil using `@synologydrive` on the original volume. Issue #55
- Now deletes `@eaDir` folders to try to prevent `mv: cannot remove '/volume#/@<folder>': Operation not permitted`. Issue #54
@007revad 007revad mentioned this issue May 7, 2024
@007revad
Copy link
Owner

007revad commented May 7, 2024

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.

@fr0der1c
Copy link
Author

fr0der1c commented May 7, 2024

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
Copy link
Author

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

@007revad
Copy link
Owner

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

@fr0der1c
Copy link
Author

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

@007revad 007revad closed this as completed Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants