Migrate data to new hdd - setup libraries from scratch

I’m running Seafile Pro Server 7.0.7 on Ubuntu 18.04.4 LTS in a Proxmox VM. My initial 30GB virtual hdd was full and because I want to continue using Seafile, I added a 2TB virtual hdd, partitioned, formatted (ext4) and mounted it as /mnt/seafile-data. I started following these guides.
https://download.seafile.com/published/seafile-manual/maintain/backup_recovery.md
https://forum.seafile.com/t/tutorial-for-relocating-seafile-data-directory-optionally-on-an-encrypted-volume/131
I got lost & confused. Then I thought, why can’t I just delete my libraries and start from scratch, it’s only 20GB of data and I’m local on a gigabit network. Creating a new library now triggers an error in seafile.log.

[05/04/2020 12:35:33 PM] http-server.c(2149): Failed to open block 2df612dd:9fa43c97dcb2a10496d85c4236b6ee5b507ab5fb.
[05/04/2020 12:35:59 PM] …/common/block-backend-fs.c(733): [block] Failed to open temp file: No such file or directory.
[05/04/2020 12:35:59 PM] …/common/block-backend-fs.c(92): [block bend] failed to open block 9fa43c97dcb2a10496d85c4236b6ee5b507ab5fb for write: No such file or directory

I tried to set the owner and file permissions according to the 2nd guide linked above but I suspect I’m facing a permissions error. I also tried running seaf-fsck.sh. As my main user, it says seafile.ini not found and as root it says:

[05/04/20 12:27:48] seaf-fsck.c(182): Current user (0) is not the user for running seafile server (999). Unable to run fsck.

How should I proceed? I need to fix this block error and is there anything else I should do to clear out my old libraries?

Would I be best off redoing my Seafile server install completely from scratch?

No such file or directory
This tells my that he’s looking for a library and can’t find it…

My data folder is on a separate array than the seafile installation. I made a symbolic link to the from the data folder on the big array to the seafile installation. Made sure permissions are correct and it works.
When I need a bigger array I install it, stop seafile services move the data folder from the first array to the new one. Update the symbolic link to the new array folder and start seafile services again. Thats how I would have recommended you doing it.

Doesn’t proxmox have snapshots. You should use them in Future. And you should create a seafile test VM with the similar data layout for experiments.

A symlink sounds too simple, I hadn’t thought of it. I’ll restore a proxmox backup and try it. Thanks for the suggestion.

I tried the symlink route, and it looked like it worked until I looked at “system admin -> libraries” via the web admin. All my libraries were “null”. I have my data backed up so I’m not worried about that. I deleted all the libraries via the web admin but now when I try to create a new, identically named library via my windows desktop client, it informs me that it already (still) exists. edit I also tried to add a 2nd new, identically named library, and this time there it accepted the name and closed the “new library” dialog but then there’s a “Server error”. I can create a new library via the web interface but as soon as I try to sync it via my desktop client I get the block access error.

How can I clear my database or fix it? I’ve tried to run seaf-fsck.sh but I need to run it as user 999 (seafile?) but I have no idea how to do that.

Also, what’s the correct way to set the data storage’s owner & permissions?

Why don’t you restore and then move the intact data folder to the new storage and then symlink it?

I don’t do such messy stuff so I don’t know how to fix it. Maybe someone else can help you…

It would also be nice if you would post your current messy file structure and the logs so that we can see what’s going on, if you really want to fix it and not rewind

That is what I tried. I restored a backup, shutdown seafile, added/mounted my storage drive, moved my data, created the symlink and then started seafile. I’m not clear on what the permissions should be set to on the new storage location, I tried to mimic the original permisions.