# NanoBSD on ZFS



## Phishfry (Jun 13, 2018)

I have a request to make a NanoBSD image for a user using a ZFS file system. Has anyone ever used ZFS on a NanoBSD build?

Personally it seems like overkill. NanoBSD runs UFS as Read-Only so I really don't see the utility from a robustness factor.

Am I thinking wrong?

What extra tools will I need to build in? Do base tools cover ordinary usage OK?


----------



## Phishfry (Jun 19, 2018)

Revisiting this topic I am looking at ZFS docs and all I see is complexity on top of complexity.
For a single disk what is the advantage of ZFS over UFS?
From my reading the main benefit is snapshots?


----------



## vermaden (Jun 19, 2018)

Phishfry said:


> For a single disk what is the advantage of ZFS over UFS?


- Bulletproof upgrades with ZFS Boot Environments (*sysutils/beadm*).
- Data integrity using checksums for blocks.
- Fast Compression (lz4) for 'free'.
- Flexibility in data management (once You do UFS partitioning You will not resize and will not increase inodes).


----------



## Bobi B. (Jun 21, 2018)

As a side note UFS supports snapshots, too (albeit with some limitations; see mount(8), search for `snapshot`).

However, for a NanoBSD system, where root file system is (mostly) immutable and, if you prepare your image right and create a secondary root file system partition, upgrades are easily atomic, as well.

You might consider ZFS for a data partition on a NanoBSD system, where you store run-time data and need persistence (database files, for example). Regarding extra tools, that depends on your use case: if you use a 3rd party packages just include them in your NanoBSD system.


----------

