ZFS Creating a ZFS Pool

There is a disk /dev/ada1 for FreeBSD, the system is FreeBSD 12.2
# gpart show
Code:
=>       63  234441585  ada0  MBR  (112G)
         63       1985        - free -  (993K)
       2048     204800     1  ntfs  [active]  (100M)
     206848  234231808     2  ntfs  (112G)
  234438656       2992        - free -  (1.5M)

=>       63  234441585  diskid/DISK-GTA040874  MBR  (112G)
         63       1985                         - free -  (993K)
       2048     204800                      1  ntfs  [active]  (100M)
     206848  234231808                      2  ntfs  (112G)
  234438656       2992                         - free -  (1.5M)

=>       40  488397088  ada1  GPT  (233G)
         40     409600     1  efi  (200M)
     409640    7979008     2  freebsd-ufs  (3.8G)
    8388648    8388608     3  freebsd-swap  (4.0G)
   16777256  444596224     4  freebsd-ufs  (212G)
  461373480   16777216     5  freebsd-ufs  (8.0G)
  478150696    8388608     6  freebsd-ufs  (4.0G)
  486539304    1857824        - free -  (907M)

=>        63  3907029105  ada2  MBR  (1.8T)
          63        1985        - free -  (993K)
        2048  3907024896     1  ntfs  (1.8T)
  3907026944        2224        - free -  (1.1M)

=>        63  3907029105  diskid/DISK-Z4Z7GKPH  MBR  (1.8T)
          63        1985                        - free -  (993K)
        2048  3907024896                     1  ntfs  (1.8T)
  3907026944        2224                        - free -  (1.1M)
I can't create a zfs pool. I want to use the jail /usr/jail with ZFS
 
Your gpart(8) output only shows ada0. Either ada1 doesn't exist, or doesn't have a partition table on it. It's fine if there's no partition table on it, ZFS doesn't require one. But it's better to create one so you can attach a label to it and it's easier to identify what's on the disk if you happen to move the disk to another system for example.

I can't create a zfs pool.
Error messages? What command did you use?
 
I used the # gpart show command
for ada1 disk # gpart show -p /dev/ada1
Code:
=>       40  488397088    ada1  GPT  (233G)
         40     409600  ada1p1  efi  (200M)
     409640    7979008  ada1p2  freebsd-ufs  (3.8G)
    8388648    8388608  ada1p3  freebsd-swap  (4.0G)
   16777256  444596224  ada1p4  freebsd-ufs  (212G)
  461373480   16777216  ada1p5  freebsd-ufs  (8.0G)
  478150696    8388608  ada1p6  freebsd-ufs  (4.0G)
  486539304    1857824          - free -  (907M)
unfortunately I can't format the strings
I am not creating a pool zfs. I want to use the jail /usr/jail with ZFS
 
I am not creating a pool zfs. I want to use the jail /usr/jail with ZFS
You're not making much sense then. The threads subject says you're trying to create a ZFS pool, now you just want to use this with a jail? So what exactly is stopping you from doing so?

(edit)

Anyway, if your server is using UFS then I wouldn't bother setting up a single ZFS pool for one jail, it'll be a major waste of resources and would actually become counter productive. Instead, continue using UFS.
 
You can't use ZFS on top of UFS

Technically you can, but it's not really a good idea to do so beyond testing ZFS. It's rare for it to ever be useful in production.

You already have UFS, you may as well create a directory and use it.
 
Technically you can, but it's not really a good idea to do so beyond testing ZFS. It's rare for it to ever be useful in production.
Sure, you could use a mdconfig(8) disk image and use that to create a pool. But yeah, use it for testing only. I just didn't want to confuse an already confused user any further.

I use UFS, I want to create a jail with ZFS support.
In order to use ZFS you will need to have a ZFS filesystem first.
 
I use UFS, I want to create a jail with ZFS support.
If this is truly the path you want, backup your system and redo it entirely with ZFS.

You could also opt to add another disk and dedicate it to jails. Whether that's worth it depends on how many jails you intend to create and how much the features of ZFS will benefit this one use-case for you.

As it is presently, you don't want to use ZFS on top of UFS. You can only gain pain that way.
 
If I understand you correctly, I need to reinstall FreeBSD with the zfs file system. Then create a ZFS pool.
Please tell me how to use the disk image to create a pool, as an example in my case.
 
If I understand you correctly, you need to reinstall FreeBSD with the zfs file system. Then create a ZFS pool.
You can backup your current system (with tar(1), for instance), boot the LIveCD, create a pool, and restore the backup on top of it. The main things to change in this case are /boot/loader.conf, /etc/fstab, and /etc/rc.conf.

Please tell me how to use the disk image to create a pool, as an example in my case.
As you have been warned that it's not a good idea beyond testing ZFS, proceed at your own risk: You just need to create at least one file and point zpool to it/them. For instance:
Code:
truncate -s 10g /zfs.pool
chmod 600 /zfs.pool
zpool create tank /zfs.pool
 
I am a novice user of Freebsd, it will be difficult for me to do all this. I will reinstall the system with ZFS.
Thank you for your help!
 
If I understand you correctly, I need to reinstall FreeBSD with the zfs file system. Then create a ZFS pool.
You misunderstand. Whenever you are using ZFS, you already have a pool. A pool is always needed to use ZFS. ZFS "lives inside a pool".

Think of a pool as your "ZFS partition" (even though it can be much more complicated than that).
 
Back
Top