I know i can change the btrfs scrub schedule from monthly to weekly. However i need something different: to absolutely make sure that there is no operation running on saturday mornings, as interferes with my regular VM backup and makes OMV crash. how can i achieve this?
prevent btrfs scrub from running at a certain time
-
- OMV 6.x
- gelöst
- molnart
-
-
If you look at the change log, it tells you how to do this - https://github.com/openmediava…840ac8b6344489c155a4e5440
-
votdev
Hat das Label gelöst hinzugefügt. -
votdev
Hat das Label OMV 6.x hinzugefügt. -
somehow i ignored this problem hoping that the scrub times wont interfere with the scheduled backups, now getting back to this.
how to i set the schudule in OMV for the scrub to run once per month on mondays at 01:00? choosing monthly does not allow me to set specific days or hours.
choosing "Certain day" i don't know what to enter. i could enter to run in on every 15th of the month, but i want to force it to a specific day of the week and not day of the month
-
*IF* you issue a CANCEL then after Saturday morning you issue a RESUME, would this affect the scrub operation if the data changed? I don't use BTRFS but, maybe let the caller clear a window instead of the callee. I dunno, maybe create a script with btrfs scrub cancel /a/b/c .../n... btrfs scrub resume /a/b/c then run that before backing up.
EDIT: never mind, I should read, put the command in a script (or not) and then (I don't see how to do it in the GUI):
Got that from here: https://superuser.com/question…rst-monday-of-every-month
-
this btrfs scrub thing is driving me crazy. scrubbing a single drive takes around 8-12 hours depending on size and filled space. i have 6 of them. when scrubbing is ongoing drive read speeds drop below 10 MB/s. when at the same time a torrent client is trying to download with 20-30 MB/s my system is pretty much useless for 2-3 days even for the most basic tasks.
i think no amount of scheduling magic can solve this, the best solution would be to do some partial scrubs, like scrub each day for one our until the disk is finished then move on to the next disk. but of course, disk content is changing, maybe this could render the whole scrubbing process useless...
-
You can pause any modern torrent client via it's CLI or using curl/wget/etc.
With qbittorent it would be something like this, although I don't know the pause syntax (RTFM'n it)
Codesid=$(curl -v -d "username=${username}&password=${password}" -X POST $ip_and_port/api/v2/auth/login 2>&1 | grep -o -P '(?<=SID=)[^;]*'); curl -v -H "Cookie: SID=$sid" -H 'User-Agent: whatever' "${links[@]}" $ip_and_port/api/v2/torrents/add;
You'll replace this: ${links[@]}" $ip_and_port/api/v2/torrents/add;
... with whatever the pause/resume syntax (assuming you're using http to communicate).
You've seemed to completely ignore my suggestion about scrub cancel/resume, so I assume you didn't try :-/
-
btrfsmaintenance has an option to set the priority of IO. You could install it and disable the scrub jobs from OMV
Code## Path: System/File systems/btrfs ## Type: string(idle,normal) ## Default: "idle" # # Priority of IO at which the scrub process will run. Idle should not degrade # performance but may take longer to finish. BTRFS_SCRUB_PRIORITY="idle"
and
Code
Alles anzeigen## Path: System/File systems/btrfs ## Description: Configuration to allow concurrent jobs ## Type: boolean ## Default: "false" # # These maintenance tasks may compete for resources with each other, blocking # out other tasks from using the file systems. This option will force # these jobs to run in FIFO order when scheduled at overlapping times. This # may include tasks scheduled to run when a system resumes or boots when # the timer for these tasks(s) elapsed while the system was suspended # or powered off. BTRFS_ALLOW_CONCURRENCY="false"
-
OMV provides the OMV_BTRFS_SCRUB_PRIORITY environment variable to customise the scrub job.
-
what values should i set for OMV_BTRFS_SCRUB_PRIORITY? i understand from this https://man7.org/linux/man-pages/man1/ionice.1.html, that the value i should be setting should be -c 3 however its not clear to me how the env value translates to the scrub command.
also, are there any plans to migrate the environment variables to a config file or something? i hate them so much it made me google this article https://medium.com/israeli-tec…ver-env-vars-d9189d53c4b8 which articulates in a nice way what i cannot due to how much i hate them
-
what values should i set for OMV_BTRFS_SCRUB_PRIORITY? i understand from this https://man7.org/linux/man-pages/man1/ionice.1.html, that the value i should be setting should be -c 3 however its not clear to me how the env value translates to the scrub command.
You can see in line 77 that the configured command line args are used to run the btrfs scrub command. Populate the OMV_BTRFS_SCRUB_PRIORITY env var with the command line args of your choice.
also, are there any plans to migrate the environment variables to a config file or something? i hate them so much it made me google this article https://medium.com/israeli-tec…ver-env-vars-d9189d53c4b8 which articulates in a nice way what i cannot due to how much i hate them
No, i'll stay with the env vars because they are much simpler to handle than a config file.
-
Hi guys, thanks for the work
I'm a kinda a linux newbie and I have a question about changing this OMV_BTRFS_SCRUB_PRIORITY environment variable.
I got from the doc that running
Should get me the list of all variables usable, I get OMV_BTRFS_SCRUB_ENABLED and _PERIOD for example, but I don't see OMV_BTRFS_SCRUB_PRIORITY.
Should I still use:
I get the same issue as molnart, so i'd like to set the priority to idle too.
And then running the commands to apply the changes
Or do i have to do something else like modifying a file ?? (but I don't get which one if it's the case)
Thanks
-
Hi guys, thanks for the work
I'm a kinda a linux newbie and I have a question about changing this OMV_BTRFS_SCRUB_PRIORITY environment variable.
I got from the doc that running
Should get me the list of all variables usable, I get OMV_BTRFS_SCRUB_ENABLED and _PERIOD for example, but I don't see OMV_BTRFS_SCRUB_PRIORITY.
Should I still use:
I get the same issue as molnart, so i'd like to set the priority to idle too.
And then running the commands to apply the changes
Or do i have to do something else like modifying a file ?? (but I don't get which one if it's the case)
Thanks
Not all scripts have been parsed for existing env vars. But this doesn't matter, set it via the tool and your fine.
-
why is there a -- in the command? without it i get an error
-
It is a Bash feature, see https://unix.stackexchange.com/a/11382
Jetzt mitmachen!
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!