Creating a bootable ZFS disk?

Steven Hartland killing at multiplay.co.uk
Sat Dec 27 16:58:25 UTC 2014


Actually the cache file shouldn't be required for boot any more, so you 
should be able to remove it.

I was also under the impression that on 4k drive the alignment should 
indeed be automatic.

I'd be interested to know if either of these are not the case as they 
are things we should look at fixing if not.

     Regards
     Steve

On 27/12/2014 16:34, krad wrote:
> you will probably need to update the zpool.cache as the one on the rootfs
> you copied will have the details of the old pool in. You shouldnt need and
> entries in the loader.conf as all they do is override the bootfs flags much
> like rc.conf.local does to rc.conf entries
>
> On 27 December 2014 at 16:10, Dr Josef Karthauser <joe at karthauser.co.uk>
> wrote:
>
>> Ahha, the 4k alignment is plausible! I thought that that was automatic
>> these days. I'll give it a go.
>>
>> Do I also need to have a zfs pool cache on the root disk?
>>
>> Joe
>>
>>
>> On 27 Dec 2014 at 3:27:47 pm GMT, Warren Block <wblock at wonkity.com> wrote:
>>
>>> On Sat, 27 Dec 2014, Dr Josef Karthauser wrote:
>>>
>>>> I?m trying to create a new ZFS pool from an existing one (the new one
>> is 4k aligned and the old one is legacy 512b).
>>>> But, I can?t get it to boot! Not sure what I?m doing wrong.
>>>>
>>>> I thought I could create the new pool, and use ?zfs send/recv? to copy
>> the existing pool and then boot onto the new disk, but the kernel doesn?t
>> load? :(.
>>>> Does anyone know what I?m doing wrong?
>>>>
>>>> Here?s my recipe:
>>>>
>>>>      # gpart create -s gpt diskid/DISK-NEW-DISK
>>>>      # gpart add -s 64K -t freebsd-boot diskid/DISK-NEW-DISK
>>>>      # gpart add -t 8G freebsd-swap diskid/DISK-NEW-DISK
>>>>      # gpart add -t freebsd-zfs diskid/DISK-NEW-DISK
>>>>      # gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1
>> diskid/DISK-NEW-DISK
>>> Those partitions are probably not aligned to 4K.  Add "-a4k" to the
>> gpart add commands.  (Remember that ashift is filesystem block size, not
>> alignment.)
>>> _______________________________________________
>>> freebsd-stable at freebsd.org mailing list
>>> http://lists.freebsd.org/mailman/listinfo/freebsd-stable
>>> To unsubscribe, send any mail to "freebsd-stable-unsubscribe at freebsd.org
>> "
>>
>> _______________________________________________
>> freebsd-stable at freebsd.org mailing list
>> http://lists.freebsd.org/mailman/listinfo/freebsd-stable
>> To unsubscribe, send any mail to "freebsd-stable-unsubscribe at freebsd.org"
>>
> _______________________________________________
> freebsd-stable at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-stable
> To unsubscribe, send any mail to "freebsd-stable-unsubscribe at freebsd.org"



More information about the freebsd-stable mailing list