Nextcloud - how to minimize secondary storage access


Go to solution Solved by Smith007,

Recommended Posts

I have my Nextcloud docker on Unraid and it is working just fine. I'm using it mainly as simple Onedrive replacement, so to keep files. I have Nextcloud data on ssd cache as primary storage, and hdd as secondary; with mover running weekly. I have noticed though, that the secondary storegr if often woke up, even if no changes to data files / file structure are made.

 

I think it is because some internal Nextcloud status or log files are on secondary hdd storage (moved there from cache after maximum a week) and Nextcloud client is simply triggering some read of writes to those "status" files, even if no regular data files are added, deleted or changed.

 

If this is true – two questions:

 

  1. Which Next Cloud files / folders should be kept on cache only (not moved to secondary hdd storage)
  2. How to keep the above files out of scope of the mover job.

 

I'm hoping that solving the above two points would wake up secondary hdd storage only in case regular data files are accessed by Nextcloud client.

Link to comment

By default the log is written into the data location. You should be able to move it into the appdata folder by adding a line in config.php.

 

https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/logging_configuration.html

 

The "appdata_instanceid" folder might be a problem too, don't see a way to move it from a quick search but you could always cobble together an additional Docker mount for it. 

Edited by Kilrah
Link to comment

Thanks for your suggestions re which files to keep on cache. More or less these was my picks too.

 

I was hoping to copy them manually to primary ssd storage and then keep them there, by somehow forcing the mover to leave them where they are. Is that possible?

Link to comment
  • Solution

So it actually works like a charm. All you have to do is to list files you want the mover to skip in a text file, and tell the Mover Tuning plugin to use it. In my case seems it was enough to list:

 

/mnt/cache/NEXTCLOUD/nextcloud.log

 

(not sure, but I reckon it is important to use /mnt/cache/* and NOT /mnt/user/*)

 

Seems it solved the problem with triggering secondary storage, but need some more days to confirm.

 

 

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.