Bug 204698 - The default ZFS filesystem layout created by the 9.3 installer is not beadm-friendly
Summary: The default ZFS filesystem layout created by the 9.3 installer is not beadm-f...
Status: Closed Not A Bug
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 9.3-RELEASE
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-sysinstall (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-20 11:17 UTC by Victor Sudakov
Modified: 2015-12-19 21:42 UTC (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Victor Sudakov 2015-11-20 11:17:05 UTC
The default zfs filesystem layout created by the 9.3-RELEASE installer is not compatible with sysutils/beadm, rendering many beadm features useless and even leading to BE corruption. For example, the /usr/local and the /var/db/pkg directories are created on different zfs filesystems, one inside the BE and the other outside, which can cause system corruption when using boot environments.

Could the 9x installer create zfs filesystem exactly the way the 10x does?
Comment 1 Victor Sudakov 2015-11-21 07:30:24 UTC
I would also be very grateful for any help in defining beadm-friendliness of a system.

It is clear that a system put totally within a BE (everything on the root dataset) would be beadm-friendly. It is also clear that there are some directories which don't have to be within a BE (/home and /var/{log,mail} are first to come to mind). Such are the directories used to store data as opposed to the "system state" or "system itself." So the approach should be "which directories can we safely exclude from the BE without compromising the system's consistency."
Comment 2 Allan Jude freebsd_committer freebsd_triage 2015-11-21 17:20:09 UTC
Look at the layout provided in FreeBSD 10.2-RELEASE. You can provide this layout as an environment variable before you run the 9.3-RELEASE install to get the same layout.
Comment 3 Victor Sudakov 2015-11-22 06:26:29 UTC
Allan, (In reply to Allan Jude from comment #2)

That's good news, but I do not quite understand at what moment I should provide the said environment variable. For example, I boot from the CD, select interactive "Install"... then what?
Comment 4 Slawomir Wojciech Wojtczak 2015-11-23 08:45:24 UTC
I assume that the default 10.2-RELEASE install scheme is OK (while 9.3-RELEASE is not).

As we can not change the default install scheme for 9.3 we may change the default in 9-STABLE so the 9.4-RELEASE would be 'beadm' friendly.

... or we need to do anything else/more?

Regards,
vermaden
Comment 5 Victor Sudakov 2015-11-23 09:10:36 UTC
(In reply to vermaden from comment #4)

> I assume that the default 10.2-RELEASE install scheme is OK
> (while 9.3-RELEASE is not).

Correct.

> we may change the default in 9-STABLE so the 
> 9.4-RELEASE would be 'beadm' friendly.

That would be great.

> or we need to do anything else/more?

If we could suggest a workaround to modify $ZFSBOOT_DATASETS during 9.3-RELEASE install process, or at least document it somwhere :-) that would be great too.

Where is the $ZFSBOOT_DATASETS syntax documented at all?
Comment 6 Slawomir Wojciech Wojtczak 2015-11-23 11:35:16 UTC
> If we could suggest a workaround to modify $ZFSBOOT_DATASETS
> during 9.3-RELEASE install process, or at least document it
> somwhere :-) that would be great too.
> 
> Where is the $ZFSBOOT_DATASETS syntax documented at all?

There are *mentions* of it here, but I would call that _documentation_ ...

https://wiki.freebsd.org/SummerOfCode2014/FreeBSD_PXE_preseed/Howto
https://www.freebsd.org/cgi/man.cgi?bsdinstall%288%29
Comment 7 Slawomir Wojciech Wojtczak 2015-11-23 12:54:12 UTC
ERRATA: I *WOULD NOT* call that _documentation_ ... 

Regards,
vermaden
Comment 8 Victor Sudakov 2015-11-23 15:01:15 UTC
(In reply to vermaden from comment #7)
I agree. I have read bsdinstall(8) too but it is IMHO too spartan and lacks good examples.

BTW where the hell is $ZFSBOOT_DATASETS defined in the installation media? I have searched the ISO image in vain.
Comment 9 Kamil Czekirda freebsd_committer freebsd_triage 2015-11-23 15:15:19 UTC
(In reply to vas from comment #8)

https://svnweb.freebsd.org/base/release/9.3.0/usr.sbin/bsdinstall/scripts/zfsboot?view=markup

on the install media:
/usr/libexec/bsdinstall/zfsboot
Comment 10 Allan Jude freebsd_committer freebsd_triage 2015-11-23 18:47:25 UTC
(In reply to vermaden from comment #4)

> so the 9.4-RELEASE would be 'beadm' friendly

There will not be a 9.4. The stable/9 branch is finished, and support will be dropped when 9.3 hits EOL in about a year.
Comment 11 Victor Sudakov 2015-11-25 11:26:31 UTC
(In reply to Kamil Czekirda from comment #9)
So, I can modify/redefine $ZFSBOOT_DATASETS in /usr/libexec/bsdinstall/zfsboot on the installation media. That is good enough for me. And if there are no plans for a 9.4-RELEASE, we could possibly close this case. 

Or maybe it's still a good idea to change the default in 9-STABLE just in case.
Comment 12 Kamil Czekirda freebsd_committer freebsd_triage 2015-12-19 21:42:00 UTC
Everything is clear. The stable/9 branch is finished.