Sample Header Ad - 728x90

postgresql data on secondary disk, automatic start fails with "not accessible or does not exist"

0 votes
1 answer
197 views
The OS is Ubuntu 20.04. I moved the data directory to a secondary disk. In the "Disks" utility, I clicked "Edit Mount Options", turned off "User Session Defaults", and specified a hard-coded Mount Point like /mnt/database, because by default it was mounted at something like /media/[user name]/disk label. "Mount at system startup" had been checked (unchanged from default). Now, postgresql's automatic start at the system startup fails with a message like: "[data directory] is not accessible or does not exist". If I manually start it, by executing sudo systemctl start postgresql it starts fine. I suspect that the system tried to start postgresql before the secondary disk was automatically mounted. Is that so? If that is the case, how can I make it start after the secondary disk has been mounted?
Asked by Damn Vegetables (101 rep)
Oct 30, 2020, 02:30 PM
Last activity: Mar 28, 2023, 09:44 AM