Repository navigation
Linstor add support for incremental nasbackup #14194
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: 4.22
Are you sure you want to change the base?
Changes from all commits
140da6f
e8ff160
2171023
c144d09
85156a4
3c1820b
1d9b64c
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 | ||||
|---|---|---|---|---|---|---|
|
|
@@ -636,6 +636,42 @@ public class AgentProperties{ | |||||
| */ | ||||||
| public static final Property<String> KVM_SCRIPTS_DIR = new Property<>("kvm.scripts.dir", "scripts/vm/hypervisor/kvm"); | ||||||
|
|
||||||
| /** | ||||||
| * Host-local parent directory for the NAS backup pull-mode scratch area: the NBD socket and | ||||||
| * the libvirt-managed fleecing (copy-before-write) images used while backing up a running VM | ||||||
| * on raw block-device storage such as LINSTOR/DRBD. | ||||||
| * <p> | ||||||
| * Must be on a real on-disk filesystem with room for the guest's write churn during a backup, | ||||||
| * and must NOT be on the NAS share: copy-before-write runs inline with guest writes, so a slow | ||||||
| * or remote location stalls the VM. Keep the path short — the resulting socket path is subject | ||||||
| * to the kernel's 108-byte UNIX socket limit. | ||||||
| * <p> | ||||||
| * Data type: String.<br> | ||||||
| * Default value: <code>/var/tmp</code> | ||||||
| * | ||||||
| * @since 4.22.0 | ||||||
| */ | ||||||
| public static final Property<String> NAS_BACKUP_PULL_SCRATCH_DIR = new Property<>("nas.backup.pull.scratch.dir", "/var/tmp"); | ||||||
|
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. If the scratch dir gets full, the VM writes are stalled and it is paused. If I am not wrong, the VM is never resumed.
Contributor
Author
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. Yes this is the real problem with the pull mode, I added a disk space check and also by default now use the old push mode (with its drawbacks), but now it is an opt-in and admins have to make sure they have enough space or configure a correct scratch dir.
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. Scratch sizing is ok, but multiple backups may be running and as mentioned in the other comments incremental backups might be slow and there is more chance of scratch getting full which will cause the VM to be silently paused. Can we think about creating the scratch as a volume in the Linstor primary storage itself? |
||||||
|
|
||||||
| /** | ||||||
| * Free space the NAS backup pull-mode scratch area ({@link #NAS_BACKUP_PULL_SCRATCH_DIR}) must | ||||||
| * have before a backup starts, as a percentage of the VM's total disk size. Otherwise the | ||||||
| * backup fails up front. | ||||||
| * <p> | ||||||
| * Copy-before-write saves every guest block that is overwritten during the backup into the | ||||||
| * scratch area, at most once per block, so the total disk size is the worst case. If the scratch | ||||||
| * area fills up anyway, the guest's writes fail and the VM is paused. 100 rules that out; the | ||||||
|
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. There could be multiple backups running on the agent, each will check the scratch size independently and pass. Better to mention that also here. |
||||||
| * default assumes the guest overwrites at most a quarter of its disks while a backup runs. | ||||||
| * 0 disables the check. | ||||||
| * <p> | ||||||
| * Data type: Integer.<br> | ||||||
| * Default value: <code>25</code> | ||||||
| * | ||||||
| * @since 4.22.0 | ||||||
|
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.
Suggested change
|
||||||
| */ | ||||||
| public static final Property<Integer> NAS_BACKUP_PULL_SCRATCH_MIN_FREE_PERCENT = | ||||||
| new Property<>("nas.backup.pull.scratch.min.free.percent", 25); | ||||||
|
|
||||||
| /** | ||||||
| * Specifies start MAC address for private IP range.<br> | ||||||
| * Data type: String.<br> | ||||||
|
|
||||||
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.