Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Mar 2014 10:03:06 -0500
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        dteske@FreeBSD.org
Cc:        sysinstall@FreeBSD.org
Subject:   Re: bsdinstall ZFS /root in wrong dataset
Message-ID:  <532DA62A.7020106@FreeBSD.org>
In-Reply-To: <010101cf45de$c9707380$5c515a80$@FreeBSD.org>
References:  <532D84AF.5080506@FreeBSD.org> <010101cf45de$c9707380$5c515a80$@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
On 3/22/2014 9:55 AM, dteske@FreeBSD.org wrote:
>> -----Original Message-----
>> From: Bryan Drewery [mailto:bdrewery@FreeBSD.org]
>> Sent: Saturday, March 22, 2014 5:40 AM
>> To: sysinstall@FreeBSD.org
>> Subject: bsdinstall ZFS /root in wrong dataset
>>
>> (I am not subscribed so please CC me)
>>
>> The ZFS layout uses the zroot/ROOT/<BE> to support boot environments.
>> The problem with it is that /root is part of the BE. Home directories are
>> properly outside of the BE.
>>
>> /root should really be outside to persist history and other changes to
> root's
>> homedir through BE changes/upgrades.
>>
>> This is quite noticeable if you create a new BE (beadm create; beadm
>> mount) and then installworld/kernel into it, then activate and reboot.
>> All of your history and /root changes are missing for the period between
>> creating the BE and rebooting.
>>
>> Something like this is needed:
>>
>>> --- usr.sbin/bsdinstall/scripts/zfsboot (revision 263620)
>>> +++ usr.sbin/bsdinstall/scripts/zfsboot (working copy)
>>> @@ -128,6 +128,8 @@
>>>
>>>         # Home directories separated so they are common to all BEs
>>>         /usr/home       # NB: /home is a symlink to /usr/home
>>> +       /root           mountpoint=/root
>>>
>>>         # Ports tree
>>>         /usr/ports              compression=lz4,setuid=off
>>
>>
>> Though, I am unsure on whether we should make a zroot/root dataset and
>> mount it in or mkdir /usr/home/root and symlink /root to it. The symlink
>> does cause mergemaster confusion though. I have no opinion on where we
>> create the root dataset, as long as it is outside of ROOT.
>>
> 
> Hi bdrewery,
> 
> Thanks for kicking off this thread (esp. on list).
> 
> Placing /root in /usr/home/root would break in a few scenarios as you
> correctly identified. Let's give your patch a go and wait for some feedback
> before MFC'ing. I don't expect any fallout from your patch; looks great
> and indeed should solve the problem (if I understand correctly).
> 
> Do you want to commit or should I?
> 

Sounds good. I'll commit in about an hour.

-- 
Regards,
Bryan Drewery


[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJTLaYqAAoJEDXXcbtuRpfPvw8IANgQxb/WxasB3pSUHV2ofOei
G/HUU5n5S/+JAHJfrfryGulXOYsA9Sp4Yrj3egZ/lAF8mWnBcFA8f86Wwl6G02LQ
H5Va3s9FdSGrioUP5aS7CX5MJWRLlFI8piXku5W0FB5pYoQJGto+bcaerQP1BqmT
eAk3uS7kt3VqKL9eqDg8LVJbwRmJv/iNRQRovI6iIt202DEOf27kJ/dkXEjMr7WB
pGzjkV3gT8BK7gS+A0IQgSbPRUFbOnLZ+V58cDsi+kX93GbgFzZaGMwdumbRUrP3
bpdauX3T30VG/RcI9YjPQFSY8I233Q2OdxMl/vF+ndrm/eNzBZl/VX3GWqHHldA=
=oNeV
-----END PGP SIGNATURE-----

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?532DA62A.7020106>