Rsync on a 2 micro sd card unit combined as an luks encrypted LVM, on top fscrypt: Fscrypt seems to lock from time to time, how to avoid?
(Just for transparency: I have posted the exact question on unix.stackexchange.com forum . I couldn't decide where more expert knowlegde is available, second please keep in mind also the setup is complex)(Just for transparency: I have posted the exact question on unix.stackexchange.com forum . I couldn't decide where more expert knowlegde is available, second please keep in mind also the setup is complex)
Hope anyone has a hint, if fscrypt which serves for me as a replacement for the error prone ecyryptfs for my backed up home folder (which is in a different PV group, luks encrypted,ecryptfs home folder):
+-----------------------------------+ +-----------------------------------+
| Source: Home | | Destination: Backup |
| (eCryptfs on Home Partition) | | (fscrypt on Backup Partition) |
+-----------------------------------+ +-----------------------------------+
\|/ | ^ \|/
| |___________________| |
| (rsync from Home to Backup) |
v v
+-----------------------------------+ +-----------------------------------+
| eCryptfs Layer (Home Folder) | | fscrypt Layer (BackupHome) |
+-----------------------------------+ +-----------------------------------+
| Home Partition | | BackupHome Partition |
+-----------------------------------+ +-----------------------------------+
| LVM Volume (Home) | | LVM Volume (BackupHome) |
+-----------------------------------+ +-----------------------------------+
| LVM: PV Group (Main SSD) | | LVM: PV Group (USB Stick) |
+-----------------------------------+ +-----------------------------------+
| LUKS Encrypted (Main SSD) | | LUKS Encrypted (µSD Slot 1) |
+-----------------------------------+ +-----------------------------------+
| Physical Layer (Main SSD) | | LUKS Encrypted (µSD Slot 2) |
+-----------------------------------+ +-----------------------------------+
\|/ | Physical Layer |
| +-----------------------------------+
| \|/
+-----------------------------------+ +-----------------------------------+
| Physical Layer (4 TB SSD) | | Physical Layer (USB Stick) |
| Dual Boot Windows/Linux (LVM) | | Combined 2 x 1.5TB µSD with |
| LUKS LVM in part.6, part.5 /boot | | |
| (root, home, swap)in 3.1TB Volume | | LVM into 2.8TB Volume |
+-----------------------------------+ +-----------------------------------+
Now I want to backup my data with the following command:
rsync -avvh --inplace --size-only --info=progress2 /home/userXXX/ /backupHome/userXXX/
I got from time to time randomly different error messages like these (side info below the log):
[..]
testdaten/shrinkMpegxxDB.log
9,02G 0% 117,23MB/s 0:01:13 (xfr#915, to-chk=655/497427)
testdaten/yyy.zzz/
testdaten/scripts/
rsync: [receiver] open "/backupHome/userXXX/testdaten/shrinkMpegxxDB.log" failed: Required key not available (126)
9,02G 0% 117,23MB/s 0:01:13 (xfr#915, to-chk=0/497427)
sent 9,04G bytes received 42,04K bytes 121,37M bytes/sec
total size is 1,75T speedup is 194,06
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1338) [sender=3.2.7]
[..]
rsync: [generator] recv_generator: mkdir "/backupHome/userXXX/.config/menus" failed: Required key not available (126)
*** Skipping any contents from this failed directory ***
rsync: [generator] recv_generator: mkdir "/backupHome/xxxx/.config/mpv" failed: Required key not available (126)
*** Skipping any contents from this failed directory ***
rsync: [generator] recv_generator: mkdir "/backupHome/userXXX/.config/nautilus" failed: Required key not available (126)
*** Skipping any contents from this failed directory ***
rsync: [generator] recv_generator: mkdir "/backupHome/userXXX/.config/nemo" failed: Required key not available (126)
*** Skipping any contents from this failed directory ***
rsync: [generator] recv_generator: mkdir "/backupHome/userXXX/.config/nomacs" failed: Required key not available (126)
*** Skipping any contents from this failed directory ***
rsync: [generator] recv_generator: mkdir "/backupHome/userXXX/.config/procps" failed: Required key not available (126)
*** Skipping any contents from this failed directory ***
rsync: [generator] recv_generator: mkdir "/backupHome/userXXX/.config/pulse" failed: Required key not available (126)
*** Skipping any contents from this failed directory ***
rsync: [generator] recv_generator: mkdir "/backupHome/userXXX/.config/qimgv" failed: Required key not available (126)
*** Skipping any contents from this failed directory ***
rsync: [generator] recv_generator: mkdir "/backupHome/userXXX/.config/remmina" failed: Required key not available (126)
*** Skipping any contents from this failed directory ***
rsync: [generator] recv_generator: mkdir "/backupHome/userXXX/.config/simple-scan" failed: Required key not available (126)
*** Skipping any contents from this failed directory ***
rsync: [generator] recv_generator: mkdir "/backupHome/userXXX/.config/systemd" failed: Required key not available (126)
*** Skipping any contents from this failed directory ***
rsync: [generator] recv_generator: mkdir "/backupHome/userXXX/.config/teamviewer" failed: Required key not available (126)
[..]
103,23M 0% 2,26MB/s 0:00:43 (xfr#1034, ir-chk=1028/476659)
[sender] expand file_list pointer array to 1024 bytes, did move
[sender] expand file_list pointer array to 1024 bytes, did move
[sender] expand file_list pointer array to 1024 bytes, did move
[sender] expand file_list pointer array to 1024 bytes, did move
[sender] expand file_list pointer array to 4096 bytes, did not move
[sender] expand file_list pointer array to 16384 bytes, did not move
[sender] expand file_list pointer array to 32768 bytes, did move
103,23M 0% 2,24MB/s 0:00:44 (xfr#1034, ir-chk=2841/479500)
[..]
total: matches=0 hash_hits=0 false_alarms=0 data=103226155
sent 124,32M bytes received 46,81M bytes 3,20M bytes/sec
total size is 1,75T speedup is 10.254,91
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1338) [sender=3.2.7]
The complete backup was 1,8 TB. With the first "chunk" of transmitted data, each time interrupted by an error, was 747 GB. File access was forbidden. I tried it with bash commands but failed in the same way, so it was related to fscrypt
.
Each Time I delocked the home again and again (after each cancellation), It works on. Because the USB Stick got very hot I cooled it down with some cooling ice from the fridge:
fscrypt unlock /backupHome/userXXX
So what is your ideas? My suggestions for the error cause:
- device went too hot (after cooling down and again delocking it was transferring 1TB in one "chunk")
- did I accidentally make a mistake in delocking the fscrypted backupHome folder?
- Is the LUKS/LVM/2µSD config bind together in an µSD expansion usb Module problematic?
I hope anyone can help here!