ZFS filesystem vs ZFS pool
Asked Answered
C

1

15

ZFS pool may consist of datasets(file system, snapshot, etc..) or volumes. ZFS volume is like block device, but I am do not understand difference between pool and filesystem. When I created pool1 via zpool create pool1 sda sdb sdc and than zpool create pool1/fs I can see two new lines in df -h output with pool1 and pool1/fs. The same in zfs list output. Now, I can copy files into pool and into fs. I can set dedup or compression on both. So what is the difference? Why should/shouldn't I crate filesystem in pool? Please include some example of usage if possible.

Caesaria answered 20/4, 2018 at 6:33 Comment(0)
F
21

A pool is a collection of disks, where you can store filesystems and volumes. When you create one, you also get one base-level filesystem that all the other filesystems you create will inherit properties (such as compression algorithm to use, etc.) from.

A filesystem is something that you can write files into, and they all use storage from your pool to write their data. Usually you group logically similar data into the same filesystem, since that way you can treat all that data the same w.r.t. compression, snapshotting, etc. You can share filesystems to other computers over the network through NFS.

A volume (aka a zvol) is a fake disk that uses storage from your pool to write its data. It's kind of like one big file, except that you can also do compression / snapshots / etc. to it directly instead of through a filesystem that contains it. Typically you would only create volumes if you are running a VM. Although I believe you can create a pool based on a group of zvols (a pool within a pool), in general that is not a good idea (it's useful for testing by ZFS developers, though). You can share volumes to other computers over the network through iSCSI or FibreChannel.

Fabre answered 20/4, 2018 at 16:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.