From 20e081d5ac75a4082943cafefce51a297f7fd4a6 Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Sat, 17 Oct 2026 21:23:59 +0200 Subject: [PATCH 01/17] Update CHECKSUMS --- CHECKSUMS | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHECKSUMS b/CHECKSUMS index fad5b785..8d59eba8 100644 --- a/CHECKSUMS +++ b/CHECKSUMS @@ -221,12 +221,18 @@ e11c452e2adec376e6fcaee9ff2ec4de4e943c35690229c9c67056c5eaed52a1 snapraid-14.9- 6e8892175bfe240ae7828d513342180a249511a2d5baf8c003ae8b2bb82e0f46 snapraid-14.10-windows-x64.zip 1ec0572359fb31f2827702d792db0bdf6a95161eb9e2a6deff2bdc7e1f5b794b snapraid-14.10-windows-x86.zip 6930d629c73b5307ec32277310ed13887b1bd051e30dc41c75b4752040032d1c snapraid-14.10-x86_64-1_am.txz +ceba44e15566386d923d6895ecab81f7437848b03a4cf9585c02d3636197ce19 snapraid-15.0.tar.gz 1e15cc11b26b02fbb54a679c0379161bf3c94aadfaf29081d876990d809a43f9 snapraid-15.0rc2.tar.gz a546944800a5001c3960715b97ba73cae219c854da1bb55dca16ce70fe06c6d6 snapraid-15.0rc2-1-x86_64.pkg.tar.zst 1327c122a66f91e7780e77431a318907661e690a4aca7fa78f9d504e8dde9e06 snapraid-15.0rc2-1.x86_64.rpm 092d1e91915e7644288805d1a91bd6f20ee0591d70157f5bb5980e26eaf82c1a snapraid-15.0rc2-windows-x64.zip 2c010c4ea69f39d28f266d978d78e0b2c3a845ab47f847cb5a305fc242994691 snapraid-15.0rc2-windows-x86.zip 7ada0dd95bad90895c3faaf627f99da02a4e31ac948d05f012efd2ab05a37d97 snapraid-15.0rc2-x86_64-1_am.txz +9d55d0308ce41beb29956b59f9d2e32d419c930118266d3e08b15f658119f4fb snapraid-15.0-1-x86_64.pkg.tar.zst +ad66c0b4c016775c9a759adf2a5202bebb357d319b0063b9cf68befde9a67363 snapraid-15.0-1.x86_64.rpm +704706c21b432719c4da8cd237c1f26327af89c86604dc339a38d63574004a22 snapraid-15.0-windows-x64.zip +58b3ed90307e41b7a6e862d2dc070204c98b5c3ac24718e2fb9fe03e275bc2ce snapraid-15.0-windows-x86.zip +9483df5a39a8b59c32433331ac92a4eef54dcff4722694a5bc5e89bcefb6b3b0 snapraid-15.0-x86_64-1_am.txz 128b5b0f80a6a0911e77ed3b5d9d81529f5ea1d8fffbb5112e3af3467d80464a snapraid_14.0-1_amd64.deb b9c41ae2e8edbc413abd3172b7ed2da2cba7fa0e631d0f47fc1dafccf7c6e92c snapraid_14.1-1_amd64.deb e6456b926bb053d34645e31e5e3d8363e952c9869e873eb348abb1149598d331 snapraid_14.2-1_amd64.deb @@ -239,3 +245,4 @@ c0e00a25b9bce40ff74f5a55401c3bfedac1881fd99aaa90a692f5858d417f7d snapraid_14.8- 09064689a64d965ac33ee89fb8b2cc14dfec0745f2b3b86a78f377fc353b7e07 snapraid_14.9-1_amd64.deb 15f5fd9f639912c94daae9d75d3567b7a3fc0e18475880f972acd8d8e9e0992c snapraid_14.10-1_amd64.deb fc875789267ec9b057d14780f04362cc32b3cb4191e707d6e0390f05ff346d46 snapraid_15.0rc2-1_amd64.deb +845091e7eeb2495fc3899dc6e8fab2c3fe7a5945f345c767a7603dab90e2cb84 snapraid_15.0-1_amd64.deb From a0d6bc288a8c3ba966bd54076b23f06ef5e48a1f Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Sun, 18 Oct 2026 10:45:14 +0200 Subject: [PATCH 02/17] Fix touch abort before the first sync when no content file exists --- cmdline/snapraid.c | 16 +++++++++++++++- cmdline/state.c | 31 +++++++++++++++++++++++++++++++ cmdline/state.h | 10 ++++++++++ 3 files changed, 56 insertions(+), 1 deletion(-) diff --git a/cmdline/snapraid.c b/cmdline/snapraid.c index c3c2f258..598a90fe 100644 --- a/cmdline/snapraid.c +++ b/cmdline/snapraid.c @@ -1530,7 +1530,8 @@ int snapraid_main(int argc, char* argv[]) if (state.opt.force_realloc) state_locate_mark_tail_blocks_for_resync(&state, opt.parity_tail); - if (opt.gui_touch_before) { + /* skip touch itself until content is loaded and sync has initialized parity sizes */ + if (opt.gui_touch_before && state_is_write_ready(&state)) { ret = state_touch(&state); /* save the new state if required */ @@ -1627,6 +1628,9 @@ int snapraid_main(int argc, char* argv[]) } else if (operation == OPERATION_REHASH) { state_read(&state); + /* prevent saving content with uninitialized parity split sizes */ + state_require_write_ready(&state); + state_rehash(&state); /* @@ -1645,6 +1649,9 @@ int snapraid_main(int argc, char* argv[]) } else if (operation == OPERATION_SCRUB) { state_read(&state); + /* prevent saving content with uninitialized parity split sizes */ + state_require_write_ready(&state); + /* refresh the size info before the content write */ state_refresh(&state); @@ -1667,6 +1674,9 @@ int snapraid_main(int argc, char* argv[]) } else if (operation == OPERATION_REWRITE) { state_read(&state); + /* prevent saving content with uninitialized parity split sizes */ + state_require_write_ready(&state); + /* intercept signals while operating */ os_signal_init(app_signal_handler, app_signal_handler); @@ -1682,6 +1692,9 @@ int snapraid_main(int argc, char* argv[]) } else if (operation == OPERATION_TOUCH) { state_read(&state); + /* prevent saving content with uninitialized parity split sizes */ + state_require_write_ready(&state); + memory(); ret = state_touch(&state); @@ -1696,6 +1709,7 @@ int snapraid_main(int argc, char* argv[]) */ os_signal_init(app_signal_handler, app_signal_handler); + /* save the new state if required */ if (state.need_write) state_write(&state); } else if (operation == OPERATION_SPINUP) { diff --git a/cmdline/state.c b/cmdline/state.c index c7be0926..0d44fa28 100644 --- a/cmdline/state.c +++ b/cmdline/state.c @@ -5428,6 +5428,37 @@ void state_read(struct snapraid_state* state) state->checked_read = 1; } +/** + * Check if all configured parity splits have persistent sizes. + */ +int state_is_write_ready(struct snapraid_state* state) +{ + unsigned l, s; + + for (l = 0; l < state->level; ++l) { + for (s = 0; s < state->parity[l].split_mac; ++s) { + if (state->parity[l].split_map[s].size == PARITY_SIZE_INVALID) + return 0; + } + } + + return 1; +} + +/** + * Require sync to initialize parity sizes before commands that can save content. + * Check before modifying timestamps or metadata, as a later write could fail + * even if the command has no blocks to process (e.g. a missing content replica). + */ +void state_require_write_ready(struct snapraid_state* state) +{ + if (!state_is_write_ready(state)) { + log_fatal(EUSER, "The array has not been synced yet, or its parity configuration has changed.\n"); + log_fatal(EUSER, "Run 'snapraid sync' before '%s'.\n", state->command); + exit(EXIT_FAILURE); + } +} + struct state_verify_thread_context { struct snapraid_state* state; struct snapraid_content* content; diff --git a/cmdline/state.h b/cmdline/state.h index 31215e86..b914b782 100644 --- a/cmdline/state.h +++ b/cmdline/state.h @@ -240,6 +240,16 @@ void state_probe(struct snapraid_state* state); */ void state_read(struct snapraid_state* state); +/** + * Check if all configured parity splits have persistent sizes. + */ +int state_is_write_ready(struct snapraid_state* state); + +/** + * Require initialized parity split sizes before commands that can save content. + */ +void state_require_write_ready(struct snapraid_state* state); + /** * Count the number of unsynced parity positions using an event sweep across extents. * Counts positions in [blockmin, blockmax). The caller must ensure that the disk list, From 8a5b2adb75599d7afd3754c91874f217f26db7a4 Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Sun, 18 Oct 2026 11:23:04 +0200 Subject: [PATCH 03/17] Remove unused checked_read state flag --- cmdline/state.c | 5 ----- cmdline/state.h | 1 - 2 files changed, 6 deletions(-) diff --git a/cmdline/state.c b/cmdline/state.c index 0d44fa28..006a912d 100644 --- a/cmdline/state.c +++ b/cmdline/state.c @@ -171,7 +171,6 @@ void state_init(struct snapraid_state* state) state->autosave = 0; state->need_write = 0; state->written = 0; - state->checked_read = 0; state->block_size = 256 * KIBI; /* default 256 KiB */ state->raid_mode = RAID_MODE_CAUCHY_RAID; state->file_mode = ADVISE_DEFAULT; @@ -5423,9 +5422,6 @@ void state_read(struct snapraid_state* state) log_tag("content_info:read_unixtime:%" PRId64 "\n", (int64_t)st.st_mtime); } log_flush(); - - /* mark that we read the content file, and it passed all the checks */ - state->checked_read = 1; } /** @@ -5967,7 +5963,6 @@ void state_write(struct snapraid_state* state) log_flush(); state->need_write = 0; /* no write needed anymore */ - state->checked_read = 0; /* what we wrote is not checked in read */ state->written = 1; } diff --git a/cmdline/state.h b/cmdline/state.h index b914b782..d9a93f29 100644 --- a/cmdline/state.h +++ b/cmdline/state.h @@ -130,7 +130,6 @@ struct snapraid_state { uint64_t autosave; /**< Autosave after the specified amount of data. 0 to disable. */ int need_write; /**< If the state is changed. */ int written; /**< If the state was written at least one time */ - int checked_read; /**< If the state was read and checked. */ uint32_t block_size; /**< Block size in bytes. */ unsigned raid_mode; /**< Raid mode to use. RAID_MODE_DEFAULT or RAID_MODE_ALTERNATE. */ int file_mode; /**< File access mode. Combination of ADVISE_* flags. */ From 7878bc3d3dd11f9e78a4215473da527db3f137d5 Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Sun, 18 Oct 2026 22:19:56 +0200 Subject: [PATCH 04/17] Update TODO --- TODO | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/TODO b/TODO index 4623ed47..614d56ef 100644 --- a/TODO +++ b/TODO @@ -6,19 +6,23 @@ This is the list of TODO items for SnapRAID. 16.x Releases ============= -* Use statx() instead of lstat() when scanning directories. +* Support a `[power_control: off]` tag in `smartctl` options to disable power + management (`up` and `down`) on specific disks (e.g. for SAS drives that + fail to wake up on write). Emit an attribute tag in probe for snapraid-daemon. + +* Enable MuseAir and disable random seed * Add a new 'restore' command, similar to 'fix', that recovers a whole disk using the same multithreaded approach as sync/scrub. +* Use statx() instead of lstat() when scanning directories. + * Integration with MergerFS ? * Restore ownership and permissions, at least in Unix. * Restore directory timestamps. -* Enable MuseAir and disable random seed - * Check Reliability Test. We can derive Failure probability from MBTF https://github.com/linuxhw/SMART https://github.com/linuxhw/EnterpriseDrive From 819bb75eaad447f825b452e087a0de7c571fbb85 Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Sun, 18 Oct 2026 22:30:58 +0200 Subject: [PATCH 05/17] Make test and doc variables in Makefile.am compatible with BSD make --- .github/workflows/build.yml | 8 ++++---- Makefile.am | 32 ++++++++++++++++++++++++++------ 2 files changed, 30 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a8c2d41a..ed5b2e2d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -90,12 +90,12 @@ jobs: with: usesh: true prepare: | - pkg install -y autoconf automake gmake + pkg install -y autoconf automake run: | autoreconf -i - ./configure --enable-warning-as-error MAKE=gmake - gmake all -j$(sysctl -n hw.ncpu) - gmake dist check + ./configure --enable-warning-as-error + make all -j$(sysctl -n hw.ncpu) + make dist check build-musl: runs-on: ubuntu-latest container: alpine:latest diff --git a/Makefile.am b/Makefile.am index 5d2a06a2..1da5e4b6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -228,13 +228,28 @@ dist-hook: LANG_CODES = de es fr it ja ko pl pt ro ru sv uk zh -LIST_D = doc/snapraid.d doc/snapraid_log.d $(patsubst %, doc/snapraid-%.d, $(LANG_CODES)) +LIST_LANG_D = \ + doc/snapraid-de.d \ + doc/snapraid-es.d \ + doc/snapraid-fr.d \ + doc/snapraid-it.d \ + doc/snapraid-ja.d \ + doc/snapraid-ko.d \ + doc/snapraid-pl.d \ + doc/snapraid-pt.d \ + doc/snapraid-ro.d \ + doc/snapraid-ru.d \ + doc/snapraid-sv.d \ + doc/snapraid-uk.d \ + doc/snapraid-zh.d -LIST_MAN = doc/snapraid.1 doc/snapraid_log.1 $(patsubst %, doc/snapraid-%.1, $(LANG_CODES)) +LIST_D = doc/snapraid.d doc/snapraid_log.d $(LIST_LANG_D) -LIST_TXT = doc/snapraid.txt doc/snapraid_log.txt $(patsubst %, doc/snapraid-%.txt, $(LANG_CODES)) +LIST_MAN = $(LIST_D:.d=.1) -LIST_XML = doc/snapraid.xml doc/snapraid_log.xml $(patsubst %, doc/snapraid-%.xml, $(LANG_CODES)) +LIST_TXT = $(LIST_D:.d=.txt) + +LIST_XML = $(LIST_D:.d=.xml) EXTRA_DIST = \ autogen.sh autover.sh valgrind.supp \ @@ -385,8 +400,13 @@ else # HAVE_POSIX CHECKCOUNT_DEFAULT = 500 endif # HAVE_POSIX -CHECKCOUNT = $(if $(filter 1,$(SHORTCHECK)),500,$(CHECKCOUNT_DEFAULT)) -CHECKSIZE = $(if $(filter 1,$(SHORTCHECK)),100,4000) +CHECKCOUNT_0 = $(CHECKCOUNT_DEFAULT) +CHECKCOUNT_1 = 500 +CHECKCOUNT = $(CHECKCOUNT_$(SHORTCHECK)) + +CHECKSIZE_0 = 4000 +CHECKSIZE_1 = 100 +CHECKSIZE = $(CHECKSIZE_$(SHORTCHECK)) CONF = $(srcdir)/test/test-par6.conf THERMAL = $(srcdir)/test/test-par6-thermal.conf From e27d2217936f2cc14d028aa01f991bd7d37426ce Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Thu, 22 Oct 2026 18:50:18 +0200 Subject: [PATCH 06/17] Update HISTORY --- HISTORY | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/HISTORY b/HISTORY index 29bf0a47..e413d904 100644 --- a/HISTORY +++ b/HISTORY @@ -1,8 +1,20 @@ SnapRAID HISTORY ================ -15.0 (Work in Progress) -======================= +15.1 2026/10 +============ + * Fix a failed internal inconsistency check when '--gui-touch-before' + is used before the first sync when no content file exists yet. + Also ensure that commands that can save the content file ('touch', + 'scrub', 'rehash', 'rewrite') fail with a clear error message if the + array has not been synced yet. This fix is required by + SnapRAID-Daemon. + * Make test and doc variables in Makefile.am compatible with BSD make, + allowing builds, tests, and documentation generation on BSD systems + without requiring GNU make. + +15.0 2026/10 +============ * Added support for automated filesystem snapshots to ensure data consistency and improve recovery reliability. When the 'snapshot' option is enabled, SnapRAID transparently manages From 7275872c80f4d8ae9d1869fa72f936e7a852512c Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Thu, 22 Oct 2026 20:18:52 +0200 Subject: [PATCH 07/17] Pin build-linux runner to ubuntu-24.04 for zfs kernel modules --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ed5b2e2d..d60345ab 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,7 +20,7 @@ jobs: - run: make all -j$(sysctl -n hw.ncpu) - run: make dist check build-linux: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v5 - run: | From 4054832c7e385388c6629561bf0ddb16b95698b5 Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Thu, 22 Oct 2026 21:36:39 +0200 Subject: [PATCH 08/17] Add best-effort Linux disk instance mappings using boot_id and diskseq --- HISTORY | 3 +++ cmdline/unixapp.c | 31 +++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/HISTORY b/HISTORY index e413d904..dd9a4005 100644 --- a/HISTORY +++ b/HISTORY @@ -3,6 +3,9 @@ SnapRAID HISTORY 15.1 2026/10 ============ + * Add synthetic device IDs on Linux, allowing SnapRAID Daemon to + preserve history for devices without unique hardware IDs while + they remain connected within the same boot. * Fix a failed internal inconsistency check when '--gui-touch-before' is used before the first sync when no content file exists yet. Also ensure that commands that can save the content file ('touch', diff --git a/cmdline/unixapp.c b/cmdline/unixapp.c index 78479c05..8609ba03 100644 --- a/cmdline/unixapp.c +++ b/cmdline/unixapp.c @@ -4447,6 +4447,7 @@ int devmap(void) { #if HAVE_LINUX_DEVICE char path[PATH_MAX]; + char boot_id[64]; DIR* d = opendir("/sys/block"); if (!d) { /* LCOV_EXCL_START */ @@ -4454,6 +4455,22 @@ int devmap(void) /* LCOV_EXCL_STOP */ } + /* optional boot identity: failure must not affect hardware mappings */ + if (sysattr("/proc/sys/kernel/random/boot_id", boot_id, sizeof(boot_id)) != 0 || strlen(boot_id) != 36) { + boot_id[0] = 0; + } else { + for (unsigned i = 0; i < 36; ++i) { + if (i == 8 || i == 13 || i == 18 || i == 23) { + if (boot_id[i] == '-') + continue; + } else if (hexval(boot_id[i]) >= 0) { + continue; + } + boot_id[0] = 0; + break; + } + } + struct dirent* dd; while (1) { char buf[256]; @@ -4517,6 +4534,20 @@ int devmap(void) if (sysattr(path, buf, sizeof(buf)) == 0 && buf[0] != 0) { log_tag("map:/dev/%s:%s\n", dd->d_name, esc_tag(buf)); } + + /* + * This identifies the kernel device instance within one boot, not + * persistent hardware across reconnections. Missing attributes are optional. + */ + if (boot_id[0] != 0) { + pathprint(path, sizeof(path), "/sys/block/%s/diskseq", dd->d_name); + if (sysattr(path, buf, sizeof(buf)) == 0) { + char* end; + unsigned long long diskseq = strtonll(buf, &end, 10); + if (buf[0] >= '0' && buf[0] <= '9' && diskseq != 0 && end != buf && *end == 0) + log_tag("map:/dev/%s:linux-diskseq.%s.%llu\n", esc_tag(dd->d_name), esc_tag(boot_id), diskseq); + } + } } closedir(d); From 5871fd4da356af5c171e6865a6c790b0c37ab6ff Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Fri, 23 Oct 2026 11:05:30 +0200 Subject: [PATCH 09/17] Update CHECKSUMS --- CHECKSUMS | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/CHECKSUMS b/CHECKSUMS index 8d59eba8..80753f42 100644 --- a/CHECKSUMS +++ b/CHECKSUMS @@ -222,17 +222,17 @@ e11c452e2adec376e6fcaee9ff2ec4de4e943c35690229c9c67056c5eaed52a1 snapraid-14.9- 1ec0572359fb31f2827702d792db0bdf6a95161eb9e2a6deff2bdc7e1f5b794b snapraid-14.10-windows-x86.zip 6930d629c73b5307ec32277310ed13887b1bd051e30dc41c75b4752040032d1c snapraid-14.10-x86_64-1_am.txz ceba44e15566386d923d6895ecab81f7437848b03a4cf9585c02d3636197ce19 snapraid-15.0.tar.gz -1e15cc11b26b02fbb54a679c0379161bf3c94aadfaf29081d876990d809a43f9 snapraid-15.0rc2.tar.gz -a546944800a5001c3960715b97ba73cae219c854da1bb55dca16ce70fe06c6d6 snapraid-15.0rc2-1-x86_64.pkg.tar.zst -1327c122a66f91e7780e77431a318907661e690a4aca7fa78f9d504e8dde9e06 snapraid-15.0rc2-1.x86_64.rpm -092d1e91915e7644288805d1a91bd6f20ee0591d70157f5bb5980e26eaf82c1a snapraid-15.0rc2-windows-x64.zip -2c010c4ea69f39d28f266d978d78e0b2c3a845ab47f847cb5a305fc242994691 snapraid-15.0rc2-windows-x86.zip -7ada0dd95bad90895c3faaf627f99da02a4e31ac948d05f012efd2ab05a37d97 snapraid-15.0rc2-x86_64-1_am.txz 9d55d0308ce41beb29956b59f9d2e32d419c930118266d3e08b15f658119f4fb snapraid-15.0-1-x86_64.pkg.tar.zst ad66c0b4c016775c9a759adf2a5202bebb357d319b0063b9cf68befde9a67363 snapraid-15.0-1.x86_64.rpm 704706c21b432719c4da8cd237c1f26327af89c86604dc339a38d63574004a22 snapraid-15.0-windows-x64.zip 58b3ed90307e41b7a6e862d2dc070204c98b5c3ac24718e2fb9fe03e275bc2ce snapraid-15.0-windows-x86.zip 9483df5a39a8b59c32433331ac92a4eef54dcff4722694a5bc5e89bcefb6b3b0 snapraid-15.0-x86_64-1_am.txz +fb2d6a9cf9c8ea30c6962f4a48764dc9012fe61d6e23f40a8d959dadea02278b snapraid-15.1.tar.gz +5e627e08caa8d7647fd40e5288b8d59846d1f3d65d586bae74a57cd99a23f497 snapraid-15.1-1-x86_64.pkg.tar.zst +8922234dd566c876b17cbaadad6a22690d05240250455e504513906d933e16dd snapraid-15.1-1.x86_64.rpm +64849f463986d0d80b948dbb07e9af6402bed230a9cf17dbd1110199aca56486 snapraid-15.1-windows-x64.zip +f7be230f7849d89941a280dc8c2cc6e158844e0fe6f00adbb6aa9ac0f65322b8 snapraid-15.1-windows-x86.zip +4dbd01ab2582a74fab4d7ee8f9b11966d4188fba9eedcd31fcc0a5588cd0c702 snapraid-15.1-x86_64-1_am.txz 128b5b0f80a6a0911e77ed3b5d9d81529f5ea1d8fffbb5112e3af3467d80464a snapraid_14.0-1_amd64.deb b9c41ae2e8edbc413abd3172b7ed2da2cba7fa0e631d0f47fc1dafccf7c6e92c snapraid_14.1-1_amd64.deb e6456b926bb053d34645e31e5e3d8363e952c9869e873eb348abb1149598d331 snapraid_14.2-1_amd64.deb @@ -244,5 +244,5 @@ b71b556da4be6263a904fb8ac489933875467adbb920dd3911e54d87e9637ca3 snapraid_14.6- c0e00a25b9bce40ff74f5a55401c3bfedac1881fd99aaa90a692f5858d417f7d snapraid_14.8-1_amd64.deb 09064689a64d965ac33ee89fb8b2cc14dfec0745f2b3b86a78f377fc353b7e07 snapraid_14.9-1_amd64.deb 15f5fd9f639912c94daae9d75d3567b7a3fc0e18475880f972acd8d8e9e0992c snapraid_14.10-1_amd64.deb -fc875789267ec9b057d14780f04362cc32b3cb4191e707d6e0390f05ff346d46 snapraid_15.0rc2-1_amd64.deb 845091e7eeb2495fc3899dc6e8fab2c3fe7a5945f345c767a7603dab90e2cb84 snapraid_15.0-1_amd64.deb +974cd45fc8f44d5642b49bd9b30e81aca2bcd7689877f9fa73d1e58d3f1b5bda snapraid_15.1-1_amd64.deb From ccf095a6f88f127cb1ef3c798b777e03a7c17163 Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Tue, 10 Nov 2026 22:27:01 +0100 Subject: [PATCH 10/17] Log OS function failure diagnostics at error level --- os/mingw.c | 106 +++++++++++++++++++------------------- os/unix.c | 148 ++++++++++++++++++++++++++--------------------------- 2 files changed, 127 insertions(+), 127 deletions(-) diff --git a/os/mingw.c b/os/mingw.c index 639f3073..edbf537a 100644 --- a/os/mingw.c +++ b/os/mingw.c @@ -1192,8 +1192,8 @@ int windows_fsync(int fd) * So, we use now an extended error reporting. */ windows_errno(error); - os_syslog(OS_LVL_INFO, "unexpected Windows INVALID_HANDLE error in FlushFileBuffers()"); - os_syslog(OS_LVL_INFO, "are you using ATA-over-Ethernet? Please report it."); + os_syslog(OS_LVL_ERROR, "unexpected Windows INVALID_HANDLE error in FlushFileBuffers()"); + os_syslog(OS_LVL_ERROR, "are you using ATA-over-Ethernet? Please report it."); return -1; case ERROR_ACCESS_DENIED : @@ -1249,8 +1249,8 @@ static int windows_vsync(const wchar_t* volume) * So, we use now an extended error reporting. */ windows_errno(error); - os_syslog(OS_LVL_INFO, "unexpected Windows INVALID_HANDLE error in FlushFileBuffers()"); - os_syslog(OS_LVL_INFO, "are you using ATA-over-Ethernet? Please report it."); + os_syslog(OS_LVL_ERROR, "unexpected Windows INVALID_HANDLE error in FlushFileBuffers()"); + os_syslog(OS_LVL_ERROR, "are you using ATA-over-Ethernet? Please report it."); return -1; case ERROR_ACCESS_DENIED : @@ -3206,14 +3206,14 @@ pid_t os_spawn(char** argv, int* stdout_read_int, int* stderr_read_int, const ch /* create a pipe for the child process's STDOUT */ if (!CreatePipe(&stdout_read_handle, &stdout_write_handle, &sa, 0)) { windows_errno(GetLastError()); - os_syslog(OS_LVL_INFO, "failed to create pipe for spawn, errno=%s(%d)", strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to create pipe for spawn, errno=%s(%d)", strerror(errno), errno); return -1; } /* ensure the reading handle to the pipe is not inherited */ if (!SetHandleInformation(stdout_read_handle, HANDLE_FLAG_INHERIT, 0)) { windows_errno(GetLastError()); - os_syslog(OS_LVL_INFO, "failed to handle information for spawn, errno=%s(%d)", strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to handle information for spawn, errno=%s(%d)", strerror(errno), errno); CloseHandle(stdout_write_handle); CloseHandle(stdout_read_handle); return -1; @@ -3222,7 +3222,7 @@ pid_t os_spawn(char** argv, int* stdout_read_int, int* stderr_read_int, const ch out_f = _open_osfhandle((intptr_t)stdout_read_handle, O_RDONLY | O_BINARY); if (out_f == -1) { windows_errno(GetLastError()); - os_syslog(OS_LVL_INFO, "failed to open osfhandle for spawn, errno=%s(%d)", strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to open osfhandle for spawn, errno=%s(%d)", strerror(errno), errno); CloseHandle(stdout_write_handle); CloseHandle(stdout_read_handle); return -1; @@ -3233,7 +3233,7 @@ pid_t os_spawn(char** argv, int* stdout_read_int, int* stderr_read_int, const ch /* create a pipe for the child process's STDERR */ if (!CreatePipe(&stderr_read_handle, &stderr_write_handle, &sa, 0)) { windows_errno(GetLastError()); - os_syslog(OS_LVL_INFO, "failed to create pipe for spawn, errno=%s(%d)", strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to create pipe for spawn, errno=%s(%d)", strerror(errno), errno); if (has_out) { CloseHandle(stdout_write_handle); close(out_f); @@ -3244,7 +3244,7 @@ pid_t os_spawn(char** argv, int* stdout_read_int, int* stderr_read_int, const ch /* ensure the reading handle to the pipe is not inherited */ if (!SetHandleInformation(stderr_read_handle, HANDLE_FLAG_INHERIT, 0)) { windows_errno(GetLastError()); - os_syslog(OS_LVL_INFO, "failed to handle information for spawn, errno=%s(%d)", strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to handle information for spawn, errno=%s(%d)", strerror(errno), errno); CloseHandle(stderr_write_handle); CloseHandle(stderr_read_handle); if (has_out) { @@ -3257,7 +3257,7 @@ pid_t os_spawn(char** argv, int* stdout_read_int, int* stderr_read_int, const ch err_f = _open_osfhandle((intptr_t)stderr_read_handle, O_RDONLY | O_BINARY); if (err_f == -1) { windows_errno(GetLastError()); - os_syslog(OS_LVL_INFO, "failed to open osfhandle for spawn, errno=%s(%d)", strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to open osfhandle for spawn, errno=%s(%d)", strerror(errno), errno); CloseHandle(stderr_write_handle); CloseHandle(stderr_read_handle); if (has_out) { @@ -3272,7 +3272,7 @@ pid_t os_spawn(char** argv, int* stdout_read_int, int* stderr_read_int, const ch HANDLE nul_handle = CreateFileW(L"NUL", GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, &sa, OPEN_EXISTING, 0, NULL); if (nul_handle == INVALID_HANDLE_VALUE) { windows_errno(GetLastError()); - os_syslog(OS_LVL_INFO, "failed to open NUL for spawn, errno=%s(%d)", strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to open NUL for spawn, errno=%s(%d)", strerror(errno), errno); if (has_out) { CloseHandle(stdout_write_handle); close(out_f); @@ -3302,7 +3302,7 @@ pid_t os_spawn(char** argv, int* stdout_read_int, int* stderr_read_int, const ch } pos = argcat(cmd_buffer, COMMAND_LINE_MAX, pos, conv); if (pos < 0) { - os_syslog(OS_LVL_INFO, "command to long for spawn"); + os_syslog(OS_LVL_ERROR, "command to long for spawn"); CloseHandle(nul_handle); if (has_out) { CloseHandle(stdout_write_handle); @@ -3322,7 +3322,7 @@ pid_t os_spawn(char** argv, int* stdout_read_int, int* stderr_read_int, const ch if (process_startup_init(&startup, nul_handle, has_out ? stdout_write_handle : nul_handle, has_err ? stderr_write_handle : nul_handle) != 0) { - os_syslog(OS_LVL_INFO, "failed to create handle list for spawn, errno=%s(%d)", strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to create handle list for spawn, errno=%s(%d)", strerror(errno), errno); CloseHandle(nul_handle); if (has_out) { CloseHandle(stdout_write_handle); @@ -3374,7 +3374,7 @@ pid_t os_spawn(char** argv, int* stdout_read_int, int* stderr_read_int, const ch /* validate that the requested user is actually a supported Service Account before attempting logon */ if (_stricmp(run_as_user, "LocalService") != 0 && _stricmp(run_as_user, "NetworkService") != 0) { - os_syslog(OS_LVL_INFO, "only supported users are LocalService and NetworkService"); + os_syslog(OS_LVL_ERROR, "only supported users are LocalService and NetworkService"); pid_unpublish(pid_slot, 0); process_startup_done(&startup); CloseHandle(nul_handle); @@ -3392,7 +3392,7 @@ pid_t os_spawn(char** argv, int* stdout_read_int, int* stderr_read_int, const ch const wchar_t* wuser = _stricmp(run_as_user, "LocalService") == 0 ? L"LocalService" : L"NetworkService"; if (!LogonUserW(wuser, L"NT AUTHORITY", NULL, LOGON32_LOGON_SERVICE, LOGON32_PROVIDER_DEFAULT, &h_token)) { windows_errno(GetLastError()); - os_syslog(OS_LVL_INFO, "failed to logon user %s, errno=%s(%d)", run_as_user, strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to logon user %s, errno=%s(%d)", run_as_user, strerror(errno), errno); pid_unpublish(pid_slot, 0); process_startup_done(&startup); CloseHandle(nul_handle); @@ -3411,7 +3411,7 @@ pid_t os_spawn(char** argv, int* stdout_read_int, int* stderr_read_int, const ch LPVOID env = NULL; if (!CreateEnvironmentBlock(&env, h_token, FALSE)) { windows_errno(GetLastError()); - os_syslog(OS_LVL_INFO, "failed to get user %s environment, errno=%s(%d)", run_as_user, strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to get user %s environment, errno=%s(%d)", run_as_user, strerror(errno), errno); pid_unpublish(pid_slot, 0); CloseHandle(h_token); process_startup_done(&startup); @@ -3447,7 +3447,7 @@ pid_t os_spawn(char** argv, int* stdout_read_int, int* stderr_read_int, const ch process_startup_done(&startup); if (!ret) { windows_errno(create_error); - os_syslog(OS_LVL_INFO, "failed to create process '%s' for spawn, errno=%s(%d)", argv[0], strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to create process '%s' for spawn, errno=%s(%d)", argv[0], strerror(errno), errno); pid_unpublish(pid_slot, 0); CloseHandle(nul_handle); if (has_out) { @@ -3471,7 +3471,7 @@ pid_t os_spawn(char** argv, int* stdout_read_int, int* stderr_read_int, const ch if (os_job_handle != 0) { if (!AssignProcessToJobObject(os_job_handle, pi.hProcess)) { windows_errno(GetLastError()); - os_syslog(OS_LVL_INFO, "failed to assign process to job object, errno=%s(%d)", strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to assign process to job object, errno=%s(%d)", strerror(errno), errno); pid_unpublish(pid_slot, 0); TerminateProcess(pi.hProcess, 1); CloseHandle(pi.hThread); @@ -3491,7 +3491,7 @@ pid_t os_spawn(char** argv, int* stdout_read_int, int* stderr_read_int, const ch /* resume the primary thread now that the process is assigned to the job object */ if (ResumeThread(pi.hThread) == (DWORD)-1) { windows_errno(GetLastError()); - os_syslog(OS_LVL_INFO, "failed to resume thread for spawn, errno=%s(%d)", strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to resume thread for spawn, errno=%s(%d)", strerror(errno), errno); pid_unpublish(pid_slot, 0); TerminateProcess(pi.hProcess, 1); CloseHandle(pi.hThread); @@ -3696,14 +3696,14 @@ int os_command(const char* command, const char* run_as_user, const char* stdin_t /* create pipe for child's STDIN */ if (!CreatePipe(&stdin_read_handle, &stdin_write_handle, &sa, 0)) { windows_errno(GetLastError()); - os_syslog(OS_LVL_INFO, "failed to create pipe for command, errno=%s(%d)", strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to create pipe for command, errno=%s(%d)", strerror(errno), errno); return -1; } /* ensure the parent's write end is NOT inherited */ if (!SetHandleInformation(stdin_write_handle, HANDLE_FLAG_INHERIT, 0)) { windows_errno(GetLastError()); - os_syslog(OS_LVL_INFO, "failed to handle information for spawn, errno=%s(%d)", strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to handle information for spawn, errno=%s(%d)", strerror(errno), errno); CloseHandle(stdin_read_handle); CloseHandle(stdin_write_handle); return -1; @@ -3720,7 +3720,7 @@ int os_command(const char* command, const char* run_as_user, const char* stdin_t NULL); if (nul == INVALID_HANDLE_VALUE) { windows_errno(GetLastError()); - os_syslog(OS_LVL_INFO, "failed to create nul device, errno=%s(%d)", strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to create nul device, errno=%s(%d)", strerror(errno), errno); CloseHandle(stdin_read_handle); CloseHandle(stdin_write_handle); return -1; @@ -3728,7 +3728,7 @@ int os_command(const char* command, const char* run_as_user, const char* stdin_t ZeroMemory(&pi, sizeof(pi)); if (process_startup_init(&startup, stdin_read_handle, nul, nul) != 0) { - os_syslog(OS_LVL_INFO, "failed to create handle list for command, errno=%s(%d)", strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to create handle list for command, errno=%s(%d)", strerror(errno), errno); CloseHandle(stdin_read_handle); CloseHandle(stdin_write_handle); CloseHandle(nul); @@ -3777,7 +3777,7 @@ int os_command(const char* command, const char* run_as_user, const char* stdin_t * Service Account before attempting logon. */ if (_stricmp(run_as_user, "LocalService") != 0 && _stricmp(run_as_user, "NetworkService") != 0) { - os_syslog(OS_LVL_INFO, "only supported users are LocalService and NetworkService"); + os_syslog(OS_LVL_ERROR, "only supported users are LocalService and NetworkService"); pid_unpublish(pid_slot, 0); process_startup_done(&startup); CloseHandle(stdin_read_handle); @@ -3789,7 +3789,7 @@ int os_command(const char* command, const char* run_as_user, const char* stdin_t const wchar_t* wuser = _stricmp(run_as_user, "LocalService") == 0 ? L"LocalService" : L"NetworkService"; if (!LogonUserW(wuser, L"NT AUTHORITY", NULL, LOGON32_LOGON_SERVICE, LOGON32_PROVIDER_DEFAULT, &h_token)) { windows_errno(GetLastError()); - os_syslog(OS_LVL_INFO, "failed to logon user %s, errno=%s(%d)", run_as_user, strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to logon user %s, errno=%s(%d)", run_as_user, strerror(errno), errno); pid_unpublish(pid_slot, 0); process_startup_done(&startup); CloseHandle(stdin_read_handle); @@ -3804,7 +3804,7 @@ int os_command(const char* command, const char* run_as_user, const char* stdin_t LPVOID env = NULL; if (!CreateEnvironmentBlock(&env, h_token, FALSE)) { windows_errno(GetLastError()); - os_syslog(OS_LVL_INFO, "failed to get user %s environment, errno=%s(%d)", run_as_user, strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to get user %s environment, errno=%s(%d)", run_as_user, strerror(errno), errno); pid_unpublish(pid_slot, 0); process_startup_done(&startup); CloseHandle(stdin_read_handle); @@ -3834,7 +3834,7 @@ int os_command(const char* command, const char* run_as_user, const char* stdin_t process_startup_done(&startup); if (!ret) { windows_errno(create_error); - os_syslog(OS_LVL_INFO, "failed to create process '%s' for command, errno=%s(%d)", command, strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to create process '%s' for command, errno=%s(%d)", command, strerror(errno), errno); pid_unpublish(pid_slot, 0); CloseHandle(stdin_read_handle); CloseHandle(stdin_write_handle); @@ -3852,7 +3852,7 @@ int os_command(const char* command, const char* run_as_user, const char* stdin_t if (os_job_handle != 0) { if (!AssignProcessToJobObject(os_job_handle, pi.hProcess)) { windows_errno(GetLastError()); - os_syslog(OS_LVL_INFO, "failed to assign command process to job object, errno=%s(%d)", strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to assign command process to job object, errno=%s(%d)", strerror(errno), errno); pid_unpublish(pid_slot, 0); TerminateProcess(pi.hProcess, 1); CloseHandle(pi.hThread); @@ -3865,7 +3865,7 @@ int os_command(const char* command, const char* run_as_user, const char* stdin_t /* resume the primary thread now that the process is assigned to the job object */ if (ResumeThread(pi.hThread) == (DWORD)-1) { windows_errno(GetLastError()); - os_syslog(OS_LVL_INFO, "failed to resume thread for command, errno=%s(%d)", strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to resume thread for command, errno=%s(%d)", strerror(errno), errno); pid_unpublish(pid_slot, 0); TerminateProcess(pi.hProcess, 1); CloseHandle(pi.hThread); @@ -3888,7 +3888,7 @@ int os_command(const char* command, const char* run_as_user, const char* stdin_t if (error == ERROR_BROKEN_PIPE || error == ERROR_NO_DATA) break; /* child closed stdin early */ windows_errno(error); - os_syslog(OS_LVL_INFO, "failed to write stdin to command %s, errno=%s(%d)", command, strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to write stdin to command %s, errno=%s(%d)", command, strerror(errno), errno); break; } written += count; @@ -3914,7 +3914,7 @@ int os_command(const char* command, const char* run_as_user, const char* stdin_t int64_t execution_time = stop - start; if (timed_out) { - os_syslog(OS_LVL_INFO, "command %s timeout after %" PRId64 " seconds", command, execution_time); + os_syslog(OS_LVL_ERROR, "command %s timeout after %" PRId64 " seconds", command, execution_time); return -1; } @@ -3926,16 +3926,16 @@ int os_command(const char* command, const char* run_as_user, const char* stdin_t if (exit_code == 0) os_syslog(OS_LVL_INFO, "command %s terminated in %" PRId64 " seconds with success", command, execution_time); else - os_syslog(OS_LVL_INFO, "command %s terminated in %" PRId64 " seconds with exit code %d", command, execution_time, exit_code); + os_syslog(OS_LVL_ERROR, "command %s terminated in %" PRId64 " seconds with exit code %d", command, execution_time, exit_code); return exit_code; } else if (WIFSIGNALED(status)) { /* child died from a signal */ int sig = WTERMSIG(status); - os_syslog(OS_LVL_INFO, "command %s terminated in %" PRId64 " seconds with signal %s(%d)", command, execution_time, os_signal_name(sig), sig); + os_syslog(OS_LVL_ERROR, "command %s terminated in %" PRId64 " seconds with signal %s(%d)", command, execution_time, os_signal_name(sig), sig); return 128 + sig; } else { /* in Windows it can happen */ - os_syslog(OS_LVL_INFO, "command %s terminated in %" PRId64 " seconds for unknown reason, status=0x%08x", command, execution_time, (unsigned)status); + os_syslog(OS_LVL_ERROR, "command %s terminated in %" PRId64 " seconds for unknown reason, status=0x%08x", command, execution_time, (unsigned)status); return -1; } } @@ -4094,7 +4094,7 @@ int os_script(char** argv, char** envp, const char* run_as_user, uint64_t timeou /* resolve the script path to prevent symlink attacks */ if (!realpath(script_path, resolved_path)) { - os_syslog(OS_LVL_INFO, "failed to resolve script, path=%s, errno=%s(%d)", script_path, strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to resolve script, path=%s, errno=%s(%d)", script_path, strerror(errno), errno); return -1; } @@ -4120,9 +4120,9 @@ int os_script(char** argv, char** envp, const char* run_as_user, uint64_t timeou pos = scriptcat(cmd_buffer, COMMAND_LINE_MAX, pos, conv); if (pos < 0) { if (errno == EINVAL) - os_syslog(OS_LVL_INFO, "unsupported embedded double quote in script path"); + os_syslog(OS_LVL_ERROR, "unsupported embedded double quote in script path"); else - os_syslog(OS_LVL_INFO, "command to long for script"); + os_syslog(OS_LVL_ERROR, "command to long for script"); return -1; } for (int i = 1; argv[i]; ++i) { @@ -4131,15 +4131,15 @@ int os_script(char** argv, char** envp, const char* run_as_user, uint64_t timeou pos = scriptcat(cmd_buffer, COMMAND_LINE_MAX, pos, conv); if (pos < 0) { if (errno == EINVAL) - os_syslog(OS_LVL_INFO, "unsupported embedded double quote in script argument"); + os_syslog(OS_LVL_ERROR, "unsupported embedded double quote in script argument"); else - os_syslog(OS_LVL_INFO, "command to long for script"); + os_syslog(OS_LVL_ERROR, "command to long for script"); return -1; } } pos = fixcat(cmd_buffer, COMMAND_LINE_MAX, pos, L" \""); if (pos < 0) { - os_syslog(OS_LVL_INFO, "command to long for script"); + os_syslog(OS_LVL_ERROR, "command to long for script"); return -1; } cmd_buffer[pos] = 0; @@ -4167,14 +4167,14 @@ int os_script(char** argv, char** envp, const char* run_as_user, uint64_t timeou base_env = GetEnvironmentStringsW(); if (!base_env) { windows_errno(GetLastError()); - os_syslog(OS_LVL_INFO, "failed to get environment strings, errno=%s(%d)", strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to get environment strings, errno=%s(%d)", strerror(errno), errno); pid_unpublish(pid_slot, 0); return -1; } combined_env = env_combine(base_env, envp); FreeEnvironmentStringsW(base_env); if (!combined_env) { - os_syslog(OS_LVL_INFO, "failed to combine environment strings, errno=%s(%d)", strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to combine environment strings, errno=%s(%d)", strerror(errno), errno); pid_unpublish(pid_slot, 0); return -1; } @@ -4205,7 +4205,7 @@ int os_script(char** argv, char** envp, const char* run_as_user, uint64_t timeou * Service Account before attempting logon. */ if (_stricmp(run_as_user, "LocalService") != 0 && _stricmp(run_as_user, "NetworkService") != 0) { - os_syslog(OS_LVL_INFO, "only supported users are LocalService and NetworkService"); + os_syslog(OS_LVL_ERROR, "only supported users are LocalService and NetworkService"); pid_unpublish(pid_slot, 0); return -1; } @@ -4213,7 +4213,7 @@ int os_script(char** argv, char** envp, const char* run_as_user, uint64_t timeou const wchar_t* wuser = _stricmp(run_as_user, "LocalService") == 0 ? L"LocalService" : L"NetworkService"; if (!LogonUserW(wuser, L"NT AUTHORITY", NULL, LOGON32_LOGON_SERVICE, LOGON32_PROVIDER_DEFAULT, &h_token)) { windows_errno(GetLastError()); - os_syslog(OS_LVL_INFO, "failed to logon user %s, errno=%s(%d)", run_as_user, strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to logon user %s, errno=%s(%d)", run_as_user, strerror(errno), errno); pid_unpublish(pid_slot, 0); return -1; } @@ -4224,7 +4224,7 @@ int os_script(char** argv, char** envp, const char* run_as_user, uint64_t timeou LPVOID env = NULL; if (!CreateEnvironmentBlock(&env, h_token, FALSE)) { windows_errno(GetLastError()); - os_syslog(OS_LVL_INFO, "failed to get user %s environment, errno=%s(%d)", run_as_user, strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to get user %s environment, errno=%s(%d)", run_as_user, strerror(errno), errno); pid_unpublish(pid_slot, 0); CloseHandle(h_token); return -1; @@ -4234,7 +4234,7 @@ int os_script(char** argv, char** envp, const char* run_as_user, uint64_t timeou if (envp != NULL) { combined_env = env_combine((const WCHAR*)env, envp); if (!combined_env) { - os_syslog(OS_LVL_INFO, "failed to combine environment strings, errno=%s(%d)", strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to combine environment strings, errno=%s(%d)", strerror(errno), errno); pid_unpublish(pid_slot, 0); DestroyEnvironmentBlock(env); CloseHandle(h_token); @@ -4261,7 +4261,7 @@ int os_script(char** argv, char** envp, const char* run_as_user, uint64_t timeou } if (!ret) { windows_errno(GetLastError()); - os_syslog(OS_LVL_INFO, "failed to create process '%s' for script, errno=%s(%d)", resolved_path, strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to create process '%s' for script, errno=%s(%d)", resolved_path, strerror(errno), errno); pid_unpublish(pid_slot, 0); return -1; } @@ -4270,7 +4270,7 @@ int os_script(char** argv, char** envp, const char* run_as_user, uint64_t timeou if (os_job_handle != 0) { if (!AssignProcessToJobObject(os_job_handle, pi.hProcess)) { windows_errno(GetLastError()); - os_syslog(OS_LVL_INFO, "failed to assign script process to job object, errno=%s(%d)", strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to assign script process to job object, errno=%s(%d)", strerror(errno), errno); pid_unpublish(pid_slot, 0); TerminateProcess(pi.hProcess, 1); CloseHandle(pi.hThread); @@ -4282,7 +4282,7 @@ int os_script(char** argv, char** envp, const char* run_as_user, uint64_t timeou /* resume the primary thread now that the process is assigned to the job object */ if (ResumeThread(pi.hThread) == (DWORD)-1) { windows_errno(GetLastError()); - os_syslog(OS_LVL_INFO, "failed to resume thread for script, errno=%s(%d)", strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to resume thread for script, errno=%s(%d)", strerror(errno), errno); pid_unpublish(pid_slot, 0); TerminateProcess(pi.hProcess, 1); CloseHandle(pi.hThread); @@ -4309,7 +4309,7 @@ int os_script(char** argv, char** envp, const char* run_as_user, uint64_t timeou int64_t execution_time = stop - start; if (timed_out) { - os_syslog(OS_LVL_INFO, "script %s timeout after %" PRId64 " seconds", resolved_path, execution_time); + os_syslog(OS_LVL_ERROR, "script %s timeout after %" PRId64 " seconds", resolved_path, execution_time); return -1; } @@ -4321,16 +4321,16 @@ int os_script(char** argv, char** envp, const char* run_as_user, uint64_t timeou if (exit_code == 0) os_syslog(OS_LVL_INFO, "script %s terminated in %" PRId64 " seconds with success", resolved_path, execution_time); else - os_syslog(OS_LVL_INFO, "script %s terminated in %" PRId64 " seconds with exit code %d", resolved_path, execution_time, exit_code); + os_syslog(OS_LVL_ERROR, "script %s terminated in %" PRId64 " seconds with exit code %d", resolved_path, execution_time, exit_code); return exit_code; } else if (WIFSIGNALED(status)) { /* child died from a signal */ int sig = WTERMSIG(status); - os_syslog(OS_LVL_INFO, "script %s terminated in %" PRId64 " seconds with signal %s(%d)", resolved_path, execution_time, os_signal_name(sig), sig); + os_syslog(OS_LVL_ERROR, "script %s terminated in %" PRId64 " seconds with signal %s(%d)", resolved_path, execution_time, os_signal_name(sig), sig); return 128 + sig; } else { /* in Windows it can happen */ - os_syslog(OS_LVL_INFO, "script %s terminated in %" PRId64 " seconds for unknown reason, status=0x%08x", resolved_path, execution_time, (unsigned)status); + os_syslog(OS_LVL_ERROR, "script %s terminated in %" PRId64 " seconds for unknown reason, status=0x%08x", resolved_path, execution_time, (unsigned)status); return -1; } } diff --git a/os/unix.c b/os/unix.c index 9c4bcbf0..6ba1eee6 100644 --- a/os/unix.c +++ b/os/unix.c @@ -461,24 +461,24 @@ static int verify_shebang_interpreter(int fd, const char* script_path) bytes_read = pread(fd, shebang, sizeof(shebang) - 1, 0); /* reserve space for the terminating 0 */ if (bytes_read < 0) { - os_syslog(OS_LVL_INFO, "failed to read script shebang, path=%s, errno=%s(%d)", script_path, strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to read script shebang, path=%s, errno=%s(%d)", script_path, strerror(errno), errno); return -1; } if (bytes_read < 4) { - os_syslog(OS_LVL_INFO, "script %s is too small or missing a shebang", script_path); + os_syslog(OS_LVL_ERROR, "script %s is too small or missing a shebang", script_path); return -1; } shebang[bytes_read] = 0; /* check for shebang */ if (shebang[0] != '#' || shebang[1] != '!') { - os_syslog(OS_LVL_INFO, "script %s is missing shebang (#!)", script_path); + os_syslog(OS_LVL_ERROR, "script %s is missing shebang (#!)", script_path); return -1; } char* end_of_line = strchr(shebang, '\n'); if (!end_of_line || end_of_line - shebang > 128) { - os_syslog(OS_LVL_INFO, "script %s has invalid or overlong shebang (#!), exceeds 126 characters", script_path); + os_syslog(OS_LVL_ERROR, "script %s has invalid or overlong shebang (#!), exceeds 126 characters", script_path); return -1; } *end_of_line = 0; @@ -489,7 +489,7 @@ static int verify_shebang_interpreter(int fd, const char* script_path) ++interpreter; if (*interpreter == 0) { - os_syslog(OS_LVL_INFO, "script %s has empty shebang", script_path); + os_syslog(OS_LVL_ERROR, "script %s has empty shebang", script_path); return -1; } @@ -510,49 +510,49 @@ static int verify_shebang_interpreter(int fd, const char* script_path) } if (!found) { - os_syslog(OS_LVL_INFO, "script %s uses disallowed interpreter %s", script_path, interpreter); + os_syslog(OS_LVL_ERROR, "script %s uses disallowed interpreter %s", script_path, interpreter); return -1; } /* verify interpreter exists and is safe */ if (stat(interpreter, &st) != 0) { - os_syslog(OS_LVL_INFO, "interpreter %s does not exist, errno=%s(%d)", interpreter, strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "interpreter %s does not exist, errno=%s(%d)", interpreter, strerror(errno), errno); return -1; } /* interpreter must be a regular file */ if (!S_ISREG(st.st_mode)) { - os_syslog(OS_LVL_INFO, "interpreter %s must be a regular file", interpreter); + os_syslog(OS_LVL_ERROR, "interpreter %s must be a regular file", interpreter); return -1; } /* interpreter must be owned by root */ if (st.st_uid != 0) { - os_syslog(OS_LVL_INFO, "interpreter %s not owned by root", interpreter); + os_syslog(OS_LVL_ERROR, "interpreter %s not owned by root", interpreter); return -1; } /* interpreter must be not world-writable */ if (st.st_mode & S_IWOTH) { - os_syslog(OS_LVL_INFO, "interpreter %s is world-writable", interpreter); + os_syslog(OS_LVL_ERROR, "interpreter %s is world-writable", interpreter); return -1; } /* interpreter must be not group-writable (unless group is root) */ if ((st.st_mode & S_IWGRP) && st.st_gid != 0) { - os_syslog(OS_LVL_INFO, "interpreter %s is group-writable by non-root group", interpreter); + os_syslog(OS_LVL_ERROR, "interpreter %s is group-writable by non-root group", interpreter); return -1; } /* interpreter must be executable */ if (!(st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) { - os_syslog(OS_LVL_INFO, "interpreter %s is not executable", interpreter); + os_syslog(OS_LVL_ERROR, "interpreter %s is not executable", interpreter); return -1; } /* interpreter must be not setuid / setgid */ if (st.st_mode & (S_ISUID | S_ISGID)) { - os_syslog(OS_LVL_INFO, "file %s has setuid/setgid bits set", interpreter); + os_syslog(OS_LVL_ERROR, "file %s has setuid/setgid bits set", interpreter); return -1; } @@ -595,7 +595,7 @@ static int verify_shebang_interpreter(int fd, const char* script_path) * * Returns an open file descriptor (>= 0) on success. The caller is * responsible for closing it. Returns -1 on any verification failure; - * the specific reason is emitted via os_syslog(OS_LVL_INFO, ...). + * the specific reason is emitted via os_syslog(OS_LVL_ERROR, ...). */ static int verify_executable(const char* exec_path, char* resolved_path, int is_script) { @@ -610,29 +610,29 @@ static int verify_executable(const char* exec_path, char* resolved_path, int is_ /* verify path is absolute */ if (exec_path[0] != '/') { - os_syslog(OS_LVL_INFO, "path %s must be absolute", exec_path); + os_syslog(OS_LVL_ERROR, "path %s must be absolute", exec_path); return -1; } /* resolve the path to prevent symlink attacks */ if (!realpath(exec_path, resolved_path)) { - os_syslog(OS_LVL_INFO, "failed to resolve %s, errno=%s(%d)", exec_path, strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to resolve %s, errno=%s(%d)", exec_path, strerror(errno), errno); return -1; } char* last_slash = strrchr(resolved_path, '/'); if (last_slash == 0) { - os_syslog(OS_LVL_INFO, "relative execution of %s not allowed", resolved_path); + os_syslog(OS_LVL_ERROR, "relative execution of %s not allowed", resolved_path); return -1; } if (last_slash == resolved_path) { - os_syslog(OS_LVL_INFO, "root dir execution of %s not allowed", resolved_path); + os_syslog(OS_LVL_ERROR, "root dir execution of %s not allowed", resolved_path); return -1; } const char* exec_name = last_slash + 1; if (exec_name[0] == 0) { - os_syslog(OS_LVL_INFO, "no executable name in %s", exec_path); + os_syslog(OS_LVL_ERROR, "no executable name in %s", exec_path); return -1; } @@ -643,33 +643,33 @@ static int verify_executable(const char* exec_path, char* resolved_path, int is_ int dir_fd = open(dir_path, O_PATH | O_DIRECTORY | O_NOFOLLOW | O_CLOEXEC); if (dir_fd < 0) { - os_syslog(OS_LVL_INFO, "failed to open directory %s, errno=%s(%d)", dir_path, strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to open directory %s, errno=%s(%d)", dir_path, strerror(errno), errno); return -1; } if (fstat(dir_fd, &st) != 0) { - os_syslog(OS_LVL_INFO, "failed to stat directory %s, errno=%s(%d)", dir_path, strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to stat directory %s, errno=%s(%d)", dir_path, strerror(errno), errno); close(dir_fd); return -1; } /* directory must be owned by root or the daemon's real user */ if (st.st_uid != process_uid && st.st_uid != process_euid && st.st_uid != 0) { - os_syslog(OS_LVL_INFO, "directory %s owner must match the daemon owner or be root", dir_path); + os_syslog(OS_LVL_ERROR, "directory %s owner must match the daemon owner or be root", dir_path); close(dir_fd); return -1; } /* directory must be not group-writable unless group matches daemon */ if ((st.st_mode & S_IWGRP) && st.st_gid != process_gid && st.st_gid != process_egid && st.st_gid != 0) { - os_syslog(OS_LVL_INFO, "directory %s must be not group-writable unless group matches daemon owner or root", dir_path); + os_syslog(OS_LVL_ERROR, "directory %s must be not group-writable unless group matches daemon owner or root", dir_path); close(dir_fd); return -1; } /* directory must be not world-writable */ if (st.st_mode & S_IWOTH) { - os_syslog(OS_LVL_INFO, "directory %s must be not world-writable", dir_path); + os_syslog(OS_LVL_ERROR, "directory %s must be not world-writable", dir_path); close(dir_fd); return -1; } @@ -689,7 +689,7 @@ static int verify_executable(const char* exec_path, char* resolved_path, int is_ int fd = openat(dir_fd, exec_name, flags); if (fd < 0) { - os_syslog(OS_LVL_INFO, "failed to open %s, errno=%s(%d)", resolved_path, strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to open %s, errno=%s(%d)", resolved_path, strerror(errno), errno); close(dir_fd); return -1; } @@ -698,14 +698,14 @@ static int verify_executable(const char* exec_path, char* resolved_path, int is_ /* get the file handle (TOCTOU Protection) */ if (fstat(fd, &st) == -1) { - os_syslog(OS_LVL_INFO, "failed to stat %s, errno=%s(%d)", resolved_path, strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to stat %s, errno=%s(%d)", resolved_path, strerror(errno), errno); close(fd); return -1; } /* ensure it's a regular file */ if (!S_ISREG(st.st_mode)) { - os_syslog(OS_LVL_INFO, "file %s is not a regular file", resolved_path); + os_syslog(OS_LVL_ERROR, "file %s is not a regular file", resolved_path); close(fd); return -1; } @@ -714,7 +714,7 @@ static int verify_executable(const char* exec_path, char* resolved_path, int is_ if (!is_script) { char magic[2]; if (read(fd, magic, 2) == 2 && magic[0] == '#' && magic[1] == '!') { - os_syslog(OS_LVL_INFO, "file %s is a script, which is not supported", resolved_path); + os_syslog(OS_LVL_ERROR, "file %s is a script, which is not supported", resolved_path); close(fd); return -1; } @@ -725,35 +725,35 @@ static int verify_executable(const char* exec_path, char* resolved_path, int is_ /* ensure it has execute permissions */ if (!(st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) { - os_syslog(OS_LVL_INFO, "file %s is not an executable", resolved_path); + os_syslog(OS_LVL_ERROR, "file %s is not an executable", resolved_path); close(fd); return -1; } /* must be owned by root or the daemon's real user */ if (st.st_uid != process_uid && st.st_uid != process_euid && st.st_uid != 0) { - os_syslog(OS_LVL_INFO, "file %s owner must match the daemon owner or be root", resolved_path); + os_syslog(OS_LVL_ERROR, "file %s owner must match the daemon owner or be root", resolved_path); close(fd); return -1; } /* must be not group-writable unless group matches daemon */ if ((st.st_mode & S_IWGRP) && st.st_gid != process_gid && st.st_gid != process_egid && st.st_gid != 0) { - os_syslog(OS_LVL_INFO, "file %s must be not group-writable unless group matches daemon owner or root", resolved_path); + os_syslog(OS_LVL_ERROR, "file %s must be not group-writable unless group matches daemon owner or root", resolved_path); close(fd); return -1; } /* must be not world-writable */ if (st.st_mode & S_IWOTH) { - os_syslog(OS_LVL_INFO, "file %s must be not world-writable", resolved_path); + os_syslog(OS_LVL_ERROR, "file %s must be not world-writable", resolved_path); close(fd); return -1; } /* must be not setuid / setgid */ if (st.st_mode & (S_ISUID | S_ISGID)) { - os_syslog(OS_LVL_INFO, "file %s has setuid/setgid bits set", resolved_path); + os_syslog(OS_LVL_ERROR, "file %s has setuid/setgid bits set", resolved_path); close(fd); return -1; } @@ -765,13 +765,13 @@ int os_validate_exec_input(const char* str) { /* reject paths trying to go up levels */ if (strstr(str, "..") != 0) { - os_syslog(OS_LVL_INFO, "invalid argument %s for execution", str); + os_syslog(OS_LVL_ERROR, "invalid argument %s for execution", str); return -1; } /* reject inputs starting with '-' to prevent Flag Injection */ if (str[0] == '-') { - os_syslog(OS_LVL_INFO, "invalid argument %s for execution", str); + os_syslog(OS_LVL_ERROR, "invalid argument %s for execution", str); return -1; } @@ -810,7 +810,7 @@ static int os_user_lookup(const char* run_as_user, struct os_user* user) char pw_buf[PASSWD_MAX]; int err = getpwnam_r(run_as_user, &pw, pw_buf, sizeof(pw_buf), &pw_res); if (err != 0 || !pw_res) { - os_syslog(OS_LVL_INFO, "failed to get user info for %s, errno=%s(%d)", run_as_user, strerror(err ? err : ENOENT), err ? err : ENOENT); + os_syslog(OS_LVL_ERROR, "failed to get user info for %s, errno=%s(%d)", run_as_user, strerror(err ? err : ENOENT), err ? err : ENOENT); return -1; } @@ -822,7 +822,7 @@ static int os_user_lookup(const char* run_as_user, struct os_user* user) int ngroups = sizeof(groups_buf) / sizeof(groups_buf[0]); if (getgrouplist(pw.pw_name, (os_group_t)pw.pw_gid, groups_buf, &ngroups) < 0) { - os_syslog(OS_LVL_INFO, "failed to get group list for %s, exceeds maximum of %d groups", run_as_user, GROUPS_MAX); + os_syslog(OS_LVL_ERROR, "failed to get group list for %s, exceeds maximum of %d groups", run_as_user, GROUPS_MAX); return -1; } @@ -1198,7 +1198,7 @@ int os_script(char** argv, char** envp, const char* run_as_user, uint64_t timeou pid = fork(); if (pid < 0) { - os_syslog(OS_LVL_INFO, "failed to fork script=%s, errno=%s(%d)", resolved_path, strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to fork script=%s, errno=%s(%d)", resolved_path, strerror(errno), errno); pid_unpublish(pid_slot, 0); close(fd); return -1; @@ -1323,7 +1323,7 @@ int os_script(char** argv, char** envp, const char* run_as_user, uint64_t timeou } if (ret == -1) { - os_syslog(OS_LVL_INFO, "failed to wait for script, path=%s, errno=%s(%d)", resolved_path, strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to wait for script, path=%s, errno=%s(%d)", resolved_path, strerror(errno), errno); return -1; } @@ -1331,7 +1331,7 @@ int os_script(char** argv, char** envp, const char* run_as_user, uint64_t timeou int64_t execution_time = stop - start; if (timed_out) { - os_syslog(OS_LVL_INFO, "script %s timeout after %" PRId64 " seconds", resolved_path, execution_time); + os_syslog(OS_LVL_ERROR, "script %s timeout after %" PRId64 " seconds", resolved_path, execution_time); return 128 + SIGALRM; } @@ -1344,17 +1344,17 @@ int os_script(char** argv, char** envp, const char* run_as_user, uint64_t timeou if (exit_code == 0) os_syslog(OS_LVL_INFO, "script %s terminated in %" PRId64 " seconds with success", resolved_path, execution_time); else - os_syslog(OS_LVL_INFO, "script %s terminated in %" PRId64 " seconds with exit code %d", resolved_path, execution_time, exit_code); + os_syslog(OS_LVL_ERROR, "script %s terminated in %" PRId64 " seconds with exit code %d", resolved_path, execution_time, exit_code); return exit_code; } else if (WIFSIGNALED(status)) { /* child died from a signal */ int sig = WTERMSIG(status); - os_syslog(OS_LVL_INFO, "script %s terminated in %" PRId64 " seconds with signal %s(%d)", resolved_path, execution_time, os_signal_name(sig), sig); + os_syslog(OS_LVL_ERROR, "script %s terminated in %" PRId64 " seconds with signal %s(%d)", resolved_path, execution_time, os_signal_name(sig), sig); return 128 + sig; } else { /* in Linux it should never happen */ - os_syslog(OS_LVL_INFO, "script %s terminated in %" PRId64 " seconds for unknown reason, status=%d", resolved_path, execution_time, status); + os_syslog(OS_LVL_ERROR, "script %s terminated in %" PRId64 " seconds for unknown reason, status=%d", resolved_path, execution_time, status); return -1; } } @@ -1373,14 +1373,14 @@ int os_command(const char* command, const char* run_as_user, const char* stdin_t /* create pipe only if we have text to send */ if (stdin_text != 0) { if (pipe_cloexec(pipe_fds) < 0) { - os_syslog(OS_LVL_INFO, "failed to create input pipe, errno=%s(%d)", strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to create input pipe, errno=%s(%d)", strerror(errno), errno); return -1; } int flags = fcntl(pipe_fds[1], F_GETFL); if (flags < 0 || fcntl(pipe_fds[1], F_SETFL, flags | O_NONBLOCK) < 0) { - os_syslog(OS_LVL_INFO, "failed to make input pipe non-blocking, errno=%s(%d)", strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to make input pipe non-blocking, errno=%s(%d)", strerror(errno), errno); close(pipe_fds[0]); close(pipe_fds[1]); return -1; @@ -1411,7 +1411,7 @@ int os_command(const char* command, const char* run_as_user, const char* stdin_t pid = fork(); if (pid < 0) { - os_syslog(OS_LVL_INFO, "failed to fork command=%s, errno=%s(%d)", command, strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to fork command=%s, errno=%s(%d)", command, strerror(errno), errno); pid_unpublish(pid_slot, 0); if (pipe_fds[0] != -1) { close(pipe_fds[0]); @@ -1509,7 +1509,7 @@ int os_command(const char* command, const char* run_as_user, const char* stdin_t pid_unpublish(pid_slot, pid); if (input_error != 0) - os_syslog(OS_LVL_INFO, "failed to write stdin to command %s, errno=%s(%d)", command, strerror(input_error), input_error); + os_syslog(OS_LVL_ERROR, "failed to write stdin to command %s, errno=%s(%d)", command, strerror(input_error), input_error); if (ret != -1) { do { @@ -1518,7 +1518,7 @@ int os_command(const char* command, const char* run_as_user, const char* stdin_t } if (ret == -1) { - os_syslog(OS_LVL_INFO, "failed to wait for command, command=%s, errno=%s(%d)", command, strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to wait for command, command=%s, errno=%s(%d)", command, strerror(errno), errno); return -1; } @@ -1526,7 +1526,7 @@ int os_command(const char* command, const char* run_as_user, const char* stdin_t int64_t execution_time = stop - start; if (timed_out) { - os_syslog(OS_LVL_INFO, "command %s timeout after %" PRId64 " seconds", command, execution_time); + os_syslog(OS_LVL_ERROR, "command %s timeout after %" PRId64 " seconds", command, execution_time); return 128 + SIGALRM; } @@ -1538,16 +1538,16 @@ int os_command(const char* command, const char* run_as_user, const char* stdin_t if (exit_code == 0) os_syslog(OS_LVL_INFO, "command %s terminated in %" PRId64 " seconds with success", command, execution_time); else - os_syslog(OS_LVL_INFO, "command %s terminated in %" PRId64 " seconds with exit code %d", command, execution_time, exit_code); + os_syslog(OS_LVL_ERROR, "command %s terminated in %" PRId64 " seconds with exit code %d", command, execution_time, exit_code); return exit_code; } else if (WIFSIGNALED(status)) { /* child died from a signal */ int sig = WTERMSIG(status); - os_syslog(OS_LVL_INFO, "command %s terminated in %" PRId64 " seconds with signal %s(%d)", command, execution_time, os_signal_name(sig), sig); + os_syslog(OS_LVL_ERROR, "command %s terminated in %" PRId64 " seconds with signal %s(%d)", command, execution_time, os_signal_name(sig), sig); return 128 + sig; } else { /* in Linux it should never happen */ - os_syslog(OS_LVL_INFO, "command %s terminated in %" PRId64 " seconds for unknown reason, status=%d", command, execution_time, status); + os_syslog(OS_LVL_ERROR, "command %s terminated in %" PRId64 " seconds for unknown reason, status=%d", command, execution_time, status); return -1; } } @@ -1584,7 +1584,7 @@ pid_t os_spawn(char** argv, int* stdout_read_fd, int* stderr_read_fd, const char if (has_out) { if (pipe_cloexec(out_pipe) < 0) { - os_syslog(OS_LVL_INFO, "failed to open output pipe, errno=%s(%d)", strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to open output pipe, errno=%s(%d)", strerror(errno), errno); close(fd); return -1; } @@ -1592,7 +1592,7 @@ pid_t os_spawn(char** argv, int* stdout_read_fd, int* stderr_read_fd, const char if (has_err) { if (pipe_cloexec(err_pipe) < 0) { - os_syslog(OS_LVL_INFO, "failed to open error pipe, errno=%s(%d)", strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to open error pipe, errno=%s(%d)", strerror(errno), errno); if (has_out) { close(out_pipe[0]); close(out_pipe[1]); @@ -1634,7 +1634,7 @@ pid_t os_spawn(char** argv, int* stdout_read_fd, int* stderr_read_fd, const char pid = fork(); if (pid < 0) { - os_syslog(OS_LVL_INFO, "failed to fork path=%s, errno=%s(%d)", resolved_path, strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to fork path=%s, errno=%s(%d)", resolved_path, strerror(errno), errno); pid_unpublish(pid_slot, 0); if (has_out) { close(out_pipe[0]); @@ -1819,7 +1819,7 @@ pid_t os_wait(pid_t pid, int* status, pid_t* pid_slot) } while (ret == -1 && errno == EINTR); if (ret == -1) { - os_syslog(OS_LVL_INFO, "failed to wait, errno=%s(%d)", strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to wait, errno=%s(%d)", strerror(errno), errno); } return ret; @@ -1996,7 +1996,7 @@ int os_privileges_drop(void) /* find the unprivileged user "nobody" */ struct passwd* pw = getpwnam("nobody"); if (!pw) { - os_syslog(OS_LVL_INFO, "unprivileged user 'nobody' not found"); + os_syslog(OS_LVL_ERROR, "unprivileged user 'nobody' not found"); return -1; } @@ -2010,7 +2010,7 @@ int os_privileges_drop(void) */ privileged_group_count = getgroups(0, 0); if (privileged_group_count < 0) { - os_syslog(OS_LVL_INFO, "failed to get supplementary group count, errno=%s(%d)", strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to get supplementary group count, errno=%s(%d)", strerror(errno), errno); return -1; } @@ -2022,12 +2022,12 @@ int os_privileges_drop(void) } if (getgroups(privileged_group_count, privileged_groups) != privileged_group_count) { - os_syslog(OS_LVL_INFO, "failed to get supplementary groups, errno=%s(%d)", strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to get supplementary groups, errno=%s(%d)", strerror(errno), errno); return -1; } if (setgroups(0, 0) != 0) { - os_syslog(OS_LVL_INFO, "failed to release supplementary group privileges, errno=%s(%d)", strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to release supplementary group privileges, errno=%s(%d)", strerror(errno), errno); return -1; } @@ -2035,14 +2035,14 @@ int os_privileges_drop(void) } if (setegid(unpriv_gid) != 0) { - os_syslog(OS_LVL_INFO, "failed to release group privileges, errno=%s(%d)", strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to release group privileges, errno=%s(%d)", strerror(errno), errno); return -1; } gid_dropped = 1; if (seteuid(unpriv_uid) != 0) { - os_syslog(OS_LVL_INFO, "failed to release privileges, errno=%s(%d)", strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to release privileges, errno=%s(%d)", strerror(errno), errno); return -1; } @@ -2072,7 +2072,7 @@ void os_privileges_acquire(void) if (errno == EPERM) { os_syslog(OS_LVL_INFO, "permission denied to acquire privileges, continuing with active privileges"); } else { - os_syslog(OS_LVL_INFO, "failed to acquire privileges, errno=%s(%d)", strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to acquire privileges, errno=%s(%d)", strerror(errno), errno); os_abort(); } } @@ -2083,7 +2083,7 @@ void os_privileges_acquire(void) if (errno == EPERM) { os_syslog(OS_LVL_INFO, "permission denied to acquire group privileges, continuing with active privileges"); } else { - os_syslog(OS_LVL_INFO, "failed to acquire group privileges, errno=%s(%d)", strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to acquire group privileges, errno=%s(%d)", strerror(errno), errno); os_abort(); } } @@ -2094,7 +2094,7 @@ void os_privileges_acquire(void) if (errno == EPERM) { os_syslog(OS_LVL_INFO, "permission denied to acquire supplementary group privileges, continuing with active privileges"); } else { - os_syslog(OS_LVL_INFO, "failed to acquire supplementary group privileges, errno=%s(%d)", strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to acquire supplementary group privileges, errno=%s(%d)", strerror(errno), errno); os_abort(); } } @@ -2105,7 +2105,7 @@ void os_privileges_acquire(void) if (errno == EPERM) { os_syslog(OS_LVL_INFO, "permission denied to acquire privileges, continuing with active privileges"); } else { - os_syslog(OS_LVL_INFO, "failed to acquire privileges, errno=%s(%d)", strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to acquire privileges, errno=%s(%d)", strerror(errno), errno); os_abort(); } } @@ -2116,7 +2116,7 @@ void os_privileges_acquire(void) if (errno == EPERM) { os_syslog(OS_LVL_INFO, "permission denied to acquire group privileges, continuing with active privileges"); } else { - os_syslog(OS_LVL_INFO, "failed to acquire group privileges, errno=%s(%d)", strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to acquire group privileges, errno=%s(%d)", strerror(errno), errno); os_abort(); } } @@ -2127,7 +2127,7 @@ void os_privileges_acquire(void) if (errno == EPERM) { os_syslog(OS_LVL_INFO, "permission denied to acquire supplementary group privileges, continuing with active privileges"); } else { - os_syslog(OS_LVL_INFO, "failed to acquire supplementary group privileges, errno=%s(%d)", strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to acquire supplementary group privileges, errno=%s(%d)", strerror(errno), errno); os_abort(); } } @@ -2147,7 +2147,7 @@ void os_privileges_release(void) if (errno == EPERM) { os_syslog(OS_LVL_INFO, "permission denied to release supplementary group privileges, continuing with active privileges"); } else { - os_syslog(OS_LVL_INFO, "failed to release supplementary group privileges, errno=%s(%d)", strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to release supplementary group privileges, errno=%s(%d)", strerror(errno), errno); os_abort(); } } @@ -2158,7 +2158,7 @@ void os_privileges_release(void) if (errno == EPERM) { os_syslog(OS_LVL_INFO, "permission denied to release group privileges, continuing with active privileges"); } else { - os_syslog(OS_LVL_INFO, "failed to release group privileges, errno=%s(%d)", strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to release group privileges, errno=%s(%d)", strerror(errno), errno); os_abort(); } } @@ -2170,7 +2170,7 @@ void os_privileges_release(void) if (errno == EPERM) { os_syslog(OS_LVL_INFO, "permission denied to release privileges, continuing with active privileges"); } else { - os_syslog(OS_LVL_INFO, "failed to release privileges, errno=%s(%d)", strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to release privileges, errno=%s(%d)", strerror(errno), errno); os_abort(); } } @@ -2181,7 +2181,7 @@ void os_privileges_release(void) if (errno == EPERM) { os_syslog(OS_LVL_INFO, "permission denied to release supplementary group privileges, continuing with active privileges"); } else { - os_syslog(OS_LVL_INFO, "failed to release supplementary group privileges, errno=%s(%d)", strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to release supplementary group privileges, errno=%s(%d)", strerror(errno), errno); os_abort(); } } @@ -2192,7 +2192,7 @@ void os_privileges_release(void) if (errno == EPERM) { os_syslog(OS_LVL_INFO, "permission denied to release group privileges, continuing with active privileges"); } else { - os_syslog(OS_LVL_INFO, "failed to release group privileges, errno=%s(%d)", strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to release group privileges, errno=%s(%d)", strerror(errno), errno); os_abort(); } } @@ -2204,7 +2204,7 @@ void os_privileges_release(void) if (errno == EPERM) { os_syslog(OS_LVL_INFO, "permission denied to release privileges, continuing with active privileges"); } else { - os_syslog(OS_LVL_INFO, "failed to release privileges, errno=%s(%d)", strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to release privileges, errno=%s(%d)", strerror(errno), errno); os_abort(); } } From 029c3940fe356324af5bd1ef0181a4f2a7893c00 Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Tue, 10 Nov 2026 22:49:46 +0100 Subject: [PATCH 11/17] Avoid creating a redundant Windows Job Object when already running inside an existing job --- os/mingw.c | 40 ++++++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 14 deletions(-) diff --git a/os/mingw.c b/os/mingw.c index edbf537a..4025d3ef 100644 --- a/os/mingw.c +++ b/os/mingw.c @@ -4661,21 +4661,33 @@ void os_init(unsigned opt) os_exit(); } - /* initialize job object to terminate child processes if daemon dies */ - os_job_handle = CreateJobObjectW(0, 0); - if (os_job_handle != 0) { - JOBOBJECT_EXTENDED_LIMIT_INFORMATION info; - ZeroMemory(&info, sizeof(info)); - info.BasicLimitInformation.LimitFlags = JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE; - if (!SetInformationJobObject(os_job_handle, JobObjectExtendedLimitInformation, &info, sizeof(info))) { - windows_errno(GetLastError()); - os_syslog(OS_LVL_WARNING, "failed to configure job object, errno=%s(%d)", strerror(errno), errno); - CloseHandle(os_job_handle); - os_job_handle = 0; - } + /* + * Skip creating a separate job object if already running inside one + * (e.g. spawned by snapraid-daemon, a service, or Task Scheduler). + * Child processes automatically inherit the parent's job object, and + * attempting to assign them to a second independent job object would + * fail with ERROR_ACCESS_DENIED. + */ + BOOL in_job = 0; + if (IsProcessInJob(GetCurrentProcess(), 0, &in_job) && in_job) { + os_job_handle = 0; } else { - windows_errno(GetLastError()); - os_syslog(OS_LVL_WARNING, "failed to create job object, errno=%s(%d)", strerror(errno), errno); + /* initialize job object to terminate child processes if daemon dies */ + os_job_handle = CreateJobObjectW(0, 0); + if (os_job_handle != 0) { + JOBOBJECT_EXTENDED_LIMIT_INFORMATION info; + ZeroMemory(&info, sizeof(info)); + info.BasicLimitInformation.LimitFlags = JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE; + if (!SetInformationJobObject(os_job_handle, JobObjectExtendedLimitInformation, &info, sizeof(info))) { + windows_errno(GetLastError()); + os_syslog(OS_LVL_WARNING, "failed to configure job object, errno=%s(%d)", strerror(errno), errno); + CloseHandle(os_job_handle); + os_job_handle = 0; + } + } else { + windows_errno(GetLastError()); + os_syslog(OS_LVL_WARNING, "failed to create job object, errno=%s(%d)", strerror(errno), errno); + } } /* check for Wine presence */ From 83f3bee5d0df72f42d9ca76cc475fb94bcfea676 Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Tue, 10 Nov 2026 23:18:42 +0100 Subject: [PATCH 12/17] Fix typos in Windows error messages --- os/mingw.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/os/mingw.c b/os/mingw.c index 4025d3ef..955fbfd5 100644 --- a/os/mingw.c +++ b/os/mingw.c @@ -3213,7 +3213,7 @@ pid_t os_spawn(char** argv, int* stdout_read_int, int* stderr_read_int, const ch /* ensure the reading handle to the pipe is not inherited */ if (!SetHandleInformation(stdout_read_handle, HANDLE_FLAG_INHERIT, 0)) { windows_errno(GetLastError()); - os_syslog(OS_LVL_ERROR, "failed to handle information for spawn, errno=%s(%d)", strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to set handle information for spawn, errno=%s(%d)", strerror(errno), errno); CloseHandle(stdout_write_handle); CloseHandle(stdout_read_handle); return -1; @@ -3244,7 +3244,7 @@ pid_t os_spawn(char** argv, int* stdout_read_int, int* stderr_read_int, const ch /* ensure the reading handle to the pipe is not inherited */ if (!SetHandleInformation(stderr_read_handle, HANDLE_FLAG_INHERIT, 0)) { windows_errno(GetLastError()); - os_syslog(OS_LVL_ERROR, "failed to handle information for spawn, errno=%s(%d)", strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to set handle information for spawn, errno=%s(%d)", strerror(errno), errno); CloseHandle(stderr_write_handle); CloseHandle(stderr_read_handle); if (has_out) { @@ -3302,7 +3302,7 @@ pid_t os_spawn(char** argv, int* stdout_read_int, int* stderr_read_int, const ch } pos = argcat(cmd_buffer, COMMAND_LINE_MAX, pos, conv); if (pos < 0) { - os_syslog(OS_LVL_ERROR, "command to long for spawn"); + os_syslog(OS_LVL_ERROR, "command too long for spawn"); CloseHandle(nul_handle); if (has_out) { CloseHandle(stdout_write_handle); @@ -3703,7 +3703,7 @@ int os_command(const char* command, const char* run_as_user, const char* stdin_t /* ensure the parent's write end is NOT inherited */ if (!SetHandleInformation(stdin_write_handle, HANDLE_FLAG_INHERIT, 0)) { windows_errno(GetLastError()); - os_syslog(OS_LVL_ERROR, "failed to handle information for spawn, errno=%s(%d)", strerror(errno), errno); + os_syslog(OS_LVL_ERROR, "failed to set handle information for command, errno=%s(%d)", strerror(errno), errno); CloseHandle(stdin_read_handle); CloseHandle(stdin_write_handle); return -1; @@ -4122,7 +4122,7 @@ int os_script(char** argv, char** envp, const char* run_as_user, uint64_t timeou if (errno == EINVAL) os_syslog(OS_LVL_ERROR, "unsupported embedded double quote in script path"); else - os_syslog(OS_LVL_ERROR, "command to long for script"); + os_syslog(OS_LVL_ERROR, "command too long for script"); return -1; } for (int i = 1; argv[i]; ++i) { @@ -4133,13 +4133,13 @@ int os_script(char** argv, char** envp, const char* run_as_user, uint64_t timeou if (errno == EINVAL) os_syslog(OS_LVL_ERROR, "unsupported embedded double quote in script argument"); else - os_syslog(OS_LVL_ERROR, "command to long for script"); + os_syslog(OS_LVL_ERROR, "command too long for script"); return -1; } } pos = fixcat(cmd_buffer, COMMAND_LINE_MAX, pos, L" \""); if (pos < 0) { - os_syslog(OS_LVL_ERROR, "command to long for script"); + os_syslog(OS_LVL_ERROR, "command too long for script"); return -1; } cmd_buffer[pos] = 0; From 4e8ed5cdbd5ed7b42bd206636c49e8521d770111 Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Tue, 10 Nov 2026 23:21:15 +0100 Subject: [PATCH 13/17] Update HISTORY --- HISTORY | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/HISTORY b/HISTORY index dd9a4005..88e2cfa3 100644 --- a/HISTORY +++ b/HISTORY @@ -1,6 +1,14 @@ SnapRAID HISTORY ================ +15.2 2026/11 +============ + * Avoid creating a redundant Windows Job Object when SnapRAID is + already running inside an existing job (such as under SnapRAID + Daemon). This prevents potential execution failures of child + processes (such as smartctl) on systems where nested job objects are + not supported. + 15.1 2026/10 ============ * Add synthetic device IDs on Linux, allowing SnapRAID Daemon to From 487305a760978e79e92c55426eb4999ae44f9ac0 Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Tue, 10 Nov 2026 23:40:25 +0100 Subject: [PATCH 14/17] Use ubuntu-26.04 build server --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d60345ab..f98b681f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,16 +20,16 @@ jobs: - run: make all -j$(sysctl -n hw.ncpu) - run: make dist check build-linux: - runs-on: ubuntu-24.04 + runs-on: ubuntu-26.04 steps: - uses: actions/checkout@v5 - run: | sudo apt-get update sudo apt-get install -y \ - linux-modules-extra-$(uname -r) \ + linux-main-modules-zfs-$(uname -r) \ zfsutils-linux sudo modprobe zfs - zfs version + sudo zfs version - run: autoreconf -i - run: ./configure --enable-warning-as-error - run: make all -j$(nproc) From 47e439ddffa41d3f998174d7a5bc416a290ee3cc Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Wed, 11 Nov 2026 21:58:10 +0100 Subject: [PATCH 15/17] Skip devices without a backing block device (network/virtual filesystems) in device operations --- HISTORY | 5 +++++ cmdline/device.c | 7 +++++-- cmdline/unixapp.c | 13 +++++++++++++ 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/HISTORY b/HISTORY index 88e2cfa3..4e718e0e 100644 --- a/HISTORY +++ b/HISTORY @@ -8,6 +8,11 @@ SnapRAID HISTORY Daemon). This prevents potential execution failures of child processes (such as smartctl) on systems where nested job objects are not supported. + * Skip disks on network or virtual filesystems (such as NFS, CIFS, + FUSE, or tmpfs) in device operations like 'up', 'down', 'smart', + and 'probe' on Linux, instead of failing with an error. If no + physical device remains, the operation completes successfully with + an informational message. 15.1 2026/10 ============ diff --git a/cmdline/device.c b/cmdline/device.c index 759eb649..2d494281 100644 --- a/cmdline/device.c +++ b/cmdline/device.c @@ -1237,13 +1237,16 @@ int state_device_force(struct snapraid_state* state, int operation, tommy_list* } } - /* distinguish skipped devices from unsupported device queries */ if (ret == 0 && tommy_list_empty(&low)) { - ret = -1; if (tommy_list_empty(&high)) { + ret = -1; log_error(ESOFT, "No accessible devices selected for this operation.\n"); goto bail; } + + /* not an error, the selected disks are on network or virtual filesystems without a block device to manage */ + msg_info("No physical devices found for the selected disks, nothing to do.\n"); + goto bail; } if (ret != 0) { diff --git a/cmdline/unixapp.c b/cmdline/unixapp.c index 8609ba03..0e23e0de 100644 --- a/cmdline/unixapp.c +++ b/cmdline/unixapp.c @@ -4375,6 +4375,16 @@ int devquery(tommy_list* high, tommy_list* low) struct dev_struct* dev = j->data; uint64_t access_stat; + /* + * Major 0 is an anonymous superblock (NFS, CIFS, FUSE, tmpfs, overlay, ...) + * not backed by a block device. Btrfs/Bcachefs/ZFS are already dereferenced + * to their member devices, so what remains has no physical disk to manage. + */ + if (major(dev->device) == 0) { + log_tag("device:%s:skip:%u:%u: no block device\n", esc_tag(devinfo->name), major(dev->device), minor(dev->device)); + continue; + } + /* retrieve access stat for the high level device */ if (devstat(dev->device, &access_stat) == 0) { /* cumulate access stat in the first split */ @@ -4420,6 +4430,9 @@ int devquery(tommy_list* high, tommy_list* low) #else (void)high; (void)low; + + /* device operations are unsupported in this platform */ + failed = 1; #endif return failed ? -1 : degraded ? 1 : 0; From 8350e7bb0f84894961020b58870ea86e4e1a200a Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Mon, 16 Nov 2026 09:44:22 +0100 Subject: [PATCH 16/17] Update CHECKSUMS --- CHECKSUMS | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHECKSUMS b/CHECKSUMS index 80753f42..9f38dda3 100644 --- a/CHECKSUMS +++ b/CHECKSUMS @@ -233,6 +233,12 @@ fb2d6a9cf9c8ea30c6962f4a48764dc9012fe61d6e23f40a8d959dadea02278b snapraid-15.1. 64849f463986d0d80b948dbb07e9af6402bed230a9cf17dbd1110199aca56486 snapraid-15.1-windows-x64.zip f7be230f7849d89941a280dc8c2cc6e158844e0fe6f00adbb6aa9ac0f65322b8 snapraid-15.1-windows-x86.zip 4dbd01ab2582a74fab4d7ee8f9b11966d4188fba9eedcd31fcc0a5588cd0c702 snapraid-15.1-x86_64-1_am.txz +0740169f66c506c29846a5aef57d2b11ffe5c354c5bb0ba260f2b5f328f985c5 snapraid-15.2.tar.gz +208a5d99c94889e2357f0211d716bababcfb8289907167220563f734fb936e96 snapraid-15.2-1-x86_64.pkg.tar.zst +f1c37fa43beea8445858520a5cd514198d8c0c0ac5a5ab588adcd02e872ee681 snapraid-15.2-1.x86_64.rpm +882334e5102b418ace0753f9335a99783fc784e149429c29911247b56f04e438 snapraid-15.2-windows-x64.zip +942157645a532e2a280ca404625476c42591436f2292491b1faedb9d48efd07e snapraid-15.2-windows-x86.zip +7bb455cb77586dd2d90f6868c66dd9cdf6774aa89c099f1026a851407ac7adac snapraid-15.2-x86_64-1_am.txz 128b5b0f80a6a0911e77ed3b5d9d81529f5ea1d8fffbb5112e3af3467d80464a snapraid_14.0-1_amd64.deb b9c41ae2e8edbc413abd3172b7ed2da2cba7fa0e631d0f47fc1dafccf7c6e92c snapraid_14.1-1_amd64.deb e6456b926bb053d34645e31e5e3d8363e952c9869e873eb348abb1149598d331 snapraid_14.2-1_amd64.deb @@ -246,3 +252,4 @@ c0e00a25b9bce40ff74f5a55401c3bfedac1881fd99aaa90a692f5858d417f7d snapraid_14.8- 15f5fd9f639912c94daae9d75d3567b7a3fc0e18475880f972acd8d8e9e0992c snapraid_14.10-1_amd64.deb 845091e7eeb2495fc3899dc6e8fab2c3fe7a5945f345c767a7603dab90e2cb84 snapraid_15.0-1_amd64.deb 974cd45fc8f44d5642b49bd9b30e81aca2bcd7689877f9fa73d1e58d3f1b5bda snapraid_15.1-1_amd64.deb +9c78f158347cc0340ed5c9877724bb4f3b5e5fb48b43332ee7e0e7b6a63642d9 snapraid_15.2-1_amd64.deb From 855a062b810b0de4df66f6ebc0547b2a8ce9b6ce Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Mon, 23 Nov 2026 20:50:37 +0100 Subject: [PATCH 17/17] Clarify in Recovery that no changes must be made to the disk array, as they may make recovery impossible --- doc/snapraid-de.1 | 6 ++++-- doc/snapraid-de.d | 6 ++++-- doc/snapraid-de.txt | 6 ++++-- doc/snapraid-es.1 | 4 +++- doc/snapraid-es.d | 4 +++- doc/snapraid-es.txt | 4 +++- doc/snapraid-fr.1 | 6 ++++-- doc/snapraid-fr.d | 6 ++++-- doc/snapraid-fr.txt | 6 ++++-- doc/snapraid-it.1 | 4 +++- doc/snapraid-it.d | 4 +++- doc/snapraid-it.txt | 4 +++- doc/snapraid-ja.1 | 3 ++- doc/snapraid-ja.d | 3 ++- doc/snapraid-ja.txt | 3 ++- doc/snapraid-ko.1 | 3 ++- doc/snapraid-ko.d | 3 ++- doc/snapraid-ko.txt | 3 ++- doc/snapraid-pl.1 | 4 +++- doc/snapraid-pl.d | 4 +++- doc/snapraid-pl.txt | 4 +++- doc/snapraid-pt.1 | 6 ++++-- doc/snapraid-pt.d | 6 ++++-- doc/snapraid-pt.txt | 6 ++++-- doc/snapraid-ro.1 | 4 +++- doc/snapraid-ro.d | 4 +++- doc/snapraid-ro.txt | 4 +++- doc/snapraid-ru.1 | 4 +++- doc/snapraid-ru.d | 4 +++- doc/snapraid-ru.txt | 4 +++- doc/snapraid-sv.1 | 4 +++- doc/snapraid-sv.d | 4 +++- doc/snapraid-sv.txt | 4 +++- doc/snapraid-uk.1 | 6 ++++-- doc/snapraid-uk.d | 6 ++++-- doc/snapraid-uk.txt | 6 ++++-- doc/snapraid-zh.1 | 3 ++- doc/snapraid-zh.d | 3 ++- doc/snapraid-zh.txt | 3 ++- doc/snapraid.1 | 3 ++- doc/snapraid.d | 3 ++- doc/snapraid.txt | 3 ++- 42 files changed, 126 insertions(+), 54 deletions(-) diff --git a/doc/snapraid-de.1 b/doc/snapraid-de.1 index a64fdd51..0f8cf9bf 100644 --- a/doc/snapraid-de.1 +++ b/doc/snapraid-de.1 @@ -583,8 +583,10 @@ verloren! .PP KEINE PANIK! Sie werden in der Lage sein, sie wiederherzustellen! .PP -Das erste, was Sie tun müssen, ist, weitere Änderungen an Ihrem -Festplatten\-Array zu vermeiden. Deaktivieren Sie alle Remote\-Verbindungen +Bevor Sie irgendetwas anderes tun, vermeiden Sie jegliche Änderungen an Ihrem +Festplatten\-Array, da das Ändern oder Löschen von Daten auf den verbleibenden +Festplatten eine Wiederherstellung unmöglich machen kann. +Deaktivieren Sie alle Remote\-Verbindungen dazu und alle geplanten Prozesse, einschließlich geplanter SnapRAID\-nächtlicher \`sync\`\- oder \`scrub\`\-Läufe. .PP diff --git a/doc/snapraid-de.d b/doc/snapraid-de.d index 3371c773..eb8d2fcb 100644 --- a/doc/snapraid-de.d +++ b/doc/snapraid-de.d @@ -334,8 +334,10 @@ Erste Schritte (Getting Started) KEINE PANIK! Sie werden in der Lage sein, sie wiederherzustellen! - Das erste, was Sie tun müssen, ist, weitere Änderungen an Ihrem - Festplatten-Array zu vermeiden. Deaktivieren Sie alle Remote-Verbindungen + Bevor Sie irgendetwas anderes tun, vermeiden Sie jegliche Änderungen an Ihrem + Festplatten-Array, da das Ändern oder Löschen von Daten auf den verbleibenden + Festplatten eine Wiederherstellung unmöglich machen kann. + Deaktivieren Sie alle Remote-Verbindungen dazu und alle geplanten Prozesse, einschließlich geplanter SnapRAID-nächtlicher `sync`- oder `scrub`-Läufe. diff --git a/doc/snapraid-de.txt b/doc/snapraid-de.txt index 75776832..a202d85b 100644 --- a/doc/snapraid-de.txt +++ b/doc/snapraid-de.txt @@ -355,8 +355,10 @@ verloren! KEINE PANIK! Sie werden in der Lage sein, sie wiederherzustellen! -Das erste, was Sie tun müssen, ist, weitere Änderungen an Ihrem -Festplatten-Array zu vermeiden. Deaktivieren Sie alle Remote-Verbindungen +Bevor Sie irgendetwas anderes tun, vermeiden Sie jegliche Änderungen an Ihrem +Festplatten-Array, da das Ändern oder Löschen von Daten auf den verbleibenden +Festplatten eine Wiederherstellung unmöglich machen kann. +Deaktivieren Sie alle Remote-Verbindungen dazu und alle geplanten Prozesse, einschließlich geplanter SnapRAID-nächtlicher `sync`- oder `scrub`-Läufe. diff --git a/doc/snapraid-es.1 b/doc/snapraid-es.1 index 6d8294a0..ceb13886 100644 --- a/doc/snapraid-es.1 +++ b/doc/snapraid-es.1 @@ -570,7 +570,9 @@ Ha sucedido lo peor, ¡y ha perdido uno o más discos! .PP ¡NO ENTRE EN PÁNICO! ¡Podrá recuperarlos! .PP -Lo primero que debe hacer es evitar más cambios en su array de discos. +Antes de hacer cualquier otra cosa, evite realizar cualquier cambio en su +array de discos, ya que modificar o eliminar datos en los discos restantes +puede hacer imposible la recuperación. Deshabilite cualquier conexión remota a él y cualquier proceso programado, incluida cualquier sincronización o depuración nocturna programada de SnapRAID. diff --git a/doc/snapraid-es.d b/doc/snapraid-es.d index beb131fd..965ddc04 100644 --- a/doc/snapraid-es.d +++ b/doc/snapraid-es.d @@ -321,7 +321,9 @@ Primeros pasos (Getting Started) ¡NO ENTRE EN PÁNICO! ¡Podrá recuperarlos! - Lo primero que debe hacer es evitar más cambios en su array de discos. + Antes de hacer cualquier otra cosa, evite realizar cualquier cambio en su + array de discos, ya que modificar o eliminar datos en los discos restantes + puede hacer imposible la recuperación. Deshabilite cualquier conexión remota a él y cualquier proceso programado, incluida cualquier sincronización o depuración nocturna programada de SnapRAID. diff --git a/doc/snapraid-es.txt b/doc/snapraid-es.txt index ecfd677c..2f1754f2 100644 --- a/doc/snapraid-es.txt +++ b/doc/snapraid-es.txt @@ -342,7 +342,9 @@ Ha sucedido lo peor, ¡y ha perdido uno o más discos! ¡NO ENTRE EN PÁNICO! ¡Podrá recuperarlos! -Lo primero que debe hacer es evitar más cambios en su array de discos. +Antes de hacer cualquier otra cosa, evite realizar cualquier cambio en su +array de discos, ya que modificar o eliminar datos en los discos restantes +puede hacer imposible la recuperación. Deshabilite cualquier conexión remota a él y cualquier proceso programado, incluida cualquier sincronización o depuración nocturna programada de SnapRAID. diff --git a/doc/snapraid-fr.1 b/doc/snapraid-fr.1 index 40471034..57ac484d 100644 --- a/doc/snapraid-fr.1 +++ b/doc/snapraid-fr.1 @@ -582,8 +582,10 @@ Le pire est arrivé, et vous avez perdu un ou plusieurs disques ! .PP NE PANIQUEZ PAS ! Vous pourrez les récupérer ! .PP -La première chose à faire est d\'éviter d\'autres modifications -sur votre baie de disques. Désactivez toute connexion à distance +Avant toute autre chose, évitez d\'apporter la moindre modification +à votre baie de disques, car modifier ou supprimer des données sur +les disques restants peut rendre la récupération impossible. +Désactivez toute connexion à distance et tout processus planifié, y compris toute synchronisation ou nettoyage SnapRAID nocturne planifié. .PP diff --git a/doc/snapraid-fr.d b/doc/snapraid-fr.d index 513d0664..1ba69bf7 100644 --- a/doc/snapraid-fr.d +++ b/doc/snapraid-fr.d @@ -333,8 +333,10 @@ Démarrer (Getting Started) NE PANIQUEZ PAS ! Vous pourrez les récupérer ! - La première chose à faire est d'éviter d'autres modifications - sur votre baie de disques. Désactivez toute connexion à distance + Avant toute autre chose, évitez d'apporter la moindre modification + à votre baie de disques, car modifier ou supprimer des données sur + les disques restants peut rendre la récupération impossible. + Désactivez toute connexion à distance et tout processus planifié, y compris toute synchronisation ou nettoyage SnapRAID nocturne planifié. diff --git a/doc/snapraid-fr.txt b/doc/snapraid-fr.txt index c69cc2ed..b99c5995 100644 --- a/doc/snapraid-fr.txt +++ b/doc/snapraid-fr.txt @@ -354,8 +354,10 @@ Le pire est arrivé, et vous avez perdu un ou plusieurs disques ! NE PANIQUEZ PAS ! Vous pourrez les récupérer ! -La première chose à faire est d'éviter d'autres modifications -sur votre baie de disques. Désactivez toute connexion à distance +Avant toute autre chose, évitez d'apporter la moindre modification +à votre baie de disques, car modifier ou supprimer des données sur +les disques restants peut rendre la récupération impossible. +Désactivez toute connexion à distance et tout processus planifié, y compris toute synchronisation ou nettoyage SnapRAID nocturne planifié. diff --git a/doc/snapraid-it.1 b/doc/snapraid-it.1 index 5b5326df..b6309967 100644 --- a/doc/snapraid-it.1 +++ b/doc/snapraid-it.1 @@ -572,7 +572,9 @@ snapraid fix \-m .PP NON FARSI PRENDERE DAL PANICO! Sarà possibile recuperarli! .PP -La prima cosa da fare è evitare ulteriori modifiche all\'array di dischi. +Prima di fare qualsiasi altra cosa, evitare di apportare qualsiasi modifica +all\'array di dischi, poiché modificare o cancellare dati sui dischi rimanenti +potrebbe rendere impossibile il recupero. Disabilitare qualsiasi connessione remota ad esso e qualsiasi processo pianificato, incluso qualsiasi sync o scrub notturno pianificato di SnapRAID. .PP diff --git a/doc/snapraid-it.d b/doc/snapraid-it.d index e69417a5..edd46478 100644 --- a/doc/snapraid-it.d +++ b/doc/snapraid-it.d @@ -323,7 +323,9 @@ Primi passi (Getting Started) NON FARSI PRENDERE DAL PANICO! Sarà possibile recuperarli! - La prima cosa da fare è evitare ulteriori modifiche all'array di dischi. + Prima di fare qualsiasi altra cosa, evitare di apportare qualsiasi modifica + all'array di dischi, poiché modificare o cancellare dati sui dischi rimanenti + potrebbe rendere impossibile il recupero. Disabilitare qualsiasi connessione remota ad esso e qualsiasi processo pianificato, incluso qualsiasi sync o scrub notturno pianificato di SnapRAID. diff --git a/doc/snapraid-it.txt b/doc/snapraid-it.txt index 711a98cf..3802f8bc 100644 --- a/doc/snapraid-it.txt +++ b/doc/snapraid-it.txt @@ -344,7 +344,9 @@ O per recuperare tutti i file eliminati su tutte le unità con: NON FARSI PRENDERE DAL PANICO! Sarà possibile recuperarli! -La prima cosa da fare è evitare ulteriori modifiche all'array di dischi. +Prima di fare qualsiasi altra cosa, evitare di apportare qualsiasi modifica +all'array di dischi, poiché modificare o cancellare dati sui dischi rimanenti +potrebbe rendere impossibile il recupero. Disabilitare qualsiasi connessione remota ad esso e qualsiasi processo pianificato, incluso qualsiasi sync o scrub notturno pianificato di SnapRAID. diff --git a/doc/snapraid-ja.1 b/doc/snapraid-ja.1 index a11a9d20..d60b722a 100644 --- a/doc/snapraid-ja.1 +++ b/doc/snapraid-ja.1 @@ -545,7 +545,8 @@ snapraid fix \-m .PP **パニックにならないでください!** 復旧できます! .PP -最初に行うべきことは、ディスクアレイへの**さらなる変更を避ける**ことです。 +何よりもまず、ディスクアレイへの**変更を一切行わないでください**。 +残りのディスク上のデータを変更または削除すると、復旧が不可能になる可能性があります。 リモート接続、およびスケジュールされたSnapRAIDの夜間 \`sync\` や \`scrub\` を含む、 すべてのスケジュールされたプロセスを無効にしてください。 .PP diff --git a/doc/snapraid-ja.d b/doc/snapraid-ja.d index 58a996b7..733d8b19 100644 --- a/doc/snapraid-ja.d +++ b/doc/snapraid-ja.d @@ -296,7 +296,8 @@ Name{number} **パニックにならないでください!** 復旧できます! - 最初に行うべきことは、ディスクアレイへの**さらなる変更を避ける**ことです。 + 何よりもまず、ディスクアレイへの**変更を一切行わないでください**。 + 残りのディスク上のデータを変更または削除すると、復旧が不可能になる可能性があります。 リモート接続、およびスケジュールされたSnapRAIDの夜間 `sync` や `scrub` を含む、 すべてのスケジュールされたプロセスを無効にしてください。 diff --git a/doc/snapraid-ja.txt b/doc/snapraid-ja.txt index 580201d5..432b1599 100644 --- a/doc/snapraid-ja.txt +++ b/doc/snapraid-ja.txt @@ -317,7 +317,8 @@ SnapRAIDはRAIDシステムよりもバックアッププログラムのよう **パニックにならないでください!** 復旧できます! -最初に行うべきことは、ディスクアレイへの**さらなる変更を避ける**ことです。 +何よりもまず、ディスクアレイへの**変更を一切行わないでください**。 +残りのディスク上のデータを変更または削除すると、復旧が不可能になる可能性があります。 リモート接続、およびスケジュールされたSnapRAIDの夜間 `sync` や `scrub` を含む、 すべてのスケジュールされたプロセスを無効にしてください。 diff --git a/doc/snapraid-ko.1 b/doc/snapraid-ko.1 index 406369b0..5b3db298 100644 --- a/doc/snapraid-ko.1 +++ b/doc/snapraid-ko.1 @@ -554,7 +554,8 @@ snapraid fix \-m .PP **당황하지 마십시오!** 복구할 수 있습니다! .PP -가장 먼저 해야 할 일은 디스크 어레이에 대한 추가 변경을 피하는 것입니다. +다른 작업을 하기 전에 디스크 어레이를 일절 변경하지 마십시오. 남은 디스크의 +데이터를 수정하거나 삭제하면 복구가 불가능해질 수 있습니다. 모든 원격 연결과 SnapRAID 야간 동기화 또는 스크럽을 포함한 모든 예약된 프로세스를 비활성화하십시오. .PP diff --git a/doc/snapraid-ko.d b/doc/snapraid-ko.d index 181827b1..0adddd1e 100644 --- a/doc/snapraid-ko.d +++ b/doc/snapraid-ko.d @@ -305,7 +305,8 @@ Name{number} **당황하지 마십시오!** 복구할 수 있습니다! - 가장 먼저 해야 할 일은 디스크 어레이에 대한 추가 변경을 피하는 것입니다. + 다른 작업을 하기 전에 디스크 어레이를 일절 변경하지 마십시오. 남은 디스크의 + 데이터를 수정하거나 삭제하면 복구가 불가능해질 수 있습니다. 모든 원격 연결과 SnapRAID 야간 동기화 또는 스크럽을 포함한 모든 예약된 프로세스를 비활성화하십시오. diff --git a/doc/snapraid-ko.txt b/doc/snapraid-ko.txt index 0bc5dd8b..b22e28ea 100644 --- a/doc/snapraid-ko.txt +++ b/doc/snapraid-ko.txt @@ -326,7 +326,8 @@ SnapRAID는 RAID 시스템보다는 백업 프로그램처럼 작동하며, **당황하지 마십시오!** 복구할 수 있습니다! -가장 먼저 해야 할 일은 디스크 어레이에 대한 추가 변경을 피하는 것입니다. +다른 작업을 하기 전에 디스크 어레이를 일절 변경하지 마십시오. 남은 디스크의 +데이터를 수정하거나 삭제하면 복구가 불가능해질 수 있습니다. 모든 원격 연결과 SnapRAID 야간 동기화 또는 스크럽을 포함한 모든 예약된 프로세스를 비활성화하십시오. diff --git a/doc/snapraid-pl.1 b/doc/snapraid-pl.1 index f58b449d..9df1e625 100644 --- a/doc/snapraid-pl.1 +++ b/doc/snapraid-pl.1 @@ -559,7 +559,9 @@ Najgorsze się wydarzyło i straciłeś jeden lub więcej dysków! .PP NIE PANIKUJ! Będziesz w stanie je odzyskać! .PP -Pierwszą rzeczą, którą musisz zrobić, to unikać dalszych zmian w Twojej macierzy dysków. +Zanim zrobisz cokolwiek innego, unikaj wprowadzania jakichkolwiek zmian w Twojej +macierzy dysków, ponieważ modyfikowanie lub usuwanie danych na pozostałych +dyskach może uniemożliwić odzyskanie. Wyłącz wszelkie zdalne połączenia z nią i wszelkie zaplanowane procesy, w tym jakąkolwiek zaplanowaną nocną synchronizację lub scrub SnapRAID. .PP diff --git a/doc/snapraid-pl.d b/doc/snapraid-pl.d index 5994af30..6e166d51 100644 --- a/doc/snapraid-pl.d +++ b/doc/snapraid-pl.d @@ -310,7 +310,9 @@ Pierwsze kroki (Getting Started) NIE PANIKUJ! Będziesz w stanie je odzyskać! - Pierwszą rzeczą, którą musisz zrobić, to unikać dalszych zmian w Twojej macierzy dysków. + Zanim zrobisz cokolwiek innego, unikaj wprowadzania jakichkolwiek zmian w Twojej + macierzy dysków, ponieważ modyfikowanie lub usuwanie danych na pozostałych + dyskach może uniemożliwić odzyskanie. Wyłącz wszelkie zdalne połączenia z nią i wszelkie zaplanowane procesy, w tym jakąkolwiek zaplanowaną nocną synchronizację lub scrub SnapRAID. diff --git a/doc/snapraid-pl.txt b/doc/snapraid-pl.txt index 8ad42b3c..d51a2f69 100644 --- a/doc/snapraid-pl.txt +++ b/doc/snapraid-pl.txt @@ -331,7 +331,9 @@ Najgorsze się wydarzyło i straciłeś jeden lub więcej dysków! NIE PANIKUJ! Będziesz w stanie je odzyskać! -Pierwszą rzeczą, którą musisz zrobić, to unikać dalszych zmian w Twojej macierzy dysków. +Zanim zrobisz cokolwiek innego, unikaj wprowadzania jakichkolwiek zmian w Twojej +macierzy dysków, ponieważ modyfikowanie lub usuwanie danych na pozostałych +dyskach może uniemożliwić odzyskanie. Wyłącz wszelkie zdalne połączenia z nią i wszelkie zaplanowane procesy, w tym jakąkolwiek zaplanowaną nocną synchronizację lub scrub SnapRAID. diff --git a/doc/snapraid-pt.1 b/doc/snapraid-pt.1 index 42c6fa53..879cfa60 100644 --- a/doc/snapraid-pt.1 +++ b/doc/snapraid-pt.1 @@ -563,8 +563,10 @@ O pior aconteceu e você perdeu um ou mais discos! .PP NÃO ENTRE EM PÂNICO! Você será capaz de recuperá\-los! .PP -A primeira coisa que você deve fazer é evitar mais alterações em seu array -de discos. Desabilite quaisquer conexões remotas a ele e quaisquer +Antes de fazer qualquer outra coisa, evite fazer qualquer alteração em seu +array de discos, pois modificar ou excluir dados nos discos restantes pode +tornar a recuperação impossível. +Desabilite quaisquer conexões remotas a ele e quaisquer processos agendados, incluindo qualquer sincronização noturna ou scrub agendado do SnapRAID. .PP diff --git a/doc/snapraid-pt.d b/doc/snapraid-pt.d index 029e06b1..8f469161 100644 --- a/doc/snapraid-pt.d +++ b/doc/snapraid-pt.d @@ -314,8 +314,10 @@ Primeiros Passos (Getting Started) NÃO ENTRE EM PÂNICO! Você será capaz de recuperá-los! - A primeira coisa que você deve fazer é evitar mais alterações em seu array - de discos. Desabilite quaisquer conexões remotas a ele e quaisquer + Antes de fazer qualquer outra coisa, evite fazer qualquer alteração em seu + array de discos, pois modificar ou excluir dados nos discos restantes pode + tornar a recuperação impossível. + Desabilite quaisquer conexões remotas a ele e quaisquer processos agendados, incluindo qualquer sincronização noturna ou scrub agendado do SnapRAID. diff --git a/doc/snapraid-pt.txt b/doc/snapraid-pt.txt index 654c4c93..0f681249 100644 --- a/doc/snapraid-pt.txt +++ b/doc/snapraid-pt.txt @@ -335,8 +335,10 @@ O pior aconteceu e você perdeu um ou mais discos! NÃO ENTRE EM PÂNICO! Você será capaz de recuperá-los! -A primeira coisa que você deve fazer é evitar mais alterações em seu array -de discos. Desabilite quaisquer conexões remotas a ele e quaisquer +Antes de fazer qualquer outra coisa, evite fazer qualquer alteração em seu +array de discos, pois modificar ou excluir dados nos discos restantes pode +tornar a recuperação impossível. +Desabilite quaisquer conexões remotas a ele e quaisquer processos agendados, incluindo qualquer sincronização noturna ou scrub agendado do SnapRAID. diff --git a/doc/snapraid-ro.1 b/doc/snapraid-ro.1 index 1d509188..61b32aca 100644 --- a/doc/snapraid-ro.1 +++ b/doc/snapraid-ro.1 @@ -556,7 +556,9 @@ Cel mai rău s\-a întâmplat și ați pierdut unul sau mai multe discuri! .PP NU INTRAȚI ÎN PANICĂ! Veți putea să le recuperați! .PP -Primul lucru pe care trebuie să\-l faceți este să evitați modificările ulterioare la matricea dvs. de discuri. +Înainte de a face orice altceva, evitați să efectuați orice modificare la matricea +dvs. de discuri, deoarece modificarea sau ștergerea datelor de pe discurile +rămase poate face recuperarea imposibilă. Dezactivați orice conexiuni la distanță la aceasta și orice procese programate, inclusiv orice sincronizare sau verificare SnapRAID programată pe timp de noapte. .PP diff --git a/doc/snapraid-ro.d b/doc/snapraid-ro.d index e9d89159..25e6dadd 100644 --- a/doc/snapraid-ro.d +++ b/doc/snapraid-ro.d @@ -307,7 +307,9 @@ Noțiuni de Bază (Getting Started) NU INTRAȚI ÎN PANICĂ! Veți putea să le recuperați! - Primul lucru pe care trebuie să-l faceți este să evitați modificările ulterioare la matricea dvs. de discuri. + Înainte de a face orice altceva, evitați să efectuați orice modificare la matricea + dvs. de discuri, deoarece modificarea sau ștergerea datelor de pe discurile + rămase poate face recuperarea imposibilă. Dezactivați orice conexiuni la distanță la aceasta și orice procese programate, inclusiv orice sincronizare sau verificare SnapRAID programată pe timp de noapte. diff --git a/doc/snapraid-ro.txt b/doc/snapraid-ro.txt index c9d9a2ff..cebedc3d 100644 --- a/doc/snapraid-ro.txt +++ b/doc/snapraid-ro.txt @@ -328,7 +328,9 @@ Cel mai rău s-a întâmplat și ați pierdut unul sau mai multe discuri! NU INTRAȚI ÎN PANICĂ! Veți putea să le recuperați! -Primul lucru pe care trebuie să-l faceți este să evitați modificările ulterioare la matricea dvs. de discuri. +Înainte de a face orice altceva, evitați să efectuați orice modificare la matricea +dvs. de discuri, deoarece modificarea sau ștergerea datelor de pe discurile +rămase poate face recuperarea imposibilă. Dezactivați orice conexiuni la distanță la aceasta și orice procese programate, inclusiv orice sincronizare sau verificare SnapRAID programată pe timp de noapte. diff --git a/doc/snapraid-ru.1 b/doc/snapraid-ru.1 index 4b5e257f..a01fd9dc 100644 --- a/doc/snapraid-ru.1 +++ b/doc/snapraid-ru.1 @@ -558,7 +558,9 @@ snapraid fix \-m .PP НЕ ПАНИКУЙТЕ! Вы сможете их восстановить! .PP -Первое, что вы должны сделать, это избегать дальнейших изменений в вашем дисковом массиве. +Прежде чем делать что\-либо ещё, избегайте любых изменений в вашем дисковом +массиве, так как изменение или удаление данных на оставшихся дисках может +сделать восстановление невозможным. Отключите любые удаленные подключения к нему и любые запланированные процессы, включая любое запланированное ночное sync или scrub SnapRAID. .PP diff --git a/doc/snapraid-ru.d b/doc/snapraid-ru.d index 2ce06ad5..002d0d22 100644 --- a/doc/snapraid-ru.d +++ b/doc/snapraid-ru.d @@ -309,7 +309,9 @@ Name{number} НЕ ПАНИКУЙТЕ! Вы сможете их восстановить! - Первое, что вы должны сделать, это избегать дальнейших изменений в вашем дисковом массиве. + Прежде чем делать что-либо ещё, избегайте любых изменений в вашем дисковом + массиве, так как изменение или удаление данных на оставшихся дисках может + сделать восстановление невозможным. Отключите любые удаленные подключения к нему и любые запланированные процессы, включая любое запланированное ночное sync или scrub SnapRAID. diff --git a/doc/snapraid-ru.txt b/doc/snapraid-ru.txt index e1f6a0e6..cc0e5078 100644 --- a/doc/snapraid-ru.txt +++ b/doc/snapraid-ru.txt @@ -330,7 +330,9 @@ SnapRAID функционирует скорее как программа ре НЕ ПАНИКУЙТЕ! Вы сможете их восстановить! -Первое, что вы должны сделать, это избегать дальнейших изменений в вашем дисковом массиве. +Прежде чем делать что-либо ещё, избегайте любых изменений в вашем дисковом +массиве, так как изменение или удаление данных на оставшихся дисках может +сделать восстановление невозможным. Отключите любые удаленные подключения к нему и любые запланированные процессы, включая любое запланированное ночное sync или scrub SnapRAID. diff --git a/doc/snapraid-sv.1 b/doc/snapraid-sv.1 index 769baa66..e3dfc6e2 100644 --- a/doc/snapraid-sv.1 +++ b/doc/snapraid-sv.1 @@ -558,7 +558,9 @@ Det värsta har hänt, och du har förlorat en eller flera diskar! .PP FÅ INTE PANIK! Du kommer att kunna återställa dem! .PP -Det första du måste göra är att undvika ytterligare ändringar i din disk\-array. +Innan du gör något annat, undvik att göra några ändringar i din disk\-array, +eftersom ändring eller borttagning av data på de återstående diskarna kan +göra återställning omöjlig. Inaktivera alla fjärranslutningar till den och alla schemalagda processer, inklusive alla schemalagda SnapRAID nattliga sync\- eller scrub\-körningar. .PP diff --git a/doc/snapraid-sv.d b/doc/snapraid-sv.d index c49f0796..7e3761f5 100644 --- a/doc/snapraid-sv.d +++ b/doc/snapraid-sv.d @@ -309,7 +309,9 @@ Kom igång (Getting Started) FÅ INTE PANIK! Du kommer att kunna återställa dem! - Det första du måste göra är att undvika ytterligare ändringar i din disk-array. + Innan du gör något annat, undvik att göra några ändringar i din disk-array, + eftersom ändring eller borttagning av data på de återstående diskarna kan + göra återställning omöjlig. Inaktivera alla fjärranslutningar till den och alla schemalagda processer, inklusive alla schemalagda SnapRAID nattliga sync- eller scrub-körningar. diff --git a/doc/snapraid-sv.txt b/doc/snapraid-sv.txt index 59bec6b3..b0fdd90b 100644 --- a/doc/snapraid-sv.txt +++ b/doc/snapraid-sv.txt @@ -330,7 +330,9 @@ Det värsta har hänt, och du har förlorat en eller flera diskar! FÅ INTE PANIK! Du kommer att kunna återställa dem! -Det första du måste göra är att undvika ytterligare ändringar i din disk-array. +Innan du gör något annat, undvik att göra några ändringar i din disk-array, +eftersom ändring eller borttagning av data på de återstående diskarna kan +göra återställning omöjlig. Inaktivera alla fjärranslutningar till den och alla schemalagda processer, inklusive alla schemalagda SnapRAID nattliga sync- eller scrub-körningar. diff --git a/doc/snapraid-uk.1 b/doc/snapraid-uk.1 index ba98c152..87810877 100644 --- a/doc/snapraid-uk.1 +++ b/doc/snapraid-uk.1 @@ -585,8 +585,10 @@ snapraid fix \-m .PP НЕ ПАНІКУЙТЕ! Ви зможете їх відновити! .PP -Перше, що ви повинні зробити, це уникнути подальших змін у -вашому дисковому масиві. Вимкніть будь\-які віддалені +Перш ніж робити будь\-що інше, уникайте будь\-яких змін у +вашому дисковому масиві, оскільки зміна або видалення +даних на решті дисків може унеможливити відновлення. +Вимкніть будь\-які віддалені підключення до нього та будь\-які заплановані процеси, включаючи будь\-яку заплановану нічну синхронізацію або скрабування SnapRAID. diff --git a/doc/snapraid-uk.d b/doc/snapraid-uk.d index e06dcff0..a25b39eb 100644 --- a/doc/snapraid-uk.d +++ b/doc/snapraid-uk.d @@ -336,8 +336,10 @@ Name{number} НЕ ПАНІКУЙТЕ! Ви зможете їх відновити! - Перше, що ви повинні зробити, це уникнути подальших змін у - вашому дисковому масиві. Вимкніть будь-які віддалені + Перш ніж робити будь-що інше, уникайте будь-яких змін у + вашому дисковому масиві, оскільки зміна або видалення + даних на решті дисків може унеможливити відновлення. + Вимкніть будь-які віддалені підключення до нього та будь-які заплановані процеси, включаючи будь-яку заплановану нічну синхронізацію або скрабування SnapRAID. diff --git a/doc/snapraid-uk.txt b/doc/snapraid-uk.txt index 1dcdc967..53df8b98 100644 --- a/doc/snapraid-uk.txt +++ b/doc/snapraid-uk.txt @@ -357,8 +357,10 @@ SnapRAID функціонує більше як програма резервн НЕ ПАНІКУЙТЕ! Ви зможете їх відновити! -Перше, що ви повинні зробити, це уникнути подальших змін у -вашому дисковому масиві. Вимкніть будь-які віддалені +Перш ніж робити будь-що інше, уникайте будь-яких змін у +вашому дисковому масиві, оскільки зміна або видалення +даних на решті дисків може унеможливити відновлення. +Вимкніть будь-які віддалені підключення до нього та будь-які заплановані процеси, включаючи будь-яку заплановану нічну синхронізацію або скрабування SnapRAID. diff --git a/doc/snapraid-zh.1 b/doc/snapraid-zh.1 index c39b06ed..27642b6f 100644 --- a/doc/snapraid-zh.1 +++ b/doc/snapraid-zh.1 @@ -520,7 +520,8 @@ snapraid fix \-m .PP **不要惊慌!** 您将能够恢复它们! .PP -您必须做的第一件事是避免对磁盘阵列进行进一步的更改。 +在执行任何其他操作之前,请避免对磁盘阵列进行任何更改, +因为修改或删除剩余磁盘上的数据可能会导致无法恢复。 禁用对其的任何远程连接以及任何计划的进程,包括任何计划的 SnapRAID 夜间同步或 scrub。 .PP diff --git a/doc/snapraid-zh.d b/doc/snapraid-zh.d index f2b0836e..14573ca7 100644 --- a/doc/snapraid-zh.d +++ b/doc/snapraid-zh.d @@ -271,7 +271,8 @@ Name{number} **不要惊慌!** 您将能够恢复它们! - 您必须做的第一件事是避免对磁盘阵列进行进一步的更改。 + 在执行任何其他操作之前,请避免对磁盘阵列进行任何更改, + 因为修改或删除剩余磁盘上的数据可能会导致无法恢复。 禁用对其的任何远程连接以及任何计划的进程,包括任何计划的 SnapRAID 夜间同步或 scrub。 diff --git a/doc/snapraid-zh.txt b/doc/snapraid-zh.txt index 4791ecd4..4bfd5497 100644 --- a/doc/snapraid-zh.txt +++ b/doc/snapraid-zh.txt @@ -292,7 +292,8 @@ SnapRAID 的功能更像一个备份程序而不是 RAID 系统, **不要惊慌!** 您将能够恢复它们! -您必须做的第一件事是避免对磁盘阵列进行进一步的更改。 +在执行任何其他操作之前,请避免对磁盘阵列进行任何更改, +因为修改或删除剩余磁盘上的数据可能会导致无法恢复。 禁用对其的任何远程连接以及任何计划的进程,包括任何计划的 SnapRAID 夜间同步或 scrub。 diff --git a/doc/snapraid.1 b/doc/snapraid.1 index 6bd30dce..f0b2b8b4 100644 --- a/doc/snapraid.1 +++ b/doc/snapraid.1 @@ -559,7 +559,8 @@ The worst has happened, and you have lost one or more disks! .PP DO NOT PANIC! You will be able to recover them! .PP -The first thing you must do is avoid further changes to your disk array. +Before doing anything else, avoid making any changes to your disk array, as +modifying or deleting data on the remaining disks may make recovery impossible. Disable any remote connections to it and any scheduled processes, including any scheduled SnapRAID nightly sync or scrub. .PP diff --git a/doc/snapraid.d b/doc/snapraid.d index 2682257e..b8476711 100644 --- a/doc/snapraid.d +++ b/doc/snapraid.d @@ -310,7 +310,8 @@ Getting Started DO NOT PANIC! You will be able to recover them! - The first thing you must do is avoid further changes to your disk array. + Before doing anything else, avoid making any changes to your disk array, as + modifying or deleting data on the remaining disks may make recovery impossible. Disable any remote connections to it and any scheduled processes, including any scheduled SnapRAID nightly sync or scrub. diff --git a/doc/snapraid.txt b/doc/snapraid.txt index 6833e6f0..7bf366b8 100644 --- a/doc/snapraid.txt +++ b/doc/snapraid.txt @@ -331,7 +331,8 @@ The worst has happened, and you have lost one or more disks! DO NOT PANIC! You will be able to recover them! -The first thing you must do is avoid further changes to your disk array. +Before doing anything else, avoid making any changes to your disk array, as +modifying or deleting data on the remaining disks may make recovery impossible. Disable any remote connections to it and any scheduled processes, including any scheduled SnapRAID nightly sync or scrub.