From: Aaron Lauterer <a.lauterer@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH] api: removable datastore: downgrade device already mounted error to info
Date: Wed, 27 Nov 2024 11:42:35 +0100 [thread overview]
Message-ID: <20241127104235.154875-1-a.lauterer@proxmox.com> (raw)
pbs-datastore::datastore::is_datastore_mounted_at() verifies that the
mounted file system has the expected UUID. Therefore we don't have to
error out if we try to mount an already mounted removable datastore.
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
---
src/api2/admin/datastore.rs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/api2/admin/datastore.rs b/src/api2/admin/datastore.rs
index cae7eb89..3f794e83 100644
--- a/src/api2/admin/datastore.rs
+++ b/src/api2/admin/datastore.rs
@@ -2448,10 +2448,11 @@ fn setup_mounted_device(datastore: &DataStoreConfig, tmp_mount_path: &str) -> Re
pub fn do_mount_device(datastore: DataStoreConfig) -> Result<(), Error> {
if let Some(uuid) = datastore.backing_device.as_ref() {
if pbs_datastore::get_datastore_mount_status(&datastore) == Some(true) {
- bail!(
+ info!(
"device is already mounted at '{}'",
datastore.absolute_path()
);
+ return Ok(());
}
let tmp_mount_path = format!(
"{}/{:x}",
--
2.39.5
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
next reply other threads:[~2024-11-27 10:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-27 10:42 Aaron Lauterer [this message]
2024-11-27 11:50 ` [pbs-devel] applied: " Thomas Lamprecht
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=20241127104235.154875-1-a.lauterer@proxmox.com \
--to=a.lauterer@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