Andrea Mazzoleni
6729e2d0eb
Some minimal tags changes
2025-12-11 12:54:18 +01:00
Andrea Mazzoleni
04732d8f49
Rework the latest log_tag additions
2025-12-10 13:59:14 +01:00
Tristan Teufel
43119c9caf
Add structured log output for status command to enable ASCII-free parsing ( #29 )
...
Add structured log output for status command to enable ASCII-free parsing
2025-12-10 13:50:43 +01:00
BlueMöhre
47a2f640e7
add probe command to the usage output ( #27 )
Build / build-mac (push) Waiting to run
Build / build-linux (push) Waiting to run
Build / build-win (push) Waiting to run
CodeQL / Analyze (push) Waiting to run
2025-12-10 01:16:02 +01:00
Andrea Mazzoleni
d452b109bc
More regression tests
Build / build-mac (push) Waiting to run
Build / build-linux (push) Waiting to run
Build / build-win (push) Waiting to run
CodeQL / Analyze (push) Waiting to run
2025-10-28 12:15:50 +01:00
Andrea Mazzoleni
881add341f
Some more assertions
2025-10-27 16:22:52 +01:00
Andrea Mazzoleni
36b20e5d0e
Explain the internal functionality of the IO system
2025-10-27 15:55:13 +01:00
Andrea Mazzoleni
8ae0599c64
Fix quoting for printed file paths
Build / build-mac (push) Waiting to run
Build / build-linux (push) Waiting to run
Build / build-win (push) Waiting to run
CodeQL / Analyze (push) Waiting to run
2025-10-27 01:07:38 +01:00
Andrea Mazzoleni
21acc31bf1
Beautify code with uncrustify
2025-10-26 18:11:45 +01:00
Andrea Mazzoleni
9bc50f4e34
Avoid empty line in the cooldown output
2025-10-26 14:46:45 +01:00
Andrea Mazzoleni
a145ab5674
Improve temperature messages
2025-10-26 14:46:45 +01:00
Andrea Mazzoleni
ac986579d7
During cooldown keep spinning down any disk that is spun up
2025-10-26 12:03:31 +01:00
Andrea Mazzoleni
b549bffd4c
Flush disks before the emergency spindown
2025-10-26 10:38:43 +01:00
Andrea Mazzoleni
d2671e7627
Ensure that in Windows the content rename operation is flushed to disk
Build / build-mac (push) Has been cancelled
Build / build-linux (push) Has been cancelled
Build / build-win (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
2025-10-23 18:22:03 +02:00
Andrea Mazzoleni
1552f892d3
Don't forward Windows events to the child. It already receives them.
Build / build-mac (push) Waiting to run
Build / build-linux (push) Waiting to run
Build / build-win (push) Waiting to run
CodeQL / Analyze (push) Waiting to run
2025-10-21 00:35:28 +02:00
Andrea Mazzoleni
1aba628477
Fix command line handling in Windows
Build / build-mac (push) Has been cancelled
Build / build-linux (push) Has been cancelled
Build / build-win (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
2025-10-18 16:22:10 +02:00
Andrea Mazzoleni
ce2ad1e9c1
Handle SIGPIPE when spinning down
Build / build-mac (push) Waiting to run
Build / build-linux (push) Waiting to run
Build / build-win (push) Waiting to run
CodeQL / Analyze (push) Waiting to run
2025-10-18 11:45:31 +02:00
Andrea Mazzoleni
6c1421f5a0
Change thermal defaults
Build / build-mac (push) Waiting to run
Build / build-linux (push) Waiting to run
Build / build-win (push) Waiting to run
CodeQL / Analyze (push) Waiting to run
2025-10-17 10:07:51 +02:00
Andrea Mazzoleni
e00342557e
Exit with an error code if Ctrl+C is pressed
2025-10-17 10:07:51 +02:00
Andrea Mazzoleni
b4c96e5afa
Handle signals in fork
2025-10-17 08:49:05 +02:00
Andrea Mazzoleni
adc968e5c9
Keep estimating using the latest know temperature even if equal
2025-10-16 17:55:22 +02:00
Andrea Mazzoleni
adce4ce5f7
Use /proc/self/exe to restart itself
2025-10-16 16:13:13 +02:00
Andrea Mazzoleni
52ef48655f
Improve and change the order of the user messages
...
The "Everything is OK" is now printed as latest one.
2025-10-13 13:51:18 +02:00
Andrea Mazzoleni
467fb8c1ac
Don't print the "Nothing to do" if the state was updated
Build / build-mac (push) Waiting to run
Build / build-linux (push) Waiting to run
Build / build-win (push) Waiting to run
CodeQL / Analyze (push) Waiting to run
2025-10-13 00:26:31 +02:00
Andrea Mazzoleni
c1e101699a
Avoid stale messages on terminal to appear in new lines
2025-10-12 23:55:32 +02:00
Andrea Mazzoleni
adde997a38
Extend block time information to 64 bits
...
Build / build-mac (push) Has been cancelled
Build / build-linux (push) Has been cancelled
Build / build-win (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
Prevent potential timestamp overflow for the last write operation, which
could occur around 2106. The content format remains unchanged, as values are
expected to stay within the 32-bit range until then.
2025-10-08 13:02:24 +02:00
Andrea Mazzoleni
a2dd9a5f1c
Fix leak on error in the new devup
2025-10-08 00:17:01 +02:00
Andrea Mazzoleni
649b3f1f0b
Remove the SMART attribute 193 from the failure probability computation
Build / build-mac (push) Has been cancelled
Build / build-linux (push) Has been cancelled
Build / build-win (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
2025-09-29 16:25:49 +02:00
Andrea Mazzoleni
93804c20c3
Add a new -A, --stats option
2025-09-29 15:53:43 +02:00
Andrea Mazzoleni
c3d34734ae
Spinup Windows disk with direct access at low level
2025-09-29 14:42:15 +02:00
Andrea Mazzoleni
47c0f3b8ae
Before spinning down flush all the disk caches
2025-09-27 19:40:32 +02:00
Andrea Mazzoleni
906d215bf5
Add thermal protection options: temp_limit and temp_sleep
...
Build / build-mac (push) Has been cancelled
Build / build-linux (push) Has been cancelled
Build / build-win (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
Introduce two new configuration directives to protect disks from overheating:
- temp_limit <TEMPERATURE_CELSIUS>
Sets the maximum allowed disk temperature. When any disk exceeds this limit,
SnapRAID stops all operations and spins down the disks.
- temp_sleep <TIME_IN_MINUTES>
Specifies how long disks remain in standby after a temperature event.
Defaults to 15 minutes.
These options allow SnapRAID to automatically pause activity and cool down
disks when a temperature threshold is reached, improving data safety and
hardware longevity.
2025-09-27 16:05:05 +02:00
Andrea Mazzoleni
bb2b84d21a
Add a new -s, --spin-down-on-error option
...
Also handle correctly chars outside the Windows codepage as arguments.
2025-09-26 09:50:10 +02:00
Andrea Mazzoleni
30474cfb80
Ensure that writer buffers are flushed before synchronizing parity writes
Build / build-mac (push) Waiting to run
Build / build-linux (push) Waiting to run
Build / build-win (push) Waiting to run
CodeQL / Analyze (push) Waiting to run
2025-09-25 15:32:34 +02:00
Andrea Mazzoleni
5fd41d215b
Intercept Ctrl-C at startup of all commands
Build / build-mac (push) Has been cancelled
Build / build-linux (push) Has been cancelled
Build / build-win (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
2025-09-24 11:32:10 +02:00
Andrea Mazzoleni
fedeb99bdc
Add a new probe command
...
Probe the power state of the disks in the system
2025-09-24 11:26:30 +02:00
Andrea Mazzoleni
e57f07cc24
Use direct read access to spinup disks
...
This is more reliable in case of multiple physical devices mapped to the same
logical disk.
2025-09-24 11:15:26 +02:00
Andrea Mazzoleni
15826c2e3b
More compressed printing of bad blocks listing
Build / build-mac (push) Has been cancelled
Build / build-linux (push) Has been cancelled
Build / build-win (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
2025-09-17 18:37:02 +02:00
Andrea Mazzoleni
8cef686d26
Adds a new smartignore option to ignore specific SMART attributes
Build / build-mac (push) Waiting to run
Build / build-linux (push) Waiting to run
Build / build-win (push) Waiting to run
CodeQL / Analyze (push) Waiting to run
2025-09-15 16:57:22 +02:00
Andrea Mazzoleni
ad579dcef6
Modernize fnmatch implementation to avoid warnings with new compilers
2025-05-08 09:32:06 +02:00
Andrea Mazzoleni
5ad7f9acfc
Use POSIX_FADV_NOREUSE to avoid page-cache pollution
...
This adds support for POSIX_FADV_NOREUSE, which advises the kernel not to
cache read data. It's available starting from Linux kernel 6.3.
To maintain compatibility with older kernels, POSIX_FADV_DONTNEED is still
used.
2025-05-08 09:18:50 +02:00
Andrea Mazzoleni
f38b5a84a8
Use fetch_add because the wait is before the operation
2025-03-30 18:51:47 +02:00
Allan Clark
5886923bb1
Add bandwidth limit feature --bw-limit
2025-03-29 19:29:55 +01:00
Nasado
3c87474aa2
Use volume UUIDs on macOS
2025-02-13 11:21:26 +01:00
Andrea Mazzoleni
93f424768b
Remove unused variable
2024-06-05 10:14:50 +02:00
Tomas Uribe
79e8794ff5
Small doc updates, clarify references to "snapraid touch". ( #19 )
...
Co-authored-by: Andrea Mazzoleni <amadvance@gmail.com>
2024-01-10 14:17:00 +01:00
Andrea Mazzoleni
85ca997bf2
Fix integer overflow when computing the progress percentage
2024-01-03 20:20:39 +01:00
Andrea Mazzoleni
a605442c8c
Fix typos in messages
2023-12-09 15:35:45 +01:00
saladpanda
978d812153
Fix error when configuring a contentfile in / ( #18 )
...
When using this config line:
content /snapraid.content
SnapRAID throws this error:
Error accessing 'content' dir '' specification in '/etc/snapraid.conf' at line 17
This commit fixes that by not replacing the rightmost slash with NUL but
instead the char immediately after the slash.
2023-10-20 10:24:54 +02:00
Andrea Mazzoleni
0d6792d4ed
Clearify a scrub message
2022-12-05 12:13:40 +01:00