public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH proxmox-offline-mirror v2 0/5] remove snapshot directories vanished on source also on medium
@ 2024-07-09 10:47 Stoiko Ivanov
  2024-07-09 10:47 ` [pve-devel] [PATCH proxmox-offline-mirror v2 1/5] bump proxmox-apt to 0.11 and adapt to changes Stoiko Ivanov
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Stoiko Ivanov @ 2024-07-09 10:47 UTC (permalink / raw)
  To: pve-devel

supersedes: https://lists.proxmox.com/pipermail/pve-devel/2024-June/064278.html

v1->v2:
* had quite a few chats with Fabian off-list, as noted by him - Thanks!
* noticed that the core-issue was probably an error in using path.is_empty
  (which checks for an empty path '', not for an empty directory) fixed with
  patch 3/5
* noticed that the current gc-code removes orphaned files (a.k.a. files
  not hardlinked to a checksum file) in any case - so dropped the idea of
  an explicit command-line switch (as sync_pool calls gc on the target
  pool as well) - can gladly rework both to add this as explicit
  safe-guard, but currently do not think it has much merit
* patch 1/5 addresses the recent changes to proxmox-apt - I hope it's ok
  as is.
* patch 2/5 is unrelated, but it confused me enough while going through
  the code.

tested with a local setup.

original cover-letter for v1:

This patchset fixes a small glitch that we noticed in a pom-setup, creating
regular snapshots, without cleaning them up regularly.

Eventually medium sync becomes quite slow.
After removing many snapshots and running garbage collection both on the
mirror as well as on the medium the run-time for the sync still took quite
long. strace showed that the process still walked through the directories
for each snapshot on the medium - they were not cleaned up after all the
files inside were removed.

tested the patch locally (which is the reason for patch 1/2).


Stoiko Ivanov (5):
  bump proxmox-apt to 0.11 and adapt to changes.
  pool: drop superfluous check for impossible path combination
  pool: unlink_file: fix check for empty directory
  pool: gc: remove empty directories under link_dir
  pool: remove unused imports

 Cargo.toml     |  3 ++-
 debian/control |  3 ++-
 src/lib.rs     |  5 +++--
 src/mirror.rs  | 11 +++++------
 src/pool.rs    | 24 ++++++++++++++----------
 5 files changed, 26 insertions(+), 20 deletions(-)

-- 
2.39.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-07-10 10:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-09 10:47 [pve-devel] [PATCH proxmox-offline-mirror v2 0/5] remove snapshot directories vanished on source also on medium Stoiko Ivanov
2024-07-09 10:47 ` [pve-devel] [PATCH proxmox-offline-mirror v2 1/5] bump proxmox-apt to 0.11 and adapt to changes Stoiko Ivanov
2024-07-09 10:47 ` [pve-devel] [PATCH proxmox-offline-mirror v2 2/5] pool: drop superfluous check for impossible path combination Stoiko Ivanov
2024-07-09 10:47 ` [pve-devel] [PATCH proxmox-offline-mirror v2 3/5] pool: unlink_file: fix check for empty directory Stoiko Ivanov
2024-07-09 10:47 ` [pve-devel] [PATCH proxmox-offline-mirror v2 4/5] pool: gc: remove empty directories under link_dir Stoiko Ivanov
2024-07-09 10:47 ` [pve-devel] [PATCH proxmox-offline-mirror v2 5/5] pool: remove unused imports Stoiko Ivanov
2024-07-10 10:42 ` [pve-devel] applied-series: [PATCH proxmox-offline-mirror v2 0/5] remove snapshot directories vanished on source also on medium Fabian Grünbichler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal