Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Finetune a share to write to cache only

Featured Replies

Here is my intended scenario that partially works now.  I am using this UnRaid as my main syslog repository with syslog server configured to store logs into a dedicated share named LOGS. Fort that I configured a share LOGS with "primary storage" to cache and "secondary storage" to array and 'mover action" cache -->array scheduled weekly. 

 

My expected behavior will be that syslog will constantly write to cache and not array therefore my array & parity drives won't be spinning all the time, except when the mover schedule take place every week.  But that is not the case.  I have about 10 devices sending logs to this UnRaid and some of them are written to cache and some of them to the array, they're are very inconsistent and some of my array and parity drives are constantly spinning.

 

Am I doing something wrong or this is the expected behavior?  Any advise or guidance please

 

 

LOGS.JPG

Edited by DivideBy0

Solved by DivideBy0

  • Author

Anybody?

  • Community Expert
23 hours ago, DivideBy0 said:

 

or this is the expected behavior?

 

Yes.

The mover doesnt move files that are activly being used. if a file has been moved to the array, it will stay on the array if its being modified.

If you wanna solve this you would need to set the "syslog"-share to only live on the cache drive and run a script which copies the logs in the time intervals youre looking for to the array.

  • Author

Or write a script to daily:

  • Stop syslog
  • Execute Mover
  • Start Syslog

 

  • Community Expert

that would work too. But that would require every participant to create a new file instead of just continuing to write into the existing ones. By what you said, the mover did manage to move some files to the array but .15 kept writing to the array file instead of creating a new syslog.

Edited by Mainfrezzer

  • Author
  • Solution

I could play with the syslog file size? Now is set to 5Megs. Maybe if I drop it to 1 or 2 Megs will work better? Thinking if I limit the size then syslog will start writing new files on cache and when the movers kick in it will just move the completed ones.

 

Well I ended up with a custom script that does it all for me daily.

 

#!/bin/bash
sh /etc/rc.d/rc.rsyslogd stop
for file in /mnt/cache/NVME-LOGS/*; do
    mv "$file" "/mnt/disk7/LOGS/$(date +"%Y%m%d_%H%M%S")_$(basename "$file")"
done
sh /etc/rc.d/rc.rsyslogd start

Edited by DivideBy0

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...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.