Trond Endrestøl
2014-Jan-14 16:11 UTC
GPT label for ZFS GPT partitions no longer recognized (Was: New FreeBSD snapshots and virtual machine disk images (20140106 r260369))
On Tue, 7 Jan 2014 21:08-0500, Glen Barber wrote:> o 10.0-PRERELEASE amd64> FreeBSD-10.0-PRERELEASE-amd64-20140106-r260369-disc1.isoI tried the experimental ZFS stuff in bsdinstaller, I chose a mirrored pool using 4K disk blocks, and I noticed the zfs0 and zfs1 labels are indeed shown when running gpart show -l after the first reboot, but only the gptboot{0,1} and swap{0,1} labels shows up in the /dev/gpt directory. I guess gnop is doing some mischief to the GPT. Some weeks ago I did a complete manual ZFS install using my own homegrown shell scripts (http://ximalas.info/~trond/create-zfs/canmount/), 4K disk blocks and mirrored pool, and gnop managed to render the entire GPT invisible on the first two harddrives. It could very well be pilot error on my part. Only when rebooting using the snapshot ISO image, the labels showed up as expected when running gpart show -l and were even visible in the /dev/gpt directory. Luckily, the boot code manages to find its way through the maze, but not the installed kernel, which should be the very same kernel as found on the snapshot image. Any thoughts to what's going on? Sorry for the noise if this is ol' news. And by the way, is /usr/local considered part of each BE? I like to treat it as global to each BE, very much like /tmp and /var, as long as I'm running the same branch in every BE. -- +-------------------------------+------------------------------------+ | Vennlig hilsen, | Best regards, | | Trond Endrest?l, | Trond Endrest?l, | | IT-ansvarlig, | System administrator, | | Fagskolen Innlandet, | Gj?vik Technical College, Norway, | | tlf. mob. 952 62 567, | Cellular...: +47 952 62 567, | | sentralbord 61 14 54 00. | Switchboard: +47 61 14 54 00. | +-------------------------------+------------------------------------+
Trond Endrestøl
2014-Jan-15 18:05 UTC
GPT label for ZFS GPT partitions no longer recognized (Was: New FreeBSD snapshots and virtual machine disk images (20140106 r260369))
On Tue, 14 Jan 2014 17:11+0100, Trond Endrest?l wrote:> On Tue, 7 Jan 2014 21:08-0500, Glen Barber wrote: > > > o 10.0-PRERELEASE amd64 > > > FreeBSD-10.0-PRERELEASE-amd64-20140106-r260369-disc1.iso > > I tried the experimental ZFS stuff in bsdinstaller, I chose a mirrored > pool using 4K disk blocks, and I noticed the zfs0 and zfs1 labels are > indeed shown when running gpart show -l after the first reboot, but > only the gptboot{0,1} and swap{0,1} labels shows up in the /dev/gpt > directory. I guess gnop is doing some mischief to the GPT.I did some googling and found out that during the zpool import step of the gnop create, zpool create, zpool export, gnop destroy, zpool import dance, you should tell ZFS (or actually zpool) to look for devices in the /dev/gpt directory, like this: zpool import -d /dev/gpt -o cachefile=/tmp/zpool.cache zroot I believe you still need to copy the temporary cachefile to the /boot/zfs directory in the BE. Luckily, this treatment doesn't hide the /dev/gpt/zfs{0,1} GPT labels after rebooting. I think it would be better for all of us if usr.sbin/bsdinstall/scripts/zfsboot would run zpool import with the -d option after destroying the *.nop devices, until the scenario with the missing GPT labels is resolved. Any thoughts? -- +-------------------------------+------------------------------------+ | Vennlig hilsen, | Best regards, | | Trond Endrest?l, | Trond Endrest?l, | | IT-ansvarlig, | System administrator, | | Fagskolen Innlandet, | Gj?vik Technical College, Norway, | | tlf. mob. 952 62 567, | Cellular...: +47 952 62 567, | | sentralbord 61 14 54 00. | Switchboard: +47 61 14 54 00. | +-------------------------------+------------------------------------+