ZFS - config.xml recovery fails
-
Testing pfSense-CE-memstick-serial-2.5.2-BETA-amd64-20210604-0300 on an APU2E4
ZFS install defaults to a pool name of pfSense instead of zroot as previously.
If this default is accepted, subsequent reinstallation selecting 'Recover config.xml from a previous install' fails as the script appears to be looking for pool 'zroot' and not 'pfSense':
Attempting to recover config.xml from ada0p3. ZFS NOTICE: Prefetch is disabled by default if less than 4GB of RAM is present; to enable, add "vfs.zfs.prefetch_disable=0" to /boot/loader.conf. ZFS filesystem version: 5 ZFS storage pool version: features support (5000) cannot import 'zroot': no such pool available mount: zroot/ROOT/default: No such file or directory ada0p3 does not contain a readable config.xml for recovery.
-
@bigsy Just a quick question: if one modifies the pool name to zroot - does it work then?
-
@jegr I hadn't tried that until now but it doesn't seem to work. I changed the pool name to zroot for installation, and then later tried to reinstall with the config recovery option.
First time round this was the message:
Attempting to recover config.xml from ada0p3. ZFS NOTICE: Prefetch is disabled by default if less than 4GB of RAM is present; to enable, add "vfs.zfs.prefetch_disable=0" to /boot/loader.conf. ZFS filesystem version: 5 ZFS storage pool version: features support (5000) ada0p3 does not contain a readable config.xml for recovery. mkdir: /tmp/bsdinstall_etc: File exists
and on subsequent attempts:
Attempting to recover config.xml from ada0p3. kldload: can't load zfs: module already loaded or in kernel cannot import 'zroot': a pool with that name is already created/imported, and no additional pools with that name were found mount: zroot/ROOT/default: Device busy ada0p3 does not contain a readable config.xml for recovery. mkdir: /tmp/bsdinstall_etc: File exists
As a sanity check I then did a default install/reinstall with 2.4.5p1, and the config recovery works as expected in this version:
Attempting to recover config.xml from ada0p3. ZFS NOTICE: Prefetch is disabled by default if less than 4GB of RAM is present; to enable, add "vfs.zfs.prefetch_disable=0" to /boot/loader.conf. ZFS filesystem version: 5 ZFS storage pool version: features support (5000) Recovered config.xml from ada0p3, stored in /tmp/recovered_config. Warning: memory type solaris leaked memory on destroy (11 allocations, 2880 bytes leaked). mkdir: /tmp/bsdinstall_etc: File exists
And upgrading 2.4.5p1 to 2.5.2-beta also picks up the config.xml correctly.
-
@bigsy Huh... OK that looks strange. Was hoping, it's something one could workaround by using the old pool name so the importer can read it later. But seems something ZFS related is bonkers in 2.5.2betas
-
We're working on making a more optimal ZFS filesystem layout and that's something we haven't accounted for yet in the recovery script.
That said, at this point most people who would need the recovery feature would be recovering from older installs which still have the old zroot name, so it needs to try both.
-
-
@jimp is "more optimal layout" a step towards making use of things like snapshots or file mirroring feature of the filesystem? Especially snapshots and using them in bigger updates to roll back would be a big help in remote locations to have another safety net available :)
-
Not quite ready to share all the details yet, but it is progress in making ZFS more "officially supported" in its integration compared to its more experimental nature in past releases.
Since the layout can't be changed post-install, the groundwork needs to be laid there early.