mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-30 11:56:33 -05:00
Implement two-phase file scan with dedicated discovery struct and volatile hardlink normalization
This commit is contained in:
parent
b113accaad
commit
c407bebac3
45 changed files with 1428 additions and 960 deletions
|
|
@ -2308,19 +2308,6 @@ visible.
|
|||
.PP
|
||||
Do not place nested mount points or bind mounts inside data disks when
|
||||
filesystem snapshots are enabled.
|
||||
.SS Hard links
|
||||
SnapRAID identifies one hard link as the original file and represents the
|
||||
other hard links as references to it. Which link is selected as the original
|
||||
file depends on the order in which directory entries are scanned.
|
||||
.PP
|
||||
If this order changes, for example after files are renamed, restored, or
|
||||
directories are recreated, \[dq]diff\[dq] may report apparent moves, updates,
|
||||
additions, or removals even when the hard\-linked files still represent the
|
||||
same data.
|
||||
.PP
|
||||
This does not indicate data corruption, but the reported differences may be
|
||||
confusing and may not correspond directly to the filesystem operations that
|
||||
were performed.
|
||||
.SS In\-place file modifications without timestamp changes
|
||||
SnapRAID detects file modifications by comparing file sizes and
|
||||
modification timestamps (mtime).
|
||||
|
|
@ -2389,6 +2376,27 @@ The \`\-S\` and \`\-B\` options are intended only for advanced manual recovery,
|
|||
typically after a normal \`fix\` has failed. If a partial \`fix\` reports
|
||||
unrecoverable data, remove or rename the affected files before attempting
|
||||
another recovery, or verify their contents manually.
|
||||
.SS NTFS hard links and excluded paths
|
||||
On NTFS, directory entries cache file size and timestamps independently
|
||||
for each hard link. When a file is modified through one link, the directory
|
||||
entries of other links pointing to the same file may retain stale metadata
|
||||
until they are accessed.
|
||||
.PP
|
||||
SnapRAID automatically detects and normalizes this condition whenever at
|
||||
least two hard links to the same file are encountered during a scan.
|
||||
However, if only one hard link is scanned while the others are excluded by
|
||||
filters or reside outside the data disk path, SnapRAID cannot detect the
|
||||
inode collision and relies on the cached metadata of the single visible
|
||||
link.
|
||||
.PP
|
||||
Consequently, modifications made through an excluded or external hard link
|
||||
may go unnoticed by SnapRAID until the metadata of the included link is
|
||||
refreshed by the operating system (such as when the file is accessed or
|
||||
opened through that path).
|
||||
.PP
|
||||
To avoid this limitation, avoid modifying protected files through hard
|
||||
links that are excluded from SnapRAID, or ensure that all hard links to a
|
||||
file are included in the scan so SnapRAID can normalize them.
|
||||
.SH COPYRIGHT
|
||||
This file is Copyright (C) 2026 Andrea Mazzoleni
|
||||
.SH SEE ALSO
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue