Repository navigation
Conversation
disk_types carries only system.disks.type, and 22.9+ reports the underlying type for an encrypted disk, so a disk absent on the destination server could not be told apart from a plain local disk. Store disks with is_encrypted=1 in a new disk_encrypted metadata field and use it where a missing disk is described by the backup metadata: - isCrossDiskDownloadIncompatible fallback no longer treats a removed encrypted disk as plain local; - download re-balance groups disks by type and encryption, so parts of a removed encrypted disk land only on an encrypted disk and plain parts never land on an encrypted one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rule 3 copies shadow files of a part absent from system.parts as is, and chooseRebalanceDstDisk matched disks by type only. On 22.9+ an encrypted disk over a local one has type `local`, so a plain part could be copied onto an encrypted disk on least_used_disk, and ciphertext of a removed encrypted disk onto a plain one. Match is_encrypted too: live disks from system.disks.is_encrypted, a source disk absent on the server from metadata disk_encrypted. Disks used as rebalance targets are recorded in disk_encrypted as well. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
curl -sL without -f saved the GitHub "504 Gateway Time-out" HTML page as /usr/bin/yq, test containers are pooled, so `command -v yq` kept passing and every later custom rsync/restic/kopia test in that env failed in init.sh with "syntax error near unexpected token `<'". Probe yq with `yq --version`, download with -f into a temp file and install it only after it runs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1670.
disk_typesstores onlysystem.disks.type; on 22.9+ an encrypted disk over a local disk is reported aslocal, so a disk missing on the destination server is indistinguishable from a plain local disk.metadata.jsongetsdisk_encrypted({"disk_name": true}, omitted when no encrypted disks), filled fromsystem.disks.is_encryptedincreate.isCrossDiskDownloadIncompatible: thedisk_typesfallback for a removed required disk now setsIsEncryptedfromdisk_encrypted.reBalanceTablesMetadataIfDiskNotExists): disks are grouped by type and encryption. Before, parts of a removedlocaldisk could be re-balanced onto an encrypted disk (and encrypted parts onto a plain disk) — this is the general path, not only the--diff-from-remoteone.Backups created before this change have no
disk_encrypted, they behave as before for encrypted sources, but plain parts are no longer placed on encrypted disks.rebalancecommand, Rule 3 (copy of a part absent fromsystem.parts):chooseRebalanceDstDiskmatchesis_encryptedtoo. Before, on 22.9+ a plain part could be copied onto an encrypted disk onleast_used_disk, and parts of a removed encrypted disk onto a plain one. Rule 2 (hardlink from the live part) was never affected. Target disks are recorded indisk_encryptedas well.The target disk encryption comes from live
system.disks: 22.9+ hasis_encrypted(added in the same change that started reporting the underlyingtype), before 22.9typeisencrypteditself.disk_encryptedin metadata is needed only for a source disk which no longer exists on the server.Tests:
TestIsCrossDiskDownloadIncompatible(removed encrypted disk cases), newTestReBalanceTablesMetadataIfDiskNotExists_EncryptedDisks, two newTestComputeTableRebalancePlanrule3 cases; both fail without the fix.make testpasses.🤖 Generated with Claude Code