- $vdevs = $pool->getVdevs();
- $vdev_type = $vdevs[0]->getType();
- switch ($vdev_type) {
- case OMVModuleZFSVdevType::OMVMODULEZFSMIRROR:
- $pool_type = "Mirror";
- break;
- case OMVModuleZFSVdevType::OMVMODULEZFSPLAIN:
- $pool_type = "Basic";
- break;
- case OMVModuleZFSVdevType::OMVMODULEZFSRAIDZ1:
- $pool_type = "Raidz1";
- break;
- case OMVModuleZFSVdevType::OMVMODULEZFSRAIDZ2:
- $pool_type = "Raidz2";
- break;
- case OMVModuleZFSVdevType::OMVMODULEZFSRAIDZ3:
- $pool_type = "Raidz3";
- break;
- }
- $tmp['pool_type'] = $pool_type;
- $tmp['nr_disks'] = count($vdevs[0]->getDisks());