[pbs-devel] [PATCH proxmox-backup 05/23] api2: admin: add (un)mount endpoint for removable datastores
Hannes Laimer
h.laimer at proxmox.com
Thu Sep 21 09:50:41 CEST 2023
On 9/19/23 15:38, Lukas Wagner wrote:
>
>
> On 9/15/23 08:54, Hannes Laimer wrote:
>> +pub fn do_mount_device(
>> + datastore.set_maintenance_mode(None);
>
> I think this overrides existing maintenance modes... e.g. if a datastore
> is 'read-only', unmounted and mounted again, then the 'read-only' mode
> will be gone.
>
Yes, it does. Why should it not? The only situation where that could be
a problem is if a removable datastore should not be written to at all,
so it would either be unplugged or ro. But in this case, why setup sync
jos or backups to a datastore that should not be written to in the first
place?
>> + config.set_data(&datastore.name, "datastore", &datastore)?;
>> + pbs_config::datastore::save_config(&config)?;
>> +
>> + Ok(())
>> + } else {
>> + Err(format_err!(
>> + "Datastore '{}' can't be mounted because it is not
>> removable.",
>> + &datastore.name
>> + ))
>> + }
>> +}
>> +
>
>
More information about the pbs-devel
mailing list