Migrate data and use LVM

Hello guys,
My server’s disk is running out of space, I’d like to move to a LVM, so I can increase the size when needed.

Can I just migrate the “seafile-data” folder on the LVM and then mount it on the same point?

Are there some issues in using LVM? Is it safe to expand the volume while seafile running?

Anything else I should know?

ps I’m running community edition.

Thanks

seafile consists of the DB and the seafile-folder. with this two you can always migrate.

If you can keep the old mounting point name and point it to the new device it should be a no-brainer.
but you should shut down the seafile-services, then copy the data-folder and recreate the mountpoint on the lvm, then start the services again…

even if you cannot keep the mounting point to the data-folder it should be no problem.
You can run the setup again and it should see existing DB and data-folder.
One user also stated executing the minor-update.sh instead of running setup again did well for him.

maybe minor-update.sh is less “harmfull”
here is the link to that topic:

anyway make sure you only delete your old data when seafile is using the new folder and you have done testing !

btw: you can have a look at zfs instead of lvm.
I use it now for a while as a raid 1 for the seafile-data folder

Tankyou. I’ll test it and see if it suits my needs.

I’ve read a lot and for what I need lvm is just fine (and I feel more confortable since I already use it). Don’t need a raid, I’ll handle disk failing with old style backups.

What about mounting?

What is the best practice: should I mount the new volume directly on /home/seafile/seafile-data or should I mount it in /mnt or /media and then create a symlink to seafile-data?

Seafile hates Symlinks. But you can change the path of seafile-data.

1 Like

A symlink for seafile-data works.

1 Like

I hope it won’t break during updates…

And what about expanding a LVM volume, should I stop Seafile while changing filesystem size?

I think it’s an online operation so it shouldn’t cause any issues.

1 Like