Date: Tue, 25 Mar 2014 13:11:41 -0400 From: Allan Jude <freebsd@allanjude.com> To: freebsd-sysinstall@freebsd.org Subject: Re: bsdinstall ZFS /root in wrong dataset Message-ID: <5331B8CD.2070402@allanjude.com> In-Reply-To: <01cc01cf483f$5a90eae0$0fb2c0a0$@FreeBSD.org> References: <532D84AF.5080506@FreeBSD.org> <010101cf45de$c9707380$5c515a80$@FreeBSD.org> <532DA62A.7020106@FreeBSD.org> <01cc01cf483f$5a90eae0$0fb2c0a0$@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --LGkeOculMEHD7NvBkh2TubJNAHLuX3vHp Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2014-03-25 11:31, dteske@FreeBSD.org wrote: >=20 >=20 >> -----Original Message----- >> From: Bryan Drewery [mailto:bdrewery@FreeBSD.org] >> Sent: Saturday, March 22, 2014 8:03 AM >> To: dteske@FreeBSD.org >> Cc: sysinstall@FreeBSD.org >> Subject: Re: bsdinstall ZFS /root in wrong dataset >> >> 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= =2E >>>> The problem with it is that /root is part of the BE. Home directorie= s >>>> 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 reboo= t. >>>> 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=3D/root >>>>> >>>>> # Ports tree >>>>> /usr/ports compression=3Dlz4,setuid=3Doff >>>> >>>> >>>> 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 o= n >>>> 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. >> >=20 > Got a test result from the commit on -current... >=20 >> -----Original Message----- >> From: Bruno Lauz=E9 [mailto:brunolauze@msn.com] >> Sent: Tuesday, March 25, 2014 7:29 AM >> To: freebsd-current@freebsd.org >> Subject: install error with r263638 >> >> I am experiencing issue related to r263638.During a ZFS Install, it do= es > create >> a new volume for /root but bsdinstall cannot copy "root/.cshrc" during= >> base.txz extraction.Would we want to [add] ",canmount=3Doff" or change= the >> way root profile gets created for zfs install? >> What could be the cause? >=20 > Got so much other stuff to think about right now... > But I think the user is saying that we broke it ;D >=20 there is another thing this breaks. The reason /root is in / instead of being in /usr/home/root like every other user, is because /usr doesn't get mounted in single user mode /root needs to exist in the root data set, so that when you login in single user mode, you have a home directory. --=20 Allan Jude --LGkeOculMEHD7NvBkh2TubJNAHLuX3vHp Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (MingW32) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJTMbjQAAoJEJrBFpNRJZKfVrwP/0aMbfq88ZK9iw1pAkOfX96B DrnjCbhbWzKo8pFTEuOLlZjTWxboLcHVMDLbO8KusUawqfx+Bm/K/hVikJLSKH/+ 0JqVne958CdAOOvoBluef5FvM+i/gRXhRl/GTbHzHex9KDk+P15yxKEF0mcwZlLP puFH4q79QlX2v58EgnTJYXidK3Y48Ram1/evy5LclrGz0Ph1AqyO05YSWpyc45bT LXUxbDWxVV7K1voG3IO7iNZkgS8LRKzIRpV3ZuthPeen12J2L5vs3YWhD/UZi5/Q 3Bqn06wdySjPKMYWXRDTE9n7T+vGfQ/K6MUus/qWUKIBD5+QLB0qARd67phAtHBO 6tt7OUibTNe+eoL05g6ygrUtJWyElspGOGILHs0wS3GBlsVGBKkYnLKN9LrrCnMl EC241vSPZCkR7WoH/GLDYkQMnJCUDyDI2ajBEMMKC+QZezCT2EzYE0M6oOsfHaPA p0VZSCfqsBlYoT6scym1t3Ef7Mi4CS+2S13gpovKbar6vD3OhAAR2t/ZRwyrgP81 hHV9MjWkuuV8Gp0VpX/9swpVf/xTo/X+caWGBujZVjs2yt6wq3PWP8TZ3l6Zyw3H SkXNw0Y1mA/FRqdHMXJfkeIzQ/hzfhNFJDeMOpsVxY4MdrPUk4Mwky/x81kLQWgm 99QpD9y5Zmx5g4A5VY5i =e1c7 -----END PGP SIGNATURE----- --LGkeOculMEHD7NvBkh2TubJNAHLuX3vHp--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5331B8CD.2070402>