-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce vdev properties #11711
Introduce vdev properties #11711
Conversation
57e0b0e
to
6d33557
Compare
c661eaf
to
114eb45
Compare
Maybe I need some help reading the test output. For the CentOS 8 and Stream 8 runs, I don't see which test is failing. |
Yeah, I don't blame you it's definitely not obvious. From what I can tell none of the tests unexpectedly failed. However the Linux builders did appear to hit an issue when trying to unload the kmods. That caused the ZTS to hit their timeout and get reported as a failure. From the CentOS 8 stdout log
And in its console log
It looks to me like it was caused by a missing |
3a0fc66
to
0981418
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made a pass over the changes and made a few suggestions and comments.
202bd1a
to
72d3020
Compare
Do we need to change some of the ASSERT()s to being >=
|
Huh, maybe... what was the context of that assertion failure? I thought we only made that check when we were about to set a drive as "non-allocating", and I would have always expected to see some "slop" in the spa_dspace... |
da95cc5
to
1478f32
Compare
1478f32
to
12785cf
Compare
12785cf
to
2ce227a
Compare
429fa74
to
6b52382
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your work on this. I'll take a look at the rest of the kernel code too, hopefully later this week.
d402c23
to
286de92
Compare
you'll also want to fix the checkstyle errors |
Path value can be set (but not validated) and can make the pool not mount on next boot. The automatic "Where is this vdev" logic seems to be broken. [root@fbsd13beta ~]# zpool get path zroot da0p4 reboot FreeBSD console error message on next boot: If I boot from the FreeBSD 13.0 ISO and manually import the poor twice...first time fails...second time works. Ignored the warnings about read only, etc. This seemed to correct the bad "path" parameter. I can reboot and everything is good again. The "path seems to have moved lets fix it" logic is not longer working with ZFS head + this PR. Not sure if this exposed a previous bug since FreeBSD 13.0 openzfs or by this PR? |
cf4f293
to
6f7de78
Compare
This is fixed, setting the vdev path now returns EINVAL if the path does not start with /dev/ (matching the logic in vdev_geom.c that was causing the boot failure) |
6f7de78
to
0793d3d
Compare
e99d3f3
to
8a5bd9b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't really comment on anything else, other than to say I look forward to it landing. :)
In the example output here: #11711 (comment) the order of vdevs for |
Signed-off-by: Allan Jude <allan@klarasystems.com>
Add properties, similar to pool properties, to each vdev. This makes use of the existing per-vdev ZAP that was added as part of device evacuation/removal. A large number of read-only properties are exposed as well, many of the members of struct vdev_t that provide useful statistics. Add support for properties.vdev in SYSFS Add support for read-only "removing" vdev property Add the "allocation" property that can be set to "off" Refactor space management for non-allocating devices Add ability to remove user vdev property by setting value to "" Signed-off-by: Allan Jude <allan@klarasystems.com> Signed-off-by: Mark Maybee <mark.maybee@delphix.com>
4c39c01
to
4b80709
Compare
|
Add properties, similar to pool properties, to each vdev. This makes use of the existing per-vdev ZAP that was added as part of device evacuation/removal. A large number of read-only properties are exposed, many of the members of struct vdev_t, that provide useful statistics. Adds support for read-only "removing" vdev property. Adds the "allocating" property that defaults to "on" and can be set to "off" to prevent future allocations from that top-level vdev. Supports user-defined vdev properties. Includes support for properties.vdev in SYSFS. Co-authored-by: Allan Jude <allan@klarasystems.com> Co-authored-by: Mark Maybee <mark.maybee@delphix.com> Reviewed-by: Matthew Ahrens <mahrens@delphix.com> Reviewed-by: Mark Maybee <mark.maybee@delphix.com> Signed-off-by: Allan Jude <allan@klarasystems.com> Closes openzfs#11711
Add properties, similar to pool properties, to each vdev. This makes use of the existing per-vdev ZAP that was added as part of device evacuation/removal. A large number of read-only properties are exposed, many of the members of struct vdev_t, that provide useful statistics. Adds support for read-only "removing" vdev property. Adds the "allocating" property that defaults to "on" and can be set to "off" to prevent future allocations from that top-level vdev. Supports user-defined vdev properties. Includes support for properties.vdev in SYSFS. Co-authored-by: Allan Jude <allan@klarasystems.com> Co-authored-by: Mark Maybee <mark.maybee@delphix.com> Reviewed-by: Matthew Ahrens <mahrens@delphix.com> Reviewed-by: Mark Maybee <mark.maybee@delphix.com> Signed-off-by: Allan Jude <allan@klarasystems.com> Closes openzfs#11711
Add properties, similar to pool properties, to each vdev. This makes use of the existing per-vdev ZAP that was added as part of device evacuation/removal. A large number of read-only properties are exposed, many of the members of struct vdev_t, that provide useful statistics. Adds support for read-only "removing" vdev property. Adds the "allocating" property that defaults to "on" and can be set to "off" to prevent future allocations from that top-level vdev. Supports user-defined vdev properties. Includes support for properties.vdev in SYSFS. Co-authored-by: Allan Jude <allan@klarasystems.com> Co-authored-by: Mark Maybee <mark.maybee@delphix.com> Reviewed-by: Matthew Ahrens <mahrens@delphix.com> Reviewed-by: Mark Maybee <mark.maybee@delphix.com> Signed-off-by: Allan Jude <allan@klarasystems.com> Closes openzfs#11711
Signed-off-by: Allan Jude allan@klarasystems.com
Motivation and Context
As discussed in the first March 2021 OpenZFS Leadership Meeting, this is a work-in-progress copy of my vdev properties feature.
It is also discussed further here on the developers mailing list and was originally presented at the OpenZFS Developers Summit 2018 hackathon where a working group expanded on the idea and won 2nd prize, and again in 2019 as it matured.
Description
Allows the user to set and get properties and user-properties of individual vdevs.
The properties are stored in the per-vdev ZAP that was added as part of the device removal feature.
Set a user property:
zpool set systems.klara:myproperty="value" poolname vdevname
Read a property (number of bytes written to this vdev since import):
zpool get write_bytes poolname vdevname
How Has This Been Tested?
This is still a WIP, and it has only been tested manually. A set of tests need to be added still.
Types of changes
Checklist:
Signed-off-by
.