Score:-1

What is the difference between the properties of using ZFS on whole disks, partitions or files as a volume?

ng flag

It may be that for some applications it is quite common under ZFS to address whole disks as volumes. However, it is also possible to add partitions and files to the pool.

What are the differences in usage characteristics when using whole disks, partitions or files as a volume as a ZFS volume?

Remark:

  • Not every PC, not every Notebook have the possibility to get installed more than one disk. So that's are a real live question for a lot of computer, outside server rooms and server racks.
Artur Meinild avatar
vn flag
This sounds more like a question about filesystem theory than a practical solution to a real-world problem...
Score:1
vn flag

Disclaimer: This may or may not directly answer your question.

ZFS is an advanced block storage technology, primarily geared towards enterprise-level storage arrays.

Let's take a look at man zpool: (interesting parts are highlighted)

Virtual Devices (vdevs)

A "virtual device" describes a single device or a collection of devices organized according to certain performance and fault characteristics. The following virtual devices are supported:

disk

  • A block device, typically located under /dev/dsk. ZFS can use individual slices or partitions, though the recommended mode of operation is to use whole disks. A disk can be specified by a full path, or it can be a shorthand name (the relative portion of the path under "/dev/dsk"). A whole disk can be specified by omitting the slice or partition designation. For example, "c0t0d0" is equivalent to "/dev/dsk/c0t0d0s2". When given a whole disk, ZFS automatically labels the disk, if necessary.

file

  • A regular file. The use of files as a backing store is strongly discouraged. It is designed primarily for experimental purposes, as the fault tolerance of a file is only as good as the file system of which it is a part. A file must be specified by a full path.

This clearly states that the intended mode of operation for ZFS is to use whole disks as virtual devices (vdevs), which is also the only thing that truly makes sense in a production environment.

The use of single partitions as a vdev can maybe be useful for home-users in extreme edge cases. And the use of files as a vdev can only have one meaningful purpose: Testing.

The entire performance and reliability of ZFS is built around integrity and redundancy - and you loose both those things if you can't easily replace a vdev - and this is only possible when you can swap an entire disk.

There are plenty of testing and experimental usecases where it can be handy to use partitions and even files as vdevs - but as soon as your setup enters any serious mode of operation, always use entire disks as block devices.

Edit: For consumer use with a single harddisk, it doesn't make any difference if you use ZFS on a partition or the whole disk. Here, you only gain the filesystem advantages, such as snapshots, integrity checking etc.

Alfred.37 avatar
ng flag
THX for the helpful answer !!! But one Remark: That there is no advantage or disadvantage in terms of safety or speed of operation when using complete disks or partitions. The management and the exchange case may be different here for servers, but this makes no difference in the use case mentioned above.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.