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 CBD411FF15C for ; Fri, 25 Jul 2025 11:59:59 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id D88D714A31; Fri, 25 Jul 2025 12:01:20 +0200 (CEST) Date: Fri, 25 Jul 2025 11:00:40 +0100 To: Proxmox VE development discussion MIME-Version: 1.0 Message-ID: List-Id: Proxmox VE development discussion List-Post: From: Joao Sousa via pve-devel Precedence: list Cc: Joao Sousa X-Mailman-Version: 2.1.29 X-BeenThere: pve-devel@lists.proxmox.com List-Subscribe: , List-Unsubscribe: , List-Archive: Reply-To: Proxmox VE development discussion List-Help: Subject: [pve-devel] [RFC storage/qemu-server] Thin provisioning on LVM Content-Type: multipart/mixed; boundary="===============1590724867250790199==" Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" --===============1590724867250790199== Content-Type: message/rfc822 Content-Disposition: inline Return-Path: X-Original-To: pve-devel@lists.proxmox.com Delivered-To: pve-devel@lists.proxmox.com Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 797F3C9D83 for ; Fri, 25 Jul 2025 12:01:19 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 58A3414A17 for ; Fri, 25 Jul 2025 12:00:49 +0200 (CEST) Received: from eurotux.com (mail.eurotux.com [185.98.249.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Fri, 25 Jul 2025 12:00:48 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by eurotux.com (Postfix) with ESMTP id 4CD7830CCA60; Fri, 25 Jul 2025 11:00:41 +0100 (WEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eurotux.com; h= content-transfer-encoding:content-type:content-type :content-language:subject:subject:from:from:user-agent :mime-version:date:date:message-id; s=default; t=1753437640; x= 1755252041; bh=zPjhCjCpitiRrCyLutCCJAmsPTxeuSaL4KoNswAterE=; b=2 RoCsgjdEzf1DMZLuTGh0bASP0iZZfHmvjQS6T7lk77E0fk8JFqoLdcVSWJqhJNOB pKqOwBAmhiTvRk6qZOjfum5wpNnZ7iHQfIgqwqV+iBryGh20Ph9ARBxPLt4lTckV o2ijvWrjCeygatzw6ozXef1OC5JMXwQBcuSC05NWVD9Tz5sM0nfNzolCY6ljFNtN qA8K6nLQRjbjDOqjoFQzEt7mA5M5kzSqpEREL22Uer2rRNLAiG0CKuqAi8wwbx3w PbJcmXh6hN47eZo9HTbvexgWt4zhlcvsOusjDF6QnxkIgrCI1UvaPKN7Ac9pw63V jaGS6by3FhGtiMbGi/OfQ== X-Virus-Scanned: amavisd-new at mail.prd.eurotux.pt Received: from eurotux.com ([127.0.0.1]) by localhost (mail.prd.eurotux.pt [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 8HBkGWHd7cNV; Fri, 25 Jul 2025 11:00:40 +0100 (WEST) Received: from [192.168.1.213] (unknown [161.230.225.89]) (Authenticated sender: joao.sousa@eurotux.com) by eurotux.com (Postfix) with ESMTPSA id 9DFEA30508B9; Fri, 25 Jul 2025 11:00:40 +0100 (WEST) Message-ID: <1b1df67f-4c6a-4cf5-942f-b2ed752506a6@eurotux.com> Date: Fri, 25 Jul 2025 11:00:40 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Joao Sousa Subject: [RFC storage/qemu-server] Thin provisioning on LVM Content-Language: en-US To: Proxmox VE development discussion Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-SPAM-LEVEL: Spam detection results: 0 AWL 0.073 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain DMARC_PASS -0.1 DMARC pass policy RCVD_IN_MSPIKE_H2 0.001 Average reputation (+2) 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_PASS -0.001 SPF: HELO matches SPF record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [eurotux.com] Hi, As previously discussed with Alexandre, we talked about an architecture=20 that enables the use of thin-provisioned LVs with LVM. The idea is to=20 implement a daemon that processes LV extend requests from a queue. We considered two possible implementations for the queue and the daemon: 1. One queue and daemon per node. This approach increases complexity,=20 particularly for live migrations and node failures. If a node fails,=20 other nodes would need to "steal" pending requests from the failed=20 node=E2=80=99s queue. It also introduces challenges in preserving the exe= cution=20 order of extend operations, since multiple daemons would compete for a=20 storage lock without a guaranteed order. 2. A centralized queue in /etc/pve and one daemon per node. Each daemon=20 would check the first entry in the queue and process the extend request=20 only if the target volume is local to that node. This approach is=20 simpler and easier to manage. However, we=E2=80=99d need to ensure proper= =20 locking when writing to the queue. Is there a C-based alternative to=20 cfs_lock_file that we can use to coordinate writes to the queue from=20 qmeventd and pvestatd? For both implementations, we need to configure a write threshold for=20 each VM's block devices. When this threshold is reached, it should=20 trigger an event that qmeventd catches. As a fallback, if a VM is locked=20 due to an I/O error, pvestatd should also submit an extend request. This=20 one should be prioritized by placing it at the front of the queue. The write threshold must be applied to the top node of the block device=20 chain (drive-$drive_id) during the QemuServer::Blockdev::attach function=20 when the VM starts. It should also be updated each time the volume is=20 extended, so the daemon must reset it accordingly. Here=E2=80=99s a simplified flow of the architecture: qemu -> qmeventd -> extend_queue <- storage_monitor_daemon -> pvestatd I=E2=80=99m currently implementing the write threshold in the attach func= tion=20 but running into issues with debugging. Are there any recommended=20 methods or tools for debugging qemu-server functions? I=E2=80=99m not see= ing any=20 relevant logs in syslog. --===============1590724867250790199== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel --===============1590724867250790199==--