Closed RobinEd closed 1 day ago
You're only the 2nd person to ask about this. Moving the @database
folder makes sense if if the original volume is going to be deleted. For all other cases it's better to leave @database
where is it is.
It's better to move /volume1/@database/pgsql
to volume2
You can move the pgsql database with:
Stop the pgsql service:
sudo systemctl stop pgsql-adapter.service
Then create the folder:
sudo mkdir /volume2/@database/pgsql
Move with:
sudo mv /volume1/@database/pgsql /volume2/@database/pgsql
Change the rights:
sudo chown postgres.postgres /volume2/@database/pgsql
Change the pgsql symlink:
sudo rm /var/services/pgsql
sudo ln -s /volume2/@database/pgsql /var/services/pgsql
Start the pgsql service:
sudo systemctl start pgsql-adapter.service
Check if pgsql is ok:
sudo systemctl status pgsql-adapter.service
If you were using a shared space in photos and have moved the shared space to volume2 you may then need to:
Thank you for your answer, I had done something like this except the shared space bit :) My use case is exactly that - I upgraded from a 2 bay model to a 5 bay model. The 2 bay model had a RAID1 array and I bought 2 drives for the new one which I set up as SHR. I then discovered I could not convert RAID1 -> SHR and combine the volume, so I needed to move everything from volume1 and then delete it.
I've written myself a test script that checks all installed packages to see if any depend on pgsql and if any do they are added to a list.
systemctl stop pgsql-adapter.service
automatically stops all dependant apps).
Hi, I am trying to move everything from volume1 to volume2 - thanks a lot for your efforts to get that done! However, you do not offer the option to move /volume1/@database to /volume2/ When I removed the volume1 disks, my photos data was gone :) Luckily I had only physically removed them, not destroyed the volume (yet). So please can you also offer this option to your excellent script? Thanks in advance!