Fix ZFS pool detection: bind-mount host zpool binary and libs
This commit is contained in:
@@ -4,6 +4,9 @@ import logging
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
# Allow overriding the zpool binary path via env (for bind-mounted host tools)
|
||||
ZPOOL_BIN = os.environ.get("ZPOOL_BIN", "zpool")
|
||||
|
||||
|
||||
async def get_zfs_pool_map() -> dict[str, str]:
|
||||
"""Return a dict mapping device names to ZFS pool names.
|
||||
@@ -13,7 +16,7 @@ async def get_zfs_pool_map() -> dict[str, str]:
|
||||
pool_map = {}
|
||||
try:
|
||||
proc = await asyncio.create_subprocess_exec(
|
||||
"zpool", "status", "-P",
|
||||
ZPOOL_BIN, "status", "-P",
|
||||
stdout=asyncio.subprocess.PIPE,
|
||||
stderr=asyncio.subprocess.PIPE,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user