Hi,
I’m in the process of setting up a small private NAS/Cloud and have a couple of choices to make which i need help with.
My system contains two 4TB HDDs running in Raid 1 and a single SSD for the OS, which is a fresh install of Ubuntu Server 18.04.3 LTS.
Now my idea is to store the data in a directory on the Raid partition (e.g. /mnt/raid/cloud) and connect it to Nextcloud as an external storage. I would like to maintain my own file structure so i can easily use SMB etc., so this to me seems the best way to do it.
Q1: Are there performance disadvantages compared to making this directory Nextclouds native data directory? If there are, I might be willing to give up control over the data structure and leave it to Nextcloud.
Q2: Is ext4 a good choice for the data partition?
Q3: How do i need to set up the permissions so that the Nextcloud snap (running on the SSD) can r&w in that directory?
I must add that my knowledge of both Linux and Nextcloud is quite rudimentary, but im happy to learn.
Thanks in advance,
Jasper
Thank you, thats already quite helpful!
I mostly use my Nextcloud Server to sync Files between it and my Laptop, often via the Internet. Mostly using the Nextcloud Client, but also via the Web Client. So I assume deciding against external storage would be quite beneficial for me.
My previous setup was actually FreeNAS with Nextcloud as a Plugin, but i was just too incompetent to get things like https and onlyoffice running properly. So i decided to go with a simpler solution of using Ubuntu, which I am at least a little bit familiar with.
So I think I will go with your suggestion. Could you just quickly explain why NFS is beneficial in this case? And would I only change the data directory of nextcloud or put the whole nextcloud installation onto the raid drive, instead of /var/www/html/nextcloud?
Thanks a lot!
Jasper
Off the top of my head, I don’t remember the details but there is something about being able to change the permissions when using NFS as opposed to using samba/cifs, so I went with NFS instead and never looked back (as long as you don’t need to mount that share in Windows).
Pros and cons It’s up to you, but what I tend to do is put application code right in the web server and data in another location. If you lose your Ubuntu server, you still have your data. If you lose your raid, you at least still have your nextcloud configuration for what it’s worth.
Setting up a custom data directory for Nextcloud is possible (and I do this personally), but it’s not something that can be changed later (not easily or in a supported way at least). So another option might actually be to mount the NFS share directly into /var/www/html/nextcloud/data so that you don’t have to mess with Nextcloud data config settings.
Mounting the NFS share into /var/www/html/nextcloud/data is a really good idea, I didn’t even think of that. The less i have to change in any config files, the less i can mess up. I’ll try it out tonight and let you know how it goes.
Thank you!
1 Like
Yep, that’s how I would do it if I were to start over. Plus it’s easy to switch out the data backend by just mounting something else in that location.