]> git.proxmox.com Git - pve-storage.git/commit - PVE/Storage/ZFSPoolPlugin.pm
improve zpool activate_storage
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Fri, 25 Nov 2016 09:29:22 +0000 (10:29 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 29 Nov 2016 08:29:33 +0000 (09:29 +0100)
commite2e63801129e96455d0b45a567f9b9638496e585
treed69eb3b297f54ebff27df6c466bb909a1d0c3551
parent4b7dd9d7434801edb893cc281a9f75cb526cb3a8
improve zpool activate_storage

the old code was way too broad here, this fixes at least the
following issues:
- importing of other/unconfigured zpools by "import -a"
- possible false positives if a pool name is a substring of
  another pool name because of "list" without pool name,
  potentially skipping activation for such pools
- not noticing failure to activate in activate_storage
  because the success of "zpool import -a" does not tell us
  anything about the pool we actually wanted to import

checking specifically for the pool to be activated when
calling "zpool list" gets rid of the second issue, and
trying to import only that pool fixes the other two.
PVE/Storage/ZFSPoolPlugin.pm