Matt asked me to share some background on the vdev properties project ahead of tomorrows meeting, so people have a chance to review and ask questions.
ZFS uses properties (dataset properties, dataset user properties, pool properties) to manage most of the configuration. Many objects also have read-only properties that provide useful counters or state information. This same concept should be extended to configuring vdevs. The basic concept is to use the per-vdev ZAP, that was introduced as part of the device evacuation patches, to store any per-vdev properties, as well as expose a number of internal ZFS counters as read-only properties. Some basic goals: - To be able to make a machine readable version of `zpool status` by having the state, checksum/read/write error counts, etc as per-vdev properties. - To express administrative intent If you plan to remove 2 devices from the pool, currently a lot of the data from the first device to be removed (vdev2) will be written to the device you plan to remove next (vdev3). Whereas if you could do: `zpool set noalloc=on pool vdev3` # Removing this disk soon `zpool remove pool vdev2` `zpool remove pool vdev3` It would make sure that no new data is written to vdev3 while evacuating vdev2. My prototype includes both defined properties, and user properties. This allows users to attach arbitrary information to vdevs, so be able to manage them as needed. For example, recording the serial number and JBOD location of the vdev, so it can be accessed even if the device fails, so that the correct serial number can be verified when the failed disk is pulled. The interface I have currently, works the same as pool properties, but you specify the vdev after the pool name. so as with the example above: `zpool set comment=Comment-here mypool myvdev` You can also read a property from multiple vdevs: `zpool get comment mypool vdev1 vdev2` or the special keyword 'all' does all vdevs in the pool. Here are my slides from the 2019 OpenZFS developers summit: https://docs.google.com/presentation/d/1ouC358wNtlfuCx0QAOM90GFOHR3NeJ9Hu0WRb2Ry78g/edit?usp=sharing Slide 10 has a list of the properties I've wired up so far. Some of the most useful are just the 'operation' counts, similar to the per-dataset kstats that were added a while back. You can see the number of read IOs, and the total bytes read etc. This is just exposing data ZFS is already tracking in the vdev_t via the convenient interface of `zpool get` ------------------------------------------ openzfs: openzfs-developer Permalink: https://openzfs.topicbox.com/groups/developer/Tb11994f96a39413b-M20ea4d1861504a29c797b86e Delivery options: https://openzfs.topicbox.com/groups/developer/subscription