snapraid:disks:replace_a_data_disk_in_an_existing_array
Table of Contents
SnapRAID - Disks - Replace a data disk in an existing array
If the data disk is lost, see the recovering section in the manual.
Copy all files to the new disk
Copy all the files to the new disk, maintaining the same directory structure and names.
cp -av /from_dir/. /to_dir
WARNING: Some other mechanisms to copy the files, such as rsync may be problematic, especially if using older versions of these alternative commands.
- Older versions are not able to copy the sub-second timestamps.
Change the SnapRAID configuration
Change the SnapRAID configuration to point the disk at the new mount point and run a “diff” command to ensure that everything is placed correctly.
snapraid diff
NOTE: If “diff” reports some “added” or “removed” files, it is likely the files have been copied with a different directory structure.
- In such case, fix it, until “diff” reports only “equal”, “restored” or “copied” files.
Check that the files were really copied correctly
Run a “check” audit command limited to the replaced disk to check the check-sum of all the files.
snapraid check -a -d DISK_NAME
Update the SnapRAID state
Run “sync” to update the SnapRAID state.
- This command will be almost immediate.
snapraid sync
snapraid/disks/replace_a_data_disk_in_an_existing_array.txt · Last modified: 2025/04/29 23:00 by peter