From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id 3C4561FF0BC for ; Thu, 29 Oct 2026 02:42:43 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 9265D2140D; Thu, 29 Oct 2026 02:42:39 +0100 (CET) From: Kefu Chai To: pve-devel@lists.proxmox.com, Parker Wahle Subject: Re: [PATCH manager] fix #8193: ceph: pool set: keep min_size when changing size Date: Thu, 29 Oct 2026 09:42:31 +0800 Message-ID: <20261029014231.3018868-1-k.chai@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261018205203.654-2-regulad@regulad.xyz> References: <20261018205203.654-2-regulad@regulad.xyz> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1793238154595 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.275 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: KZSKM2U3AD3OZPK2L3H3SJCQ5TDTPJL7 X-Message-ID-Hash: KZSKM2U3AD3OZPK2L3H3SJCQ5TDTPJL7 X-MailFrom: k.chai@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Sun Oct 18, 2026 at 10:52 PM CEST, Parker Wahle wrote: [snip] > @@ -304,6 +304,8 @@ sub set_pool { > print "$err"; > } else { > delete $param->{$setting}; > + # Ceph resets min_size when size changes, so re-read before comparing the rest > + $current_properties = get_pool_properties($pool, $rados) if $setting eq 'size'; > } > } Thanks for tracking this down! I could reproduce it on a three-node lab cluster running Ceph 21.1.2, with osd_pool_default_min_size = 2. Without the patch, both of your examples lose the requested min_size: - a 2/1 pool set to size=3 min_size=1 ends up with min_size 2 - a 4/3 pool set to size=3 min_size=3 ends up with min_size 2 With the patch, both keep the min_size that was asked for. I also tried changing only the size, which still gives Ceph's default min_size, and changing only min_size, which works as before. The pool is only re-read when the size actually changes, which seems fine to me. Tested-by: Kefu Chai Reviewed-by: Kefu Chai