Score:0

Does daily rsync OS backup push SSD drives to its limits?

ru flag

Since past year I'm using Rsnapshot (which uses rsync) to do my daily laptop Linux Ubuntu OS backup to a local NAS.

Some months ago I started having serious problems with the OS stability. It seems like the disk drive gets damaged, so the fsck needs to be run before boot - this saved me several times over the past few weeks.

I tried to somehow deduce what could be the reason, but no success. Now I am thinking whether it could be that constant daily backups push the SSD drive to it's limits?

How disk intensive is the rsync? Could it lead to SSD problems?

This is what sudo nvme smart-log /dev/nvme0n1 outputs:

Smart Log for NVME device:nvme0n1 namespace-id:ffffffff
critical_warning            : 0
temperature             : 53 C (326 Kelvin)
available_spare             : 100%
available_spare_threshold       : 10%
percentage_used             : 0%
endurance group critical warning summary: 0
data_units_read             : 13.345.895
data_units_written          : 16.767.444
host_read_commands          : 370.380.945
host_write_commands         : 276.324.114
controller_busy_time            : 1.005
power_cycles                : 1.010
power_on_hours              : 1.257
unsafe_shutdowns            : 76
media_errors                : 0
num_err_log_entries         : 2.890
Warning Temperature Time        : 0
Critical Composite Temperature Time : 0
Temperature Sensor 1           : 53 C (326 Kelvin)
Temperature Sensor 2           : 52 C (325 Kelvin)
Thermal Management T1 Trans Count   : 0
Thermal Management T2 Trans Count   : 0
Thermal Management T1 Total Time    : 0
Thermal Management T2 Total Time    : 0

Note the num_err_log_entries: 2.890.

diya avatar
la flag
Normally the critical limiting factor in SSD lifetime is the fact that they support a finite number of write cycles and simply reading (all) the data from a disk shouldn't wear it out. Check the kernel messages/logs for errors, read out the [S.M.A.R.T. data](https://en.wikipedia.org/wiki/Self-Monitoring,_Analysis_and_Reporting_Technology) for the disk (or nvme health data when that is more appropriate) , trigger a self-test. And of course monitor other hardware health parameters/statistics.
Danijel avatar
ru flag
Thanks @diya. I just ran the `nvme` tool, added some info to the question. Does `num_err_log_entries: 2.890` tell you anything more?
diya avatar
la flag
The [`nvme error-log`](https://manpages.ubuntu.com/manpages/xenial/man1/nvme-error-log.1.html) sub command will allow you to display the contents of that error log. The `unsafe_shutdowns` counter may also be an indicator for worry - simply pulling the power from an nvme drive may also cause data loss
Score:1
ca flag

No, rsnapshot does not put any significant stress on disks - quite the contrary: using hardlinks to deduplicate files, it avoid writing much data to the underlying filesystem.

From your smart data, I can not see any issue due to NAND wear (percentage used is 0). The errors you see are probably caused by platform and controller power saving settings, and these can result in data corruption due to bugged firmwares.

Please try adding pcie_aspm=off to your kernel boot options and monitor your disk for new errors. If they persist, try replacing your disk. But if the issue remains, basically anything can be the root cause: bad power supply, bad RAM, bad motherboard, etc.

Danijel avatar
ru flag
OK, I added `pcie_aspm=off`, let's see if it helps. Related to Rsnapsot, I've read that rsync doesn't write the diffs if it finds the destination to be a local and not remote, because it is faster just to overwrite the whole file. I was thinking, maybe it considers my NAS a local storage, and writes it all?
shodanshok avatar
ca flag
A whole-file copy only happens if a) you locally mount the destination filesystem or b) you use the `-W` option. Anyway, hardlinks work irrespective of whole-copy or not, so I don't think this has anything to do with your issue.
Danijel avatar
ru flag
Yes, I mount my NAS: `mount -t nfs 192.168.5.57:/volume1/my_backup /var/my_nas/`
shodanshok avatar
ca flag
`rsync` delta alg does not reduce disk read/writes, but transfer bandwidth only. So the fact you are mounting your NAS share locally will probably slow down the transfer, but does not add significant disk wear (if at all).
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.