Location of database vs. data blocks

Hopefully this question makes sense. My server’s hard disk is small - 500 GB - while my Seafile library is large - approximately 1TB. For this reason, my Seafile data blocks (/shared) are located on a NAS. Should my database be on the NAS as well, or should it be on the local disk? I got to wondering what would happen if the server lost connectivity to the NAS, and whether there’s a better or worse scenario as far as maximizing data integrity.

Both can work. I think it comes down to performance vs reliability. Putting the database on the NAS with the data makes it more reliable, since the blocks and the database shouldn’t get out of sync that way (and presumably the NAS has some sort of RAID to keep things running if a disks dies). So more likely you will lose the server, but still have the data, and it should be relatively easy to rebuild.

But the database would perform better if it was on the local disk. If that disk failed and you had to rebuild your seafile server, it would take more work to recover. Recovering in this case includes restoring a backup of the database, but maybe you think that’s easy enough to be worth the trade-off. Up to you.