108: Spent Decades Writing Scripts to Parse df(1)

With Networking for Systems Administrators production wrapping up, OpenZFS Mastery is starting to lurch forward. Here’s a tidbit.

ZFS combines traditional filesystems and volume managers. It expects to handle everything from the permissions on individual files and which files are in which directories down to tracking which storage devices get used for what purposes and how that storage is arranged. The sysadmin instructs ZFS in arranging disks and files, but ZFS manages the entire storage stack beneath them. ZFS has three layers: datasets, storage pools, and virtual devices.

ZFS was designed by highly experienced Unix engineers who spent decades writing scripts to parse df(1) and du(1) and fstat(1) and lsof(1) output and were determined to quit relying on sed(1) and awk(1) for even the simplest operations. The ZFS commands are not only designed to work together, each offers “customizable output designed to be piped directly into other commands. They can even produce JSON for convenient automation, as we’ll illustrate with examples throughout,

OpenZFS Mastery is open for sponsorship at https://sponsor.mwl.io.

Leave a Reply

Your email address will not be published. Required fields are marked *