ryecoaaron This post follows on from: RE: Unable to delete 2 missing zfs file systems listed in OMV8
General Comments:
======================
As far as I can tell, this "re-write" does not extend to changing the underlying OO model & associated code and the main method for the zfs "pools datatable" is getZFSFlatAray().
From the end user perspective the re-arrangement of "action buttons" on the zfs "pools datatable" is much improved with corrected navigation, as are the on-screen messages when adding or deleting objects via the WebUI. These are very positive changes. But there a number of problems/bugs new and old.
Specific Test Comments:
=========================
1. The new "discover" options:
CASE A - filesystems with on children
1.1 Add - OK
Adding a zfs fs at CLI and then hitting "Add" adds entry to config.xml
1.2 Add + Delete Missing - new bug ?
Applied to a a referenced filesystem leaves an orphaned "shared folder" entry in config.xml and an "UNAVAILABLE" status on the "shared folder" tab.
1.3 Delete Missing - new bug ?
Delete missing applied to a referenced filesystem leaves an orphaned "shared folder" entry in config.xml and an "UNAVAILABLE" status on the "shared folder" tab.
CASE B - filesystems with children
1.4 Add - OK
Add a new child at CLI fs is OK.
add parent and server children at CLI works.
1.5 Add + Delete Missing - new bug?
As 1.6.
1.6 Delete Missing - new bug?
Delete parent fs at CLI with "zfs destroy -r ...." Flagged as missing in Filesystem tab and one unavailable in shared folder tab for what was a referenced fs. Option fixes fs tab but leaves orphaned "shared folder".
In summary, it works but leaves the question of how best to handle clean up of CLI deletion of a referenced zfs fs.
Is "discover" the right name for this newly expanded function? Wouldn't "sync to config", or similar, be a better name? After all the "discover button" doesn't discover anything. It attempts to "sync" fs in zpools to fs in config" as determined by a set of rules/conditions. It doesn't "discover" if the pool and config are out of sync.
2. Add a snapshot - new bug
Adding an ad-hoc snapshot has lost the "manual + $(date ...)" naming ???
3. Information button - new & old bug
3.1 Selecting the "information button" for a row with "type = Pool" displays zpool status multiple times (new bug) and includes unnecessary zfs properties (old problem). Displaying top-level filesystem details as part fo the "Pool information" is redundant as selecting the "properties button" for a row with "type = Pool" still displays a zfs properties table screen. Amend getObjectDetails() for case 'Pool' to only display the output of "zpool status -v", "zpool list -v" and "zpool get all".
3.2 Selecting the "information button" for a row with "type = Filesystem" just duplicates info retrieved when "properties button" is pressed. Adding the output of the the following command to the "details" of the selected dataset will make the function useful:
zfs list -o name,type,used,avail,refer,mountpoint,compression,compressratio,encryption
4. Scrub button - old bug
Selecting the "scrub button" when a scrub is already running generates an on-screen RED ERROR (old bug) -
Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LC_ALL=C.UTF-8; export LANGUAGE=; zpool scrub 'OMVtank' 2>&1' with exit code '1': cannot scrub OMVtank: currently scrubbing; use 'zpool scrub -s' to cancel scrub
OMV\ExecException: Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LC_ALL=C.UTF-8; export LANGUAGE=; zpool scrub 'OMVtank' 2>&1' with exit code '1': cannot scrub OMVtank: currently scrubbing; use 'zpool scrub -s' to cancel scrub in /usr/share/php/openmediavault/system/process.inc:247
Stack trace:
#0 /usr/share/openmediavault/engined/rpc/zfs.inc(622): OMV\System\Process->execute()
#1 /usr/share/openmediavault/engined/rpc/zfs.inc(485): OMVRpcServiceZFS::zfsExec()
#2 [internal function]: OMVRpcServiceZFS->scrubPool()
#3 /usr/share/php/openmediavault/rpc/serviceabstract.inc(124): call_user_func_array()
#4 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod()
#5 /usr/sbin/omv-engined(546): OMV\Rpc\Rpc::call()
#6 {main}
Display More
The scrub function should check the current scrub status and at least provided a option which toggles between start/stop state, or supports start,stop,pause and resume states.
4. Table Columns - old bug - please remove the "size" col.
The columns in each row is a composite, neither wholly "pool" nor "filesystem/volume" data. The values in the "size" column ("used" + "avail") are bogus and meaningless in the context of ZFS and should be removed. Storage space accounting in ZFS is not straightforward. ZFS datasets may have potential maximum "size" at any given moment, but it's dynamic and dependent on all other datasets in the pool and factors such a quotas and reservations need to be taken into account.
If and when the zfs encryption functions become part of the WebUI, removing the "size" col would give space for a "enc" indicator in the pools table data.