public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Lukas Wagner <l.wagner@proxmox.com>
To: Proxmox Backup Server development discussion
	<pbs-devel@lists.proxmox.com>,
	Hannes Laimer <h.laimer@proxmox.com>
Subject: Re: [pbs-devel] [PATCH proxmox-backup v14 00/26] add removable datastores
Date: Mon, 25 Nov 2024 14:15:42 +0100	[thread overview]
Message-ID: <064ff027-e4c2-4909-9365-659da6dd1fd3@proxmox.com> (raw)
In-Reply-To: <20241122144713.299130-1-h.laimer@proxmox.com>

On  2024-11-22 15:46, Hannes Laimer wrote:
> These patches add support for removable datastores. All removable
> datastores have a backing-device(a UUID) associated with them. Removable
> datastores work like normal ones, just that they can be unplugged. It is
> possible to create a removable datastore, sync backups onto it, unplug
> it and use it on a different PBS.
> 
> The datastore path specified is relative to the root of the used device.
> Removable datastores are bind mounted to /mnt/datastore/<NAME>.
> Multiple datastores can be created on a single device, but only device with 
> a single datastore on them will be auto-mounted.
> 
> When a removable datastore is deleted and 'destroy-data' is set, the
> device has to be mounted. If 'destroy-data' is not set the datastore
> can be deleted even if the device is not present. Removable datastores
> are automatically mounted when plugged in. 
> 

Tested these patches against the latest state on master. Works fine generally,
but there were a couple of rough edges that were at least unexpected (at least to me, not being
very familiar with this new feature)

In no particular order, they were:

- When creating a removable datastore, it struck me as odd that the "On device path" has to be absolute
  (start with a /), considering that the path you enter is relative to the root directory of the
  partition.

- a removable datastore cannot be ZFS. I guess there are technical reasons for this, but it was a
  bit unexpected, especially considering that you can create a non-removable datastore on ZFS without
  any issues. Maybe the docs could give some background on this, or at least mention that
  removable datastores cannot be created on ZFS formatted disks

- ran into an issue with the 'unmounting' maintenance mode. I pressed 'unmount' in the UI.
  One of my bash session still had its working directory in the mounted datastore, leading to umount failing
  with a 'device busy' message. After this, the datastore was in the 'unmounting' maintenance mode
  which I could not clear anymore, neither through the UI, nor through the proxmox-backup-manager
  CLI tool. Eventually I had to remove the `maintenance-mode` line from `datastores.cfg` by hand.

- When a datastore is unmounted, accessing the GC job view or content view, the system logs are spammed by HTTP 400 error messages, e.g.

    GET /api2/json/admin/datastore/disk2/status: 400 Bad Request: [client [::xxxxxxxxx]:34382] datastore 'disk2' is not mounted
  
  Might be annoying and/or confusing for system admins looking through the logs when they debug some other issue.

- Similarly, if a removeable-datastore is added as a storage in PVE, pvestatd logs errors every 10 seconds if the
  datastore is not mounted. Not sure if this is possible, but maybe we could handle this more graceful to not
  spam the logs?

- Something that also was a bit confusing was the following:
  - Attached new disk to my PBS test VM
  - Formatted the disk as ext4 using the webui (name: disk1, device: sdb1), opting to NOT create a datastore as part of the formatting process
  - Created a removable datastore on the new partition (name: disk1-store, device: sdb1)
  -> This led to the partition being mounted twice:

/dev/sdb1 on /mnt/datastore/disk1 type ext4 (rw,relatime)
/dev/sdb1 on /mnt/datastore/disk1-store type ext4 (rw,relatime)

  -> if 'unmount' is pressed for the datastore, only the second mount is unmounted. This could be confusing
    to users who expect to be able to safely remove the disk after unmounting the datastore.

  - For contrast, if while creating the partition one opts to create the removable datastore immediately,
    the partition is only mounted once.


- Also, when trying to mount a datastore without the disk being available, the error message in the task
  log might not be super clear to some users:

TASK ERROR: mounting to tmp path failed: command "mount" "UUID=a264c664-9e0e-47ad-abf5-960e0aabfe0b" "/run/proxmox-backup/mount/5292c7d2-a54b-42f1-be87-88810b2e90cd" failed - status code: 1 - mount: /run/proxmox-backup/mount/5292c7d2-a54b-42f1-be87-88810b2e90cd: can't find UUID=a264c664-9e0e-47ad-abf5-960e0aabfe0b.)

  Maybe we could add clearer error messages for the more common error cases, like disks being not available?


I don't think any of these are blockers, but nevertheless I thought I'd bring these up.

-- 
- Lukas


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


  parent reply	other threads:[~2024-11-25 13:15 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-22 14:46 Hannes Laimer
2024-11-22 14:46 ` [pbs-devel] [PATCH proxmox-backup v14 01/25] pbs-api-types: add backing-device to DataStoreConfig Hannes Laimer
2024-11-25 13:40   ` Fabian Grünbichler
2024-11-22 14:46 ` [pbs-devel] [PATCH proxmox-backup v14 02/25] maintenance: make is_offline more generic Hannes Laimer
2024-11-22 14:46 ` [pbs-devel] [PATCH proxmox-backup v14 03/26] maintenance: add 'Unmount' maintenance type Hannes Laimer
2024-11-22 14:46 ` [pbs-devel] [PATCH proxmox-backup v14 04/25] datastore: add helper for checking if a datastore is mounted Hannes Laimer
2024-11-22 14:46 ` [pbs-devel] [PATCH proxmox-backup v14 05/25] api: admin: add (un)mount endpoint for removable datastores Hannes Laimer
2024-11-25 13:24   ` Fabian Grünbichler
2024-11-22 14:46 ` [pbs-devel] [PATCH proxmox-backup v14 06/25] api: removable datastore creation Hannes Laimer
2024-11-25 13:40   ` Fabian Grünbichler
2024-11-22 14:46 ` [pbs-devel] [PATCH proxmox-backup v14 07/25] api: add check for nested datastores on creation Hannes Laimer
2024-11-25 13:44   ` Fabian Grünbichler
2024-11-25 14:48     ` Hannes Laimer
2024-11-25 14:53       ` Fabian Grünbichler
2024-11-22 14:46 ` [pbs-devel] [PATCH proxmox-backup v14 08/25] pbs-api-types: add mount_status field to DataStoreListItem Hannes Laimer
2024-11-22 14:46 ` [pbs-devel] [PATCH proxmox-backup v14 09/26] bin: manager: add (un)mount command Hannes Laimer
2024-11-22 14:46 ` [pbs-devel] [PATCH proxmox-backup v14 10/25] add auto-mounting for removable datastores Hannes Laimer
2024-11-25 13:47   ` Fabian Grünbichler
2024-11-22 14:46 ` [pbs-devel] [PATCH proxmox-backup v14 11/25] datastore: handle deletion of removable datastore properly Hannes Laimer
2024-11-22 14:46 ` [pbs-devel] [PATCH proxmox-backup v14 12/25] docs: add removable datastores section Hannes Laimer
2024-11-22 14:47 ` [pbs-devel] [PATCH proxmox-backup v14 13/26] ui: add partition selector form Hannes Laimer
2024-11-22 14:47 ` [pbs-devel] [PATCH proxmox-backup v14 14/26] ui: add removable datastore creation support Hannes Laimer
2024-11-25 12:44   ` Dominik Csapak
2024-11-22 14:47 ` [pbs-devel] [PATCH proxmox-backup v14 15/26] ui: add (un)mount button to summary Hannes Laimer
2024-11-25 13:00   ` Dominik Csapak
2024-11-22 14:47 ` [pbs-devel] [PATCH proxmox-backup v14 16/26] ui: tree: render unmounted datastores correctly Hannes Laimer
2024-11-25  8:47   ` [pbs-devel] [PATCH proxmox-backup v14] fixup! " Hannes Laimer
2024-11-25 13:06     ` Dominik Csapak
2024-11-22 14:47 ` [pbs-devel] [PATCH proxmox-backup v14 17/26] ui: utils: make parseMaintenanceMode more robust Hannes Laimer
2024-11-22 14:47 ` [pbs-devel] [PATCH proxmox-backup v14 18/26] ui: add datastore status mask for unmounted removable datastores Hannes Laimer
2024-11-22 14:47 ` [pbs-devel] [PATCH proxmox-backup v14 19/26] ui: maintenance: fix disable msg field if no type is selected Hannes Laimer
2024-11-25 13:23   ` Dominik Csapak
2024-11-22 14:47 ` [pbs-devel] [PATCH proxmox-backup v14 20/26] ui: render 'unmount' maintenance mode correctly Hannes Laimer
2024-11-25 13:24   ` Dominik Csapak
2024-11-22 14:47 ` [pbs-devel] [PATCH proxmox-backup v14 21/25] api: node: allow creation of removable datastore through directory endpoint Hannes Laimer
2024-11-22 14:47 ` [pbs-devel] [PATCH proxmox-backup v14 22/25] api: node: include removable datastores in directory list Hannes Laimer
2024-11-22 14:47 ` [pbs-devel] [PATCH proxmox-backup v14 23/26] node: disks: replace BASE_MOUNT_DIR with DATASTORE_MOUNT_DIR Hannes Laimer
2024-11-22 14:47 ` [pbs-devel] [PATCH proxmox-backup v14 24/26] ui: support create removable datastore through directory creation Hannes Laimer
2024-11-25 13:28   ` Dominik Csapak
2024-11-25 16:21     ` Hannes Laimer
2024-11-22 14:47 ` [pbs-devel] [PATCH proxmox-backup v14 25/26] bin: debug: add inspect device command Hannes Laimer
2024-11-22 14:47 ` [pbs-devel] [PATCH proxmox-backup v14 26/26] api: disks: only return UUID of partitions if it actually is one Hannes Laimer
2024-11-25  6:19 ` [pbs-devel] [PATCH proxmox-backup v14 00/26] add removable datastores Hannes Laimer
2024-11-25 13:15 ` Lukas Wagner [this message]
2024-11-25 13:32   ` Dominik Csapak

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=064ff027-e4c2-4909-9365-659da6dd1fd3@proxmox.com \
    --to=l.wagner@proxmox.com \
    --cc=h.laimer@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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal