From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 1E6FF1FF173 for ; Mon, 25 Nov 2024 14:15:48 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 79A1213477; Mon, 25 Nov 2024 14:15:45 +0100 (CET) Message-ID: <064ff027-e4c2-4909-9365-659da6dd1fd3@proxmox.com> Date: Mon, 25 Nov 2024 14:15:42 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Proxmox Backup Server development discussion , Hannes Laimer References: <20241122144713.299130-1-h.laimer@proxmox.com> Content-Language: de-AT, en-US From: Lukas Wagner In-Reply-To: <20241122144713.299130-1-h.laimer@proxmox.com> X-SPAM-LEVEL: Spam detection results: 0 AWL 0.007 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: Re: [pbs-devel] [PATCH proxmox-backup v14 00/26] add removable datastores X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox Backup Server development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pbs-devel-bounces@lists.proxmox.com Sender: "pbs-devel" 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/. > 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