Nextcloud database on system SSD

  • Hi guys,


    in my case, OMV is installed on a 120GB SSD and I have 2 HDDs for data storage. I installed the Nextcloud-Docker (linuxserver) broadly similar to the guides by TechnoDadLife and macom . In both cases, the three folders needed (config for database and nextcloud, data) are created on the data drives. I'm wondering if it is possible to move (or set) the two config folders, i.e. the database and appdata of nextcloud, to my system SSD, especially regarding permissions. Would there be noticeable advantages?


    This question is basically not limited to Nextcloud, as I want to run e.g. my Digikam-database on my server as well.


    Many thanks for your help

  • Absolutely yes!

    All my docker apps run from my SSD, and in general it's a good idea. Nextcloud is quite "big" and will definitely get some boost.

    Does your SSD have only one partition used by OMV? If yes, you'll have to repartition the drive (use gParted), create a new file system and use it for docker apps.

    OMV BUILD - MY NAS KILLER - OMV 6.x + omvextrasorg (updated automatically every week)

    NAS Specs: Core i3-8300 - ASRock H370M-ITX/ac - 16GB RAM - Sandisk Ultra Flair 32GB (OMV), 256GB NVME SSD (Docker Apps), Several HDDs (Data) w/ SnapRAID - Fractal Design Node 304 - Be quiet! Pure Power 11 350W


    My all-in-one SnapRAID script!

  • Absolutely yes!

    All my docker apps run from my SSD, and in general it's a good idea. Nextcloud is quite "big" and will definitely get some boost.

    Does your SSD have only one partition used by OMV? If yes, you'll have to repartition the drive (use gParted), create a new file system and use it for docker apps.

    I haven't thought about repartitioning, thank you!

  • Absolutely yes!

    All my docker apps run from my SSD, and in general it's a good idea. Nextcloud is quite "big" and will definitely get some boost.

    Does your SSD have only one partition used by OMV? If yes, you'll have to repartition the drive (use gParted), create a new file system and use it for docker apps.

    Further question: Did you put only your "files" folders on your HDDs or the whole /data-Volume including e.g. "appdata_..." or "ownbackup"?


    I'm currently trying to link the "files"-folders to the user home directories using the Symlink-plugin, but I can't quite get it working. When I'm linking a "files" folder from inside the /data-Volume to a home directory I cannot open it with that user, some permissions are wrong here. When I do it vice-versa, i.e. moving the "files" folder to the home directory and linking it to the /data-Volume the symlink doesn't even show up. I've set ACL of this folder to rwe for all users. My goal is, that every user can access their Nextcloud files, but only theirs, through SMB or NFS as well.


    Edit: Apparently Nextcloud creates the folders inside the /data-Volume read-only for the users group, only the owner I set with PUID has write access. So I gave my user rw-access to his nextcloud folder and subfolders on the /data-Volume through ACL. Now I can write when accessing the /data-Volume directly via SMB, but I'm still getting this network access error saying I don't have permissions when trying to open this folder with the symlink in my home folder :/

  • I'm not sure if I understood your question, but:


    on my SSD, I have the following shared folders:

    • docker-install: where docker binaries are stored. It's not shared with anyone, you don't want to mess with those files
    • docker-apps: where my container's data are stored. I created a folder for each container to store its data.

    This allows my docker ecosystem to run independently by HDDs (I want them to spindown).


    My files (data, movies, etc) are on HDDs, and merged with UnionFS in a single, virtual big volume, which is mounted to Docker containers which need it.


    I don't use Home folders because I don't like the concept of it, but surely it's going to be a challenge mounting each of them for users in Nextcloud.


    I think this thread has useful tips and could drive you to a solution.

    but I'm still getting this network access error saying I don't have permissions when trying to open this folder with the symlink in my home folder

    Most probably it's an ACL issue. You could either reset perms using the plugin or execute chmod in the folder via ssh.

    OMV BUILD - MY NAS KILLER - OMV 6.x + omvextrasorg (updated automatically every week)

    NAS Specs: Core i3-8300 - ASRock H370M-ITX/ac - 16GB RAM - Sandisk Ultra Flair 32GB (OMV), 256GB NVME SSD (Docker Apps), Several HDDs (Data) w/ SnapRAID - Fractal Design Node 304 - Be quiet! Pure Power 11 350W


    My all-in-one SnapRAID script!

  • I was able to get it working in the meanwhile, setting wide links = yes and unix extensions = no in the smb.conf fixed it. Thus the symlink in the users home directory to his nextcloud folder works now as expected :)



    I'm not sure if I understood your question, but:


    on my SSD, I have the following shared folders:

    • docker-install: where docker binaries are stored. It's not shared with anyone, you don't want to mess with those files
    • docker-apps: where my container's data are stored. I created a folder for each container to store its data.

    This allows my docker ecosystem to run independently by HDDs (I want them to spindown).

    The Nextcloud-container creates two volumes (at least on my system, I still have related stuff in /var/lib/docker though, I believe): /data and /config. In the /data volume there's one folder for every user with 'cache' and 'files' subfolders respectively and folders called 'appdata_...', 'files_external' and 'ownbackup' and some files. I don't know how big this stuff may grow, except for 'files', or if moving them to my SSD would affect speed in some way, thus my question if you got your /data volume on your HDDs as a whole, or only the 'files' folders. I guess the /config volumes of your nextcloud and database are in docker-apps in your case?

  • Yep, /dataand /config are pretty standard for containers, especially those made by linuxserver.


    Thus my question if you got your /data volume on your HDDs as a whole

    Now I got it!


    My usage of Nextcloud is quite limited (I mainly use it to share files to friends) so take my words with grain of salt.

    /data on my system is 2.4GB, however 2.1GB are... automatic backups made before upgrades.

    Most of /data should be filled with data created by users who are not using your external storage. I don't care about /data, but I still placed on the SSD for good folder placement.

    My DB is ran by a dedicated Maria DB instance, obviously on SSD too.

    OMV BUILD - MY NAS KILLER - OMV 6.x + omvextrasorg (updated automatically every week)

    NAS Specs: Core i3-8300 - ASRock H370M-ITX/ac - 16GB RAM - Sandisk Ultra Flair 32GB (OMV), 256GB NVME SSD (Docker Apps), Several HDDs (Data) w/ SnapRAID - Fractal Design Node 304 - Be quiet! Pure Power 11 350W


    My all-in-one SnapRAID script!

  • Most of /data should be filled with data created by users who are not using your external storage. I don't care about /data, but I still placed on the SSD for good folder placement.

    Ahh, now I get it as well. I didn't know it's possible to mount an external storage in NC, I'll have a look at this :thumbup:

  • lapulga

    Hat das Label gelöst hinzugefügt.
  • I thought you were trying to do that! Probably is the only "right" way of accessing existing data with Nextcloud.

    OMV BUILD - MY NAS KILLER - OMV 6.x + omvextrasorg (updated automatically every week)

    NAS Specs: Core i3-8300 - ASRock H370M-ITX/ac - 16GB RAM - Sandisk Ultra Flair 32GB (OMV), 256GB NVME SSD (Docker Apps), Several HDDs (Data) w/ SnapRAID - Fractal Design Node 304 - Be quiet! Pure Power 11 350W


    My all-in-one SnapRAID script!

  • I thought you were trying to do that! Probably is the only "right" way of accessing existing data with Nextcloud.

    Of course, but I didn't know it was possible from within Nextcloud.


    In the meanwhile, another issue arrose. How did you manage to mount your HDDs in nextcloud? It looks that this is only possible for folders inside /media on the same partition where nextcloud is installed. I'm constantly getting 'stat(): stat failed' error, no matter which permissions I set.

  • lapulga

    Hat das Label gelöst entfernt.
  • To mount a local external storage you need to bind mount the folder via the -v flag in your container settings

    Ahh, great. Thank you! This is so much easier, then I don't have to mess around with privileges and permissions that don't do what I'm expecting.


    Looks like everything is working now, thank you all!

  • lapulga

    Hat das Label gelöst hinzugefügt.
  • Ahh, great. Thank you! This is so much easier, then I don't have to mess around with privileges and permissions that don't do what I'm expecting.


    Looks like everything is working now, thank you all!

    Hi,


    Could you tell me wich command line you've done for doing that ?

    I have the same problem than you.


    Thank you in advance.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!