Bug 209940 - FreeBSD installer for ZFS destroys RAID and fails (and hangs)
Summary: FreeBSD installer for ZFS destroys RAID and fails (and hangs)
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: amd64 Any
: --- Affects Some People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-01 16:14 UTC by elofu17
Modified: 2020-07-11 15:04 UTC (History)
1 user (show)

See Also:


Attachments
GEOM error in the FreeBSD installer during ZFS install (39.38 KB, image/jpeg)
2016-06-01 16:14 UTC, elofu17
no flags Details
Debug-screen in the FreeBSD installer during ZFS install (81.45 KB, image/jpeg)
2016-06-01 16:16 UTC, elofu17
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description elofu17 2016-06-01 16:14:26 UTC
Created attachment 170919 [details]
GEOM error in the FreeBSD installer during ZFS install

In the FreeBSD 10.1 installer, I can't install FreeBSD using ZFS on a BIOS Software RAID1 volume.
When the installer tries to handle the raid/r0 device (gpart, etc), it destroys the RAID and then shows an error message, and the installer fail.

Therefore I downloaded the latest FreeBSD-11.0-ALPHA1-amd64-20160528-r300895-disc1.iso to see if the latest version of FreeBSD behave better.
Unfortunetly it doesn't.


How to reproduce:
Boot a machine (in my case a Supermicro) with two harddrives.
Enter BIOS setup and configure the SATA controller as a RAID controller.
Reboot and press ctrl-i to enter the "Intel Software RAID" setup.
Create a RAID1 volume containing the two HDDs.
Boot the FreeBSD 11.0 installer, select keyboard, enter a hostname and clear all distribution packages.
Now choose to install using ZFS.
Under 'Pool Type/Disks:', select "stripe" and then select the RAID1 volume "raid/r0", like this:
[ ] ada0
[ ] ada1
[x] raid/r0
The ZFS-installer now says "stripe: 1 disks" which is correct, so proceed with the installation.
Are you sure? Yes

Now the same thing happens as in 10.1:
The Intel software RAID1 you just created is destroyed.
On FreeBSD 11.0, nothing more happen. The installer has stopped. No error messages, no nothing. (see attachment #1 [details]: geom.jpg and #2: the debug-screen (alt-F3) of the installer)

(For your information: On FreeBSD 10.1 the same thing happens (the raid is destroyed), but at least an error is generated, so one can exit the installer. On FreeBSD 11.0 the installer just hangs.)



What I expected/wanted:
I wanted FreeBSD 11.0 to be installed onto my soft RAID1 volume as an ordinary striped ZFS.

(
I want to use a standard RAID1 of two full disks.
I do not want to use ZFS mirror since this is not full disk duplication, and the recovery of a broken ZFS-mirror-disk is a much bigger hassle (manually duplicate partition structures, manually save a bootloader, manually resilver the zfs-mirror) than recovering an ordinary RAID1 disk.
I want ZFS, so using UFS instead is not a workaround.
)


Can this problem in the ZFS-installer please be fixed before the official FreeBSD 11.0 is released?
Comment 1 elofu17 2016-06-01 16:16:35 UTC
Created attachment 170920 [details]
Debug-screen in the FreeBSD installer during ZFS install
Comment 2 Allan Jude freebsd_committer 2016-06-13 23:21:02 UTC
This is a really poor configuration. You really should use ZFS's mirroring rather than the BIOS RAID1.

The main reason is that if ZFS finds a checksum error, but is only configured as a stripe across a single virtual disk (the RAID1), then it will not be able to correct the error. ZFS also has a better load balancing algorithm for using the mirrored disks when it controls the mirror.


I will investigate this bug, but the ZFS portion of the installer is not intended to be used with graid, but rather in place of it.
Comment 3 elofu17 2016-06-14 18:52:37 UTC
Hi.

I'm well aware that ZFS mirroring is better.
In this case however, I'm more interested in simple full-disk mirroring and automatic/easy recovery.

(Like in a test lab... Install FreeBSD on a test-machine with a RAID1 (bay0 and bay1 disks). Pull out the bay1 disk and insert a fresh disk. It will automatically synchronize. Pull this disk. Update the system on the bay0 disk for test case #1. Pull it out and insert bay1. Update this system for test case #2. Perform tests back and forth. Plugin and boot on the first disk (from bay1) to revert back to the original state, or easily create a test case #3, or insert it into a another test machine and make it a clone of the first machine.
No need for dd-images, no need for bootable USB-sticks or simillar. Just swap around the disks in the test machines.)


So when performance, error correction, etc is not important, it would be nice if the installer could install a ZFS system on a BIOS software RAID1.
Comment 4 elofu17 2016-08-09 18:44:14 UTC
PS: When I say that the RAID is destroyed, I mean it, literally.
Not only does the FreeBSD installer fail to install a ZFS filesystem on my software RAID, it also wipes my RAID configuration.

In my eyes this is a critical bug that also need to be fixed.
A failed ZFS install should not end up in a system where the RAID setup is wiped.

So this ticket have two sub tasks:
* allow users to install ZFS on a software RAID
* never destroy the RAID
Comment 5 Allan Jude freebsd_committer 2020-07-11 15:04:28 UTC
I am not interested in trying to fix this unsupported configuration