/dev/zvol does not show pool directories
Currently the devzvol code caches a list of all the zpools on the system. It gets this list by doing an LDI ioctl against
/dev/zfs. This code runs on the first readdir to
/dev/zvol after boot.
If the first thing that does readdir on
/dev/zvol is a non-global zone with no delegated datasets, it will return an empty list of zpools (since it can see none). Then this will be cached globally, affecting all other zones as well.
We have a couple of options here:
- Make sure the zpool list always gets the full list of system pools (it will be culled to the zone's accessible subset anyway later)
- Make the cache scoped to per-zone or per-mount (seems pretty messy, there's currently not enough context at vfs mount time)
- Drop the caching altogether (probably not acceptable, though some measurements might be nice)
Went for the approach of making zpool list always get full system list, by doing the ldi ioctl from a taskq.
Updated by Electric Monk over 8 years ago
- Status changed from New to Closed
commit 0ad555ad6a787635be8c8a424168dc59cfbce6c7 Author: Alex Wilson <firstname.lastname@example.org> Date: 2015-09-02T00:28:54.000Z 6174 /dev/zvol does not show pool directories Reviewed by: Robert Mustacchi <email@example.com> Reviewed by: Jason King <firstname.lastname@example.org> Approved by: Dan McDonald <email@example.com>