-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[NAS Backup] Suppress Errors in Disk Usage Calculation that Caused Backup to Fail. #13424
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 15 commits
9755ba5
e476a68
de4adaa
efafe00
6e9af51
b6b5bfd
4684396
c3e1471
4928151
0efaf6d
6e832f1
1c0287d
9217905
edc80b1
9ebd2d3
3ed133c
553e419
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -196,10 +196,12 @@ backup_running_vm() { | |
|
|
||
| # Print statistics | ||
| virsh -c qemu:///system domjobinfo $VM --completed | ||
| du -sb $dest | cut -f1 | ||
|
|
||
| umount $mount_point | ||
| rmdir $mount_point | ||
| backup_size=$(du -sb "$dest" 2>/dev/null | cut -f1) || true | ||
|
|
||
| timeout 60 umount "$mount_point" 2>/dev/null || true | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am ok with this, but can we define 60 as a constant at the top of the file? |
||
| rmdir "$mount_point" 2>/dev/null || true | ||
|
Comment on lines
+199
to
+202
Comment on lines
+201
to
+202
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we log the error (using log -e) instead of silently returning true here? |
||
|
|
||
|
daviftorres marked this conversation as resolved.
|
||
| echo -n "$backup_size" | ||
|
|
||
| } | ||
|
|
||
| backup_stopped_vm() { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @daviftorres
Do we know the exact reason for du to fail? is that a connectivity issue?
This is the only place where the size is set on the backup. And a 0 size will affect resource limit and usage calculations.
May I suggest adding a retry loop instead?