From: Stefan Reiter <s.reiter@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [RFC 0/2] Implement 'map' subcommand to access raw backup images
Date: Mon, 17 Aug 2020 16:13:37 +0200 [thread overview]
Message-ID: <20200817141339.16115-1-s.reiter@proxmox.com> (raw)
NOTE: The two patches in this series are mutually exclusive, they cannot be
applied at the same time. Both versions do almost exactly the same thing from a
user perspective, but implemented differently.
The first one is a v2 of my previous work[0] using FUSE and a loop device, the
second one achieves the same thing via an NBD server.
In comparison to the FUSE version, the NBD one
* requires less code
* gets away without the complex async stuff needed for concurrent loopdev/FUSE
but
* adds a new dependency, nbd-async[1]
* AFAICT does not have a way to mark the block device as read-only (i.e. can
only discard writes, but not set the flag), leading to some weird error
messages when using the device from user space tools (e.g. mount without
explicit "-o ro[,noload]")
* requires the user the choose which /dev/nbdX to assign to manually
* needs a kernel module which is typically not auto-loaded
* uses NBD, which I personally don't really like ;)
Performance wise both are exactly the same (on my machine).
[0] https://lists.proxmox.com/pipermail/pbs-devel/2020-August/000307.html
[1] nbd-async needs to be modified slightly, since
a) it uses [profile.release.build-override] which debcargo doesn't seem to
like
b) it depends on "nix 0.17" in upstream, while only 0.16 is packaged for
debian - it does appear to work with 0.16 just as well though, which is
how I tested it
proxmox-backup: Stefan Reiter (1):
client: implement map/unmap commands for .img backups
src/bin/proxmox-backup-client.rs | 2 +
src/bin/proxmox_backup_client/mount.rs | 175 ++++++++++++++---
src/tools.rs | 2 +
src/tools/fuse_loop.rs | 258 +++++++++++++++++++++++++
src/tools/loopdev.rs | 93 +++++++++
5 files changed, 506 insertions(+), 24 deletions(-)
create mode 100644 src/tools/fuse_loop.rs
create mode 100644 src/tools/loopdev.rs
--
2.20.1
next reply other threads:[~2020-08-17 14:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-17 14:13 Stefan Reiter [this message]
2020-08-17 14:13 ` [pbs-devel] [RFC v2 proxmox-backup 1/2 (fuse)] client: implement map/unmap commands for .img backups Stefan Reiter
2020-08-17 14:13 ` [pbs-devel] [RFC proxmox-backup 2/2 (nbd)] " Stefan Reiter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200817141339.16115-1-s.reiter@proxmox.com \
--to=s.reiter@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox