Dualboot and ZFS

Dean E. Weimer dweimer at dweimer.net
Mon Jan 15 15:09:54 UTC 2018


On 2018-01-15 8:47 am, Victor Sudakov wrote:
> Manish Jain wrote:
>> 
>> > Sorry if my question was misleading, I did not mean converting the
>> > existing system from UFS to ZFS at ada0s3. Suppose ada0s3 is an unused
>> > slice, I can probably create a zpool thereon. But a few questions
>> > remain:
>> >
>> > 1. Can I install a root-on-zfs system on ada0s3 with bsdinstall? I
>> > suppose not?
>> 
>> That's right. You cannot install ZFS onto an MBR slice. ZFS by default
>> needs an entire disk, partitioned GPT.
> 
> However, later you suggest it's possible to install freebsd-zfs on a
> BSD slice. How is that?
> 
>> 
>> > Why are you creating a zpool within a BSD "a" partition, and not in
>> > da0s1 directly? I have never seen such a configuration. Is it even
>> > possible to set the "freebsd-zfs" type on a BSD partition?
>> 
>> I presume you are using MBR partitioning. Under MBR, freebsd slices 
>> are
>> always nested. The slice contains partitions denoted with a, b and so 
>> on.
>> 
>> I do not think it is viable to set freebsd-zfs on an MBR slice. It 
>> just
>> will not work. ZFS needs an entire disk. If you wish to install on an
>> MBR slice, you must use rsync after installing freebsd-UFS.
> 
> Do you mean to say it's viable to install freebsd-zfs on ada0s3a but
> not viable on ada0s3 ? I don't see logic here.

It can be installed on a partition, but it has to be GPT, not MBR, from 
one of my servers I have this GPT partition setup.

# gpart show -p
=>        40  1953525088    ada0  GPT  (932G)
           40        1024  ada0p1  freebsd-boot  (512K)
         1064    33554432  ada0p2  freebsd-swap  (16G)
     33555496  1919969624  ada0p3  freebsd-zfs  (916G)
   1953525120           8          - free -  (4.0K)

ZFS is designed to use a full raw disk, but you need to have a boot 
partition, and in this case I setup swap as well outside of ZFS. This 
server never hits swap though, so I don't have any real world metrics on 
whether or not this is better that running swap on a zvol inside of ZFS. 
  There is a second drive duplicating this and GEOM mirror used for the 
swap, along with ZFS mirror for redundancy and a second boot partition.

-- 
Thanks,
    Dean E. Weimer
    http://www.dweimer.net/


More information about the freebsd-questions mailing list