From: Max Carrara <m.carrara@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: Re: [pbs-devel] [PATCH proxmox-backup v3 0/6] fix #3690: wipe disk
Date: Tue, 28 Nov 2023 15:38:03 +0100 [thread overview]
Message-ID: <ae77e1b6-c2ab-4ed6-aad5-3995185392dd@proxmox.com> (raw)
In-Reply-To: <20231128132323.162721-1-m.frank@proxmox.com>
On 11/28/23 14:23, Markus Frank wrote:
> Wipe a disk/partition like we do in PVE. (wipefs, dd, change_parttype to 0x83
> with sgdisk)
>
> v3:
> * rebase on master
> * added more informations to commit message
>
> v2:
> * change unwraps to matches
> * renamed regex
Looks pretty good overall to me; however, I do have a couple things to note:
* It's possible to also wipe individual partitions using this (as the code
suggests) so maybe a it would be beneficial or more user-friendly to change
the text of e.g. the button to "Wipe Partition" if the user clicks on a
partition instead of a disk? Or maybe just change it to "Wipe" to cover
both cases?
* An error will be thrown if one attempts do wipe a disk / partition that's
currently mounted:
# proxmox-backup-manager disk wipe sdd
wipe disk sdd
Wiping block device /dev/sdd
TASK ERROR: command "wipefs" "--all" "/dev/sdd1" "/dev/sdd" failed - status code: 1 - wipefs: error: /dev/sdd1: probing initialization failed: Device or resource busy
Maybe this case could be handled in a more user-friendly manner as well?
E.g. checking which disks / partitions are mounted first and then showing an
error with a more expressive message.
* There are a couple things clippy seems to complain about, but nothing that's
an immediate code smell.
Overall it looks pretty good to me though; the things I mentioned above are
somewhat bikesheddy can also be addressed in a follow-up.
Tested-by: Max Carrara <m.carrara@proxmox.com>
Reviewed-by: Max Carrara <m.carrara@proxmox.com>
>
> Markus Frank (6):
> fix #3690: pbs_api_types: add regex, format & schema for partition
> names to pbs-api-types
> fix #3690: tools: add wipe_blockdev & change_parttype rust equivalent
> fix #3690: api: add function wipe_disk
> fix #3690: cli: add function wipe_disk
> fix #3690: ui: enable wipe disk in StorageAndDisks
> tools: prohibit disk wipe of EFI partition
>
> pbs-api-types/src/lib.rs | 10 ++
> src/api2/node/disks/mod.rs | 53 +++++++++-
> src/bin/proxmox_backup_manager/disk.rs | 38 ++++++-
> src/tools/disks/mod.rs | 138 ++++++++++++++++++++++++-
> www/Utils.js | 1 +
> www/panel/StorageAndDisks.js | 1 +
> 6 files changed, 232 insertions(+), 9 deletions(-)
>
prev parent reply other threads:[~2023-11-28 14:38 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-28 13:23 Markus Frank
2023-11-28 13:23 ` [pbs-devel] [PATCH proxmox-backup v3 1/6] fix #3690: pbs_api_types: add regex, format & schema for partition names to pbs-api-types Markus Frank
2023-11-28 17:41 ` [pbs-devel] applied: " Thomas Lamprecht
2023-11-28 13:23 ` [pbs-devel] [PATCH proxmox-backup v3 2/6] fix #3690: tools: add wipe_blockdev & change_parttype rust equivalent Markus Frank
2023-11-28 17:42 ` [pbs-devel] applied: " Thomas Lamprecht
2023-11-28 13:23 ` [pbs-devel] [PATCH proxmox-backup v3 3/6] fix #3690: api: add function wipe_disk Markus Frank
2023-11-28 17:42 ` [pbs-devel] applied: " Thomas Lamprecht
2023-11-28 13:23 ` [pbs-devel] [PATCH proxmox-backup v3 4/6] fix #3690: cli: " Markus Frank
2023-11-28 17:43 ` [pbs-devel] applied: " Thomas Lamprecht
2023-11-28 13:23 ` [pbs-devel] [PATCH proxmox-backup v3 5/6] fix #3690: ui: enable wipe disk in StorageAndDisks Markus Frank
2023-11-28 17:44 ` [pbs-devel] applied: " Thomas Lamprecht
2023-11-28 13:23 ` [pbs-devel] [PATCH proxmox-backup v3 6/6] tools: prohibit disk wipe of EFI partition Markus Frank
2023-11-28 17:48 ` Thomas Lamprecht
2023-11-28 21:56 ` Roland
2023-11-28 14:20 ` [pbs-devel] [PATCH proxmox-backup v3 0/6] fix #3690: wipe disk Lukas Wagner
2023-11-28 14:38 ` Max Carrara [this message]
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=ae77e1b6-c2ab-4ed6-aad5-3995185392dd@proxmox.com \
--to=m.carrara@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