From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <pve-devel-bounces@lists.proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
	by lore.proxmox.com (Postfix) with ESMTPS id 1136E1FF16E
	for <inbox@lore.proxmox.com>; Mon, 14 Apr 2025 14:20:57 +0200 (CEST)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
	by firstgate.proxmox.com (Proxmox) with ESMTP id C82F03204D;
	Mon, 14 Apr 2025 14:20:54 +0200 (CEST)
Mime-Version: 1.0
Date: Mon, 14 Apr 2025 14:20:51 +0200
Message-Id: <D96CVFBQYCSX.2Y15ERDS92967@proxmox.com>
To: "Daniel Kral" <d.kral@proxmox.com>
From: "Christoph Heiss" <c.heiss@proxmox.com>
X-Mailer: aerc 0.20.1
References: <20250110170040.201474-1-d.kral@proxmox.com>
In-Reply-To: <20250110170040.201474-1-d.kral@proxmox.com>
X-SPAM-LEVEL: Spam detection results:  0
 AWL 0.030 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: [pve-devel] [RFC PATCH 1/2] install: btrfs: fix raid level
 falling back to single mode
X-BeenThere: pve-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/>
List-Post: <mailto:pve-devel@lists.proxmox.com>
List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe>
Reply-To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Cc: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: pve-devel-bounces@lists.proxmox.com
Sender: "pve-devel" <pve-devel-bounces@lists.proxmox.com>

On Fri Jan 10, 2025 at 6:00 PM CET, Daniel Kral wrote:
> From a user's perspective, the BTRFS single mode has been removed since
> d85180e ("tui: rename raid levels 0/1 to align with GUI installer"). The
> user can now only select at least the "RAID0" level, but if a user
> selects any raid level with only one disk configured on the system,
> BTRFS will be setup in 'single' mode instead of the chosen raid level.
>
> The TUI installer has a separate check for this, but the GUI installer
> as well as the auto installer will silently fallback to single mode,
> which could be confusing for and unwanted by the user.
>
> Therefore, remove the BTRFS single mode from being selected when
> configuring disks in the GUI installer and during the installation in
> general, which makes the auto installer fail if the wrong amount of
> disks are selected for the specified raid level. This makes btrfs' raid
> disk count validation align with the one from zfs.
>
> Signed-off-by: Daniel Kral <d.kral@proxmox.com>

Tested this patch with GUI, TUI and auto installer, whether they all now
properly reject invalid configurations for each RAID mode. I.e. for
RAID0 <1 disks, RAID1 <2 disks and RAID10 <4 disks. Tested each also
with exactly one disk, of course.

Please consider this patch:

Tested-by: Christoph Heiss <c.heiss@proxmox.com>
Reviewed-by: Christoph Heiss <c.heiss@proxmox.com>

FWIW and completeness: `proxmox-auto-install-assistant validate-answer`
does not (yet) check the filesystem configuration, but the
auto-installer will still fail on invalid configuration as expected.
Michael is working on improving the former, tho.

> ---
>
> Discussion
>
> BTRFS didn't allow a single-disk RAID0 configuration before kernel 5.15
> and AFAIK also silently used the single profile for that case, but this
> has changed since then.
>
> If we want users to still be able to create a BTRFS filesystem in single
> mode (which seems very reasonable), I can do a v2 or followup to add a
> "btrfs (single)" entry to the disk setup.

I think it's fine as it currently is, i.e. we don't really need the
extra single mode.
Since it is supported to create single-disk RAID0 setups
and doesn't result in a degraded state or similar, it is nice to have
a) the simplicity of having one entry/filesystem type less and
b) being consistent with the ZFS side of things on that matter.



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