-
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
enclosure path not updated when it changes between reboots #11950
Comments
That's right, the device paths and @tonyhutter's also familiar with this area of the code and might have some ideas. |
Uh. Something's even funkier with 2.1.0rc4, a pool created with this version has no
I can have a stab at printf-debugging this when time allows. I'm not too familiar with tinkering in the openzfs code, but since I reckon this is userland as in the zpool binary I might not even have to install the resulting debug binary? |
That's right. In fact, you can build and run everything directly from the openzfs source tree. There are some directions for how to do that here. I just talked with @tonyhutter and he's going to take a look at this too, hopefully he'll be able to reproduce it but you never know so any additional debugging would be helpful.
That's a useful clue. The |
What confounds me is that looking at |
@behlendorf So things look OK in
So But no trace of an enclosure variable in the config:
Any hint on where I should look next? |
I managed to figure out that After a lot of dumping nvlists I have concluded that https://github.com/openzfs/zfs/blob/master/lib/libzutil/zutil_import.c#L804-L811 is where the enclosure paths disappear. Given this printf-debugging of
The first dump has the enclosure paths, but in the second dump they are gone. Then I ran into a wall trying to figure out what the refresh stuff is really trying to do, but it should have narrowed down where to investigate further @behlendorf @tonyhutter |
@ZNikke thanks for getting it this far. The remaining callpath looks like this:
You can troubleshoot the module code by inserting using
Unfortunately, I don't have a good reproducer on my end, so it may be up to you to further bisect it to where it's failing. |
OK, I'll give it a try when time allows. |
I feel that I'm not really grasping where the vdev information passed to spa_tryimport is supposed to be carried over to the final vdev info used, from what I see it's kinda behaving like it's mostly ignoring the passed config and digging up old info from what's stored on disk and using that. I've improved
And setting the zfs module option The disk The disk Running
Note that in both these cases, the provided vdev tree has the correct enclosure info, but both the MOS and final vdev tree has the obsolete info that seems to originate from the on-disk data? My best guess is that this has been broken for a while, but vdev paths has special handling in the kernel making things work anyway when vdevs move and thus hiding the fact that the supplied config from userspace is mostly ignored? Or am I completely misunderstanding what's going on? To get any further with my side of the debugging, a hint on where to look (or a print-relevant-debug-info-patch) is needed, as currently it feels like a vital piece of code has gone missing somewhere... |
I have experienced the same problems on HPE Apollo 4510 (smartpqi controllers) where enclosure scsi id is displaced by adding/removing drives and rebooting. On other systems with LSI HBAs and IBM DCS3700 enclosures (NetApp E5400), scsi id is usually lower than drives thus not affected by adding or removing drives. Implicit export/import solves the problem Apollo 4510:
Creating a new pool on Apollo 4510 does not seem to set vdev_enc_sysfs_path on zfs-2.1.0-rc4, which does work on zfs-2.0.4 and zfs-2.1.99-159_g2babd20. Edit: Creating a new pool with LSI HBAs and IBM DCS3700 enclosures did set vdev_enc_sysfs_path correctly with zfs-2.1.0-rc4. (CentOS 7.9 with 3.10.0-1160.2.1.el7_lustre.x86_64/zfs-0.7.13, 3.10.0-1160.25.1.el7.x86_64 for zfs 0.8+) |
@tonyhutter I think that debugging this doesn't really need an enclosure, just the possibility to override the enclosure path detection in zpool in order to set an enclosure path. Given this patch:
Using the same debug printing as in #11950 (comment) but instead running:
Something along this patch could be used to both debug the issue, and add a test that verifies that enclosure path propagation/refresh works after this issue is resolved. |
@ZNikke thanks that's really helpful. I'll give your |
@ZNikke I'm seeing what you're seeing with your |
When you create a pool, zfs writes vd->vdev_enc_sysfs_path with the enclosure sysfs path to the fault LEDs, like: vdev_enc_sysfs_path = /sys/class/enclosure/0:0:1:0/SLOT8 However, this enclosure path doesn't get updated on successive imports even if enclosure path to the disk changes. This patch fixes the issue. Signed-off-by: Tony Hutter <hutter2@llnl.gov> Fixes: openzfs#11950
When you create a pool, zfs writes vd->vdev_enc_sysfs_path with the enclosure sysfs path to the fault LEDs, like: vdev_enc_sysfs_path = /sys/class/enclosure/0:0:1:0/SLOT8 However, this enclosure path doesn't get updated on successive imports even if enclosure path to the disk changes. This patch fixes the issue. Signed-off-by: Tony Hutter <hutter2@llnl.gov> Fixes: openzfs#11950
When you create a pool, zfs writes vd->vdev_enc_sysfs_path with the enclosure sysfs path to the fault LEDs, like: vdev_enc_sysfs_path = /sys/class/enclosure/0:0:1:0/SLOT8 However, this enclosure path doesn't get updated on successive imports even if enclosure path to the disk changes. This patch fixes the issue. The largest part of this patch is moving for_each_vdev_vdev() and associated function from zpool_iter.c to libzutil. This was needed to make those functions visible to the cache import codepath for sysfs path re-scan. Signed-off-by: Tony Hutter <hutter2@llnl.gov> Fixes: openzfs#11950
When you create a pool, zfs writes vd->vdev_enc_sysfs_path with the enclosure sysfs path to the fault LEDs, like: vdev_enc_sysfs_path = /sys/class/enclosure/0:0:1:0/SLOT8 However, this enclosure path doesn't get updated on successive imports even if enclosure path to the disk changes. This patch fixes the issue. The largest part of this patch is moving for_each_vdev_vdev() and associated function from zpool_iter.c to libzutil. This was needed to make those functions visible to the cache import codepath for sysfs path re-scan. Signed-off-by: Tony Hutter <hutter2@llnl.gov> Fixes: openzfs#11950
When you create a pool, zfs writes vd->vdev_enc_sysfs_path with the enclosure sysfs path to the fault LEDs, like: vdev_enc_sysfs_path = /sys/class/enclosure/0:0:1:0/SLOT8 However, this enclosure path doesn't get updated on successive imports even if enclosure path to the disk changes. This patch fixes the issue. The largest part of this patch is moving for_each_vdev_vdev() and associated function from zpool_iter.c to libzutil. This was needed to make those functions visible to the cache import codepath for sysfs path re-scan. Signed-off-by: Tony Hutter <hutter2@llnl.gov> Fixes: openzfs#11950
When you create a pool, zfs writes vd->vdev_enc_sysfs_path with the enclosure sysfs path to the fault LEDs, like: vdev_enc_sysfs_path = /sys/class/enclosure/0:0:1:0/SLOT8 However, this enclosure path doesn't get updated on successive imports even if enclosure path to the disk changes. This patch fixes the issue. The largest part of this patch is moving for_each_vdev_vdev() and associated function from zpool_iter.c to libzutil. This was needed to make those functions visible to the cache import codepath for sysfs path re-scan. Signed-off-by: Tony Hutter <hutter2@llnl.gov> Fixes: openzfs#11950
When you create a pool, zfs writes vd->vdev_enc_sysfs_path with the enclosure sysfs path to the fault LEDs, like: vdev_enc_sysfs_path = /sys/class/enclosure/0:0:1:0/SLOT8 However, this enclosure path doesn't get updated on successive imports even if enclosure path to the disk changes. This patch fixes the issue. The largest part of this patch is moving for_each_vdev_vdev() and associated function from zpool_iter.c to libzutil. This was needed to make those functions visible to the cache import codepath for sysfs path re-scan. This also updates the .abi files so 'make checkabi' is happy. Signed-off-by: Tony Hutter <hutter2@llnl.gov> Fixes: openzfs#11950
When you create a pool, zfs writes vd->vdev_enc_sysfs_path with the enclosure sysfs path to the fault LEDs, like: vdev_enc_sysfs_path = /sys/class/enclosure/0:0:1:0/SLOT8 However, this enclosure path doesn't get updated on successive imports even if enclosure path to the disk changes. This patch fixes the issue. The largest part of this patch is moving for_each_vdev_vdev() and associated function from zpool_iter.c to libzutil. This was needed to make those functions visible to the cache import codepath for sysfs path re-scan. This also updates the .abi files so 'make checkabi' is happy. Signed-off-by: Tony Hutter <hutter2@llnl.gov> Fixes: openzfs#11950
When you create a pool, zfs writes vd->vdev_enc_sysfs_path with the enclosure sysfs path to the fault LEDs, like: vdev_enc_sysfs_path = /sys/class/enclosure/0:0:1:0/SLOT8 However, this enclosure path doesn't get updated on successive imports even if enclosure path to the disk changes. This patch fixes the issue. The largest part of this patch is moving for_each_vdev_vdev() and associated function from zpool_iter.c to libzutil. This was needed to make those functions visible to the cache import codepath for sysfs path re-scan. This also updates the .abi files so 'make checkabi' is happy. Signed-off-by: Tony Hutter <hutter2@llnl.gov> Fixes: openzfs#11950
When you create a pool, zfs writes vd->vdev_enc_sysfs_path with the enclosure sysfs path to the fault LEDs, like: vdev_enc_sysfs_path = /sys/class/enclosure/0:0:1:0/SLOT8 However, this enclosure path doesn't get updated on successive imports even if enclosure path to the disk changes. This patch fixes the issue. The largest part of this patch is moving for_each_vdev_vdev() and associated function from zpool_iter.c to libzutil. This was needed to make those functions visible to the cache import codepath for sysfs path re-scan. This also updates the .abi files so 'make checkabi' is happy. Signed-off-by: Tony Hutter <hutter2@llnl.gov> Fixes: openzfs#11950
When you create a pool, zfs writes vd->vdev_enc_sysfs_path with the enclosure sysfs path to the fault LEDs, like: vdev_enc_sysfs_path = /sys/class/enclosure/0:0:1:0/SLOT8 However, this enclosure path doesn't get updated on successive imports even if enclosure path to the disk changes. This patch fixes the issue. The largest part of this patch is moving for_each_vdev_vdev() and associated function from zpool_iter.c to libzutil. This was needed to make those functions visible to the cache import codepath for sysfs path re-scan. This also updates the .abi files so 'make checkabi' is happy. Signed-off-by: Tony Hutter <hutter2@llnl.gov> Fixes: openzfs#11950
When you create a pool, zfs writes vd->vdev_enc_sysfs_path with the enclosure sysfs path to the fault LEDs, like: vdev_enc_sysfs_path = /sys/class/enclosure/0:0:1:0/SLOT8 However, this enclosure path doesn't get updated on successive imports even if enclosure path to the disk changes. This patch fixes the issue. The largest part of this patch is moving for_each_vdev_vdev() and associated function from zpool_iter.c to libzutil. This was needed to make those functions visible to the cache import codepath for sysfs path re-scan. This also updates the .abi files so 'make checkabi' is happy. Signed-off-by: Tony Hutter <hutter2@llnl.gov> Fixes: openzfs#11950
When you create a pool, zfs writes vd->vdev_enc_sysfs_path with the enclosure sysfs path to the fault LEDs, like: vdev_enc_sysfs_path = /sys/class/enclosure/0:0:1:0/SLOT8 However, this enclosure path doesn't get updated on successive imports even if enclosure path to the disk changes. This patch fixes the issue. The largest part of this patch is moving for_each_vdev_vdev() and associated function from zpool_iter.c to libzutil. This was needed to make those functions visible to the cache import codepath for sysfs path re-scan. This also updates the .abi files so 'make checkabi' is happy. Signed-off-by: Tony Hutter <hutter2@llnl.gov> Fixes: openzfs#11950
When you create a pool, zfs writes vd->vdev_enc_sysfs_path with the enclosure sysfs path to the fault LEDs, like: vdev_enc_sysfs_path = /sys/class/enclosure/0:0:1:0/SLOT8 However, this enclosure path doesn't get updated on successive imports even if enclosure path to the disk changes. This patch fixes the issue. The largest part of this patch is moving for_each_vdev_vdev() and associated function from zpool_iter.c to libzutil. This was needed to make those functions visible to the cache import codepath for sysfs path re-scan. This also updates the .abi files so 'make checkabi' is happy. Signed-off-by: Tony Hutter <hutter2@llnl.gov> Fixes: openzfs#11950
When you create a pool, zfs writes vd->vdev_enc_sysfs_path with the enclosure sysfs path to the fault LEDs, like: vdev_enc_sysfs_path = /sys/class/enclosure/0:0:1:0/SLOT8 However, this enclosure path doesn't get updated on successive imports even if enclosure path to the disk changes. This patch fixes the issue. The largest part of this patch is moving for_each_vdev_vdev() and associated function from zpool_iter.c to libzutil. This was needed to make those functions visible to the cache import codepath for sysfs path re-scan. This also updates the .abi files so 'make checkabi' is happy. Signed-off-by: Tony Hutter <hutter2@llnl.gov> Fixes: openzfs#11950
When you create a pool, zfs writes vd->vdev_enc_sysfs_path with the enclosure sysfs path to the fault LEDs, like: vdev_enc_sysfs_path = /sys/class/enclosure/0:0:1:0/SLOT8 However, this enclosure path doesn't get updated on successive imports even if enclosure path to the disk changes. This patch fixes the issue. The largest part of this patch is moving for_each_vdev_vdev() and associated function from zpool_iter.c to libzutil. This was needed to make those functions visible to the cache import codepath for sysfs path re-scan. This also updates the .abi files so 'make checkabi' is happy. Signed-off-by: Tony Hutter <hutter2@llnl.gov> Fixes: openzfs#11950
When you create a pool, zfs writes vd->vdev_enc_sysfs_path with the enclosure sysfs path to the fault LEDs, like: vdev_enc_sysfs_path = /sys/class/enclosure/0:0:1:0/SLOT8 However, this enclosure path doesn't get updated on successive imports even if enclosure path to the disk changes. This patch fixes the issue. The largest part of this patch is moving for_each_vdev_vdev() and associated function from zpool_iter.c to libzutil. This was needed to make those functions visible to the cache import codepath for sysfs path re-scan. This also updates the .abi files so 'make checkabi' is happy. Signed-off-by: Tony Hutter <hutter2@llnl.gov> Fixes: openzfs#11950
When you create a pool, zfs writes vd->vdev_enc_sysfs_path with the enclosure sysfs path to the fault LEDs, like: vdev_enc_sysfs_path = /sys/class/enclosure/0:0:1:0/SLOT8 However, this enclosure path doesn't get updated on successive imports even if enclosure path to the disk changes. This patch fixes the issue. The largest part of this patch is moving for_each_vdev_vdev() and associated function from zpool_iter.c to libzutil. This was needed to make those functions visible to the cache import codepath for sysfs path re-scan. This also updates the .abi files so 'make checkabi' is happy. Signed-off-by: Tony Hutter <hutter2@llnl.gov> Fixes: openzfs#11950
When you create a pool, zfs writes vd->vdev_enc_sysfs_path with the enclosure sysfs path to the fault LEDs, like: vdev_enc_sysfs_path = /sys/class/enclosure/0:0:1:0/SLOT8 However, this enclosure path doesn't get updated on successive imports even if enclosure path to the disk changes. This patch fixes the issue. The largest part of this patch is moving for_each_vdev_vdev() and associated function from zpool_iter.c to libzutil. This was needed to make those functions visible to the cache import codepath for sysfs path re-scan. This also updates the .abi files so 'make checkabi' is happy. Signed-off-by: Tony Hutter <hutter2@llnl.gov> Fixes: openzfs#11950
When you create a pool, zfs writes vd->vdev_enc_sysfs_path with the enclosure sysfs path to the fault LEDs, like: vdev_enc_sysfs_path = /sys/class/enclosure/0:0:1:0/SLOT8 However, this enclosure path doesn't get updated on successive imports even if enclosure path to the disk changes. This patch fixes the issue. The largest part of this patch is moving for_each_vdev_vdev() and associated function from zpool_iter.c to libzutil. This was needed to make those functions visible to the cache import codepath for sysfs path re-scan. This also updates the .abi files so 'make checkabi' is happy. Signed-off-by: Tony Hutter <hutter2@llnl.gov> Fixes: openzfs#11950
When you create a pool, zfs writes vd->vdev_enc_sysfs_path with the enclosure sysfs path to the fault LEDs, like: vdev_enc_sysfs_path = /sys/class/enclosure/0:0:1:0/SLOT8 However, this enclosure path doesn't get updated on successive imports even if enclosure path to the disk changes. This patch fixes the issue. The largest part of this patch is moving for_each_vdev_vdev() and associated function from zpool_iter.c to libzutil. This was needed to make those functions visible to the cache import codepath for sysfs path re-scan. This also updates the .abi files so 'make checkabi' is happy. Signed-off-by: Tony Hutter <hutter2@llnl.gov> Fixes: openzfs#11950
When you create a pool, zfs writes vd->vdev_enc_sysfs_path with the enclosure sysfs path to the fault LEDs, like: vdev_enc_sysfs_path = /sys/class/enclosure/0:0:1:0/SLOT8 However, this enclosure path doesn't get updated on successive imports even if enclosure path to the disk changes. This patch fixes the issue. The largest part of this patch is moving for_each_vdev_vdev() and associated function from zpool_iter.c to libzutil. This was needed to make those functions visible to the cache import codepath for sysfs path re-scan. This also updates the .abi files so 'make checkabi' is happy. Signed-off-by: Tony Hutter <hutter2@llnl.gov> Fixes: openzfs#11950
When you create a pool, zfs writes vd->vdev_enc_sysfs_path with the enclosure sysfs path to the fault LEDs, like: vdev_enc_sysfs_path = /sys/class/enclosure/0:0:1:0/SLOT8 However, this enclosure path doesn't get updated on successive imports even if enclosure path to the disk changes. This patch fixes the issue. The largest part of this patch is moving for_each_vdev_vdev() and associated function from zpool_iter.c to libzfs_internal. This was needed to make those functions visible to the cache import codepath for sysfs path re-scan. libzfs_internal is for code that is used by both the libraries and the cmd/ code, but that we don't want to export with the ABI. Signed-off-by: Tony Hutter <hutter2@llnl.gov> Fixes: openzfs#11950
When you create a pool, zfs writes vd->vdev_enc_sysfs_path with the enclosure sysfs path to the fault LEDs, like: vdev_enc_sysfs_path = /sys/class/enclosure/0:0:1:0/SLOT8 However, this enclosure path doesn't get updated on successive imports even if enclosure path to the disk changes. This patch fixes the issue. The largest part of this patch is moving for_each_vdev_vdev() and associated function from zpool_iter.c to libzfs_internal. This was needed to make those functions visible to the cache import codepath for sysfs path re-scan. libzfs_internal is for code that is used by both the libraries and the cmd/ code, but that we don't want to export with the ABI. Signed-off-by: Tony Hutter <hutter2@llnl.gov> Fixes: openzfs#11950
When you create a pool, zfs writes vd->vdev_enc_sysfs_path with the enclosure sysfs path to the fault LEDs, like: vdev_enc_sysfs_path = /sys/class/enclosure/0:0:1:0/SLOT8 However, this enclosure path doesn't get updated on successive imports even if enclosure path to the disk changes. This patch fixes the issue. The largest part of this patch is moving for_each_vdev_vdev() and associated function from zpool_iter.c to libzfs_internal. This was needed to make those functions visible to the cache import codepath for sysfs path re-scan. libzfs_internal is for code that is used by both the libraries and the cmd/ code, but that we don't want to export with the ABI. Signed-off-by: Tony Hutter <hutter2@llnl.gov> Fixes: openzfs#11950
When you create a pool, zfs writes vd->vdev_enc_sysfs_path with the enclosure sysfs path to the fault LEDs, like: vdev_enc_sysfs_path = /sys/class/enclosure/0:0:1:0/SLOT8 However, this enclosure path doesn't get updated on successive imports even if enclosure path to the disk changes. This patch fixes the issue. The largest part of this patch is moving for_each_vdev_vdev() and associated function from zpool_iter.c to libzfs_internal. This was needed to make those functions visible to the cache import codepath for sysfs path re-scan. libzfs_internal is for code that is used by both the libraries and the cmd/ code, but that we don't want to export with the ABI. Signed-off-by: Tony Hutter <hutter2@llnl.gov> Fixes: openzfs#11950
When you create a pool, zfs writes vd->vdev_enc_sysfs_path with the enclosure sysfs path to the fault LEDs, like: vdev_enc_sysfs_path = /sys/class/enclosure/0:0:1:0/SLOT8 However, this enclosure path doesn't get updated on successive imports even if enclosure path to the disk changes. This patch fixes the issue. The largest part of this patch is moving for_each_vdev_vdev() and associated function from zpool_iter.c to libzfs_internal. This was needed to make those functions visible to the cache import codepath for sysfs path re-scan. libzfs_internal is for code that is used by both the libraries and the cmd/ code, but that we don't want to export with the ABI. Signed-off-by: Tony Hutter <hutter2@llnl.gov> Fixes: openzfs#11950
When you create a pool, zfs writes vd->vdev_enc_sysfs_path with the enclosure sysfs path to the fault LEDs, like: vdev_enc_sysfs_path = /sys/class/enclosure/0:0:1:0/SLOT8 However, this enclosure path doesn't get updated on successive imports even if enclosure path to the disk changes. This patch fixes the issue. The largest part of this patch is moving for_each_vdev_vdev() and associated function from zpool_iter.c to libzfs_internal. This was needed to make those functions visible to the cache import codepath for sysfs path re-scan. libzfs_internal is for code that is used by both the libraries and the cmd/ code, but that we don't want to export with the ABI. Signed-off-by: Tony Hutter <hutter2@llnl.gov> Fixes: openzfs#11950
When you create a pool, zfs writes vd->vdev_enc_sysfs_path with the enclosure sysfs path to the fault LEDs, like: vdev_enc_sysfs_path = /sys/class/enclosure/0:0:1:0/SLOT8 However, this enclosure path doesn't get updated on successive imports even if enclosure path to the disk changes. This patch fixes the issue. The largest part of this patch is moving for_each_vdev_vdev() and associated function from zpool_iter.c to libzfs_internal. This was needed to make those functions visible to the cache import codepath for sysfs path re-scan. libzfs_internal is for code that is used by both the libraries and the cmd/ code, but that we don't want to export with the ABI. Signed-off-by: Tony Hutter <hutter2@llnl.gov> Fixes: openzfs#11950
When you create a pool, zfs writes vd->vdev_enc_sysfs_path with the enclosure sysfs path to the fault LEDs, like: vdev_enc_sysfs_path = /sys/class/enclosure/0:0:1:0/SLOT8 However, this enclosure path doesn't get updated on successive imports even if enclosure path to the disk changes. This patch fixes the issue. The largest part of this patch is moving for_each_vdev_vdev() and associated function from zpool_iter.c to libzfs_internal. This was needed to make those functions visible to the cache import codepath for sysfs path re-scan. libzfs_internal is for code that is used by both the libraries and the cmd/ code, but that we don't want to export with the ABI. Signed-off-by: Tony Hutter <hutter2@llnl.gov> Fixes: openzfs#11950
When you create a pool, zfs writes vd->vdev_enc_sysfs_path with the enclosure sysfs path to the fault LEDs, like: vdev_enc_sysfs_path = /sys/class/enclosure/0:0:1:0/SLOT8 However, this enclosure path doesn't get updated on successive imports even if enclosure path to the disk changes. This patch fixes the issue. The largest part of this patch is moving for_each_vdev_vdev() and associated function from zpool_iter.c to libzfs_internal. This was needed to make those functions visible to the cache import codepath for sysfs path re-scan. libzfs_internal is for code that is used by both the libraries and the cmd/ code, but that we don't want to export with the ABI. Signed-off-by: Tony Hutter <hutter2@llnl.gov> Fixes: openzfs#11950
When you create a pool, zfs writes vd->vdev_enc_sysfs_path with the enclosure sysfs path to the fault LEDs, like: vdev_enc_sysfs_path = /sys/class/enclosure/0:0:1:0/SLOT8 However, this enclosure path doesn't get updated on successive imports even if enclosure path to the disk changes. This patch fixes the issue. The largest part of this patch is moving for_each_vdev_vdev() and associated function from zpool_iter.c to libzfs_internal. This was needed to make those functions visible to the cache import codepath for sysfs path re-scan. libzfs_internal is for code that is used by both the libraries and the cmd/ code, but that we don't want to export with the ABI. Signed-off-by: Tony Hutter <hutter2@llnl.gov> Fixes: openzfs#11950
When you create a pool, zfs writes vd->vdev_enc_sysfs_path with the enclosure sysfs path to the fault LEDs, like: vdev_enc_sysfs_path = /sys/class/enclosure/0:0:1:0/SLOT8 However, this enclosure path doesn't get updated on successive imports even if enclosure path to the disk changes. This patch fixes the issue. The largest part of this patch is moving for_each_vdev_vdev() and associated function from zpool_iter.c to libzfs_internal. This was needed to make those functions visible to the cache import codepath for sysfs path re-scan. libzfs_internal is for code that is used by both the libraries and the cmd/ code, but that we don't want to export with the ABI. Signed-off-by: Tony Hutter <hutter2@llnl.gov> Fixes: openzfs#11950
When you create a pool, zfs writes vd->vdev_enc_sysfs_path with the enclosure sysfs path to the fault LEDs, like: vdev_enc_sysfs_path = /sys/class/enclosure/0:0:1:0/SLOT8 However, this enclosure path doesn't get updated on successive imports even if enclosure path to the disk changes. This patch fixes the issue. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Tony Hutter <hutter2@llnl.gov> Closes #11950 Closes #12095
When you create a pool, zfs writes vd->vdev_enc_sysfs_path with the enclosure sysfs path to the fault LEDs, like: vdev_enc_sysfs_path = /sys/class/enclosure/0:0:1:0/SLOT8 However, this enclosure path doesn't get updated on successive imports even if enclosure path to the disk changes. This patch fixes the issue. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Tony Hutter <hutter2@llnl.gov> Closes openzfs#11950 Closes openzfs#12095
When you create a pool, zfs writes vd->vdev_enc_sysfs_path with the enclosure sysfs path to the fault LEDs, like: vdev_enc_sysfs_path = /sys/class/enclosure/0:0:1:0/SLOT8 However, this enclosure path doesn't get updated on successive imports even if enclosure path to the disk changes. This patch fixes the issue. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Tony Hutter <hutter2@llnl.gov> Closes openzfs#11950 Closes openzfs#12095
When you create a pool, zfs writes vd->vdev_enc_sysfs_path with the enclosure sysfs path to the fault LEDs, like: vdev_enc_sysfs_path = /sys/class/enclosure/0:0:1:0/SLOT8 However, this enclosure path doesn't get updated on successive imports even if enclosure path to the disk changes. This patch fixes the issue. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Tony Hutter <hutter2@llnl.gov> Closes openzfs#11950 Closes openzfs#12095
When you create a pool, zfs writes vd->vdev_enc_sysfs_path with the enclosure sysfs path to the fault LEDs, like: vdev_enc_sysfs_path = /sys/class/enclosure/0:0:1:0/SLOT8 However, this enclosure path doesn't get updated on successive imports even if enclosure path to the disk changes. This patch fixes the issue. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Tony Hutter <hutter2@llnl.gov> Closes openzfs#11950 Closes openzfs#12095
When you create a pool, zfs writes vd->vdev_enc_sysfs_path with the enclosure sysfs path to the fault LEDs, like: vdev_enc_sysfs_path = /sys/class/enclosure/0:0:1:0/SLOT8 However, this enclosure path doesn't get updated on successive imports even if enclosure path to the disk changes. This patch fixes the issue. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Tony Hutter <hutter2@llnl.gov> Closes openzfs#11950 Closes openzfs#12095
System information
Describe the problem you're observing
If enclosure path changes between reboots, the old enclosure path is still left in the configuration even though it should be updated on import, AIUI. Even after an explicit
zpool export
followed byzpool import
of the pool the old/wrong enclosure path is still present. It should be noted that the config does update other properties, like path (there seems to be some regression with our vdev_id.conf, see #11951, so the disk numbers are different with 2.1.0-rc4).As can be seen above, enclosure 2:0:7:0 isn't present anymore, but 2:0:16:0 now exists.
Describe how to reproduce the problem
Our enclosures are primarily HP D2600 and home-built ones based on HP DL180G6.
The enclosure device number seems to move depending on how many disks are inserted when plugged in. So for example if you have 3 disks in the enclosure, plug it in, and then fill it with disks, and then reboot the machine, you will find the enclosure on a different ID.
Include any warning/errors/backtraces from the system logs
The text was updated successfully, but these errors were encountered: