Giter VIP home page Giter VIP logo

zetawatch's Introduction

ZetaWatch

ZetaWatch displaying pool status and filesystems

ZetaWatch is a small OS X program that displays the zfs status in the menu bar, similar to what iStat Menus does for other information. It is fairly well tested, but due to the current state of libzfs and libzfs_core, changes will be required until the API stabilizes. ZetaWatch is usually compiled for the latest available ZFS release for Mac OS, and might not be compatible with other releases.

Currently supported features are:

  • Show pool, vdev, filesystem stats
  • Show pool / filesystem properties
  • Start, stop, pause scrubs, and monitor their progress.
  • Import and Export pools manually, or auto-import when they become available
  • Mount / unmount datasets manually or at pool import automatically
  • Load/Unload encryption keys for encrypted datasets manually or automatically
  • Optionally store pass phrases in the Mac OS X Keychain
  • Create, Display, Delete, Clone Snapshots or roll back to them
  • Report errors in notification center when they are discovered

Installation

ZetaWatch Releases can be downloaded from the GitHub Releases Page. Please verify that the Version of ZetaWatch matches your ZFS Version. Usually, only the newest official Release is supported, since code changes are sometimes required to be fully compatible with the new library version.

ZetaWatch does not require manual installation. Simply copy it into /Application or where ever else it fits. The bundled helper tool gets installed automatically the first time the program is started. This requires user-authentication.

ZetaWatch supports auto updates, if enabled.

For Developers

ZFS Interaction

ZetaWatch communicates with zfs using libzfs.dylib, libzfs_core.dylib , libzpool.dylib and libnvpair.dylib, just like the command line tools do. This gives it all the flexibility of the command line tools, at the cost of having to reimplement functionality that is found in the tools and not the library. And since the libraries are explicitly not meant to provide a stable ABI, ZetaWatch is also closely coupled to the ZFS version it is built and written for.

All the ZFS interaction is wrapped in the ZFSWrapper library. This C++ library isolates the issues mentioned above and provides a more convenient and safe API than the original C interface does. The library is used both by the helper tool and the frontend app. This is the most reusable part of ZetaWatch, and might be split out as separate project later.

  • ZFSUtils contains most of the advanced functionality, such as C++ Wrappers around the library, pool, vdev or file system handles. Those classes also have functionality to query state and iterate over members.
  • ZFSNVList provides a wrapper around the nvpair_t / nvlist_t data structure that is used in ZFS for a lot of userland / kernel communication. It manages resources in both owning and non-owning fashion, and allows for easier iteration over sequences.
  • ZFSStrings translate ZFS status enums into the user facing emoji or string description, optionally with localization. (Localization is not well tested or supported at the moment.)

Helper Tool

The implementation of the helper tool follows apple's EvenBetterAuthorizationSample.

The helper tool communicates with the user application via AuthorizationService and NSXPCConnection. The application side of code for this is in ZetaAuthorization.m. The RPC protocol can be found in ZetaAuthorizationHelperProtocol.h, and is implemented in ZetaAuthorizationHelper.mm. The CommonAuthorization.m file contains the supported commands and associated default permissions.

The helper tool can be uninstalled with the uninstall-helper.sh script. This is useful for debugging the installation of the helper, or updating the helper without increasing the bundle version.

Authorization

The ZetaWatch helper tool uses the Security framework to authorize users before performing privileged operations. It currently supports the following permissions.

  • net.the-color-black.ZetaWatch.import, allowed by default, required for importing a pool.
  • net.the-color-black.ZetaWatch.export, allowed by default, required for exporting a pool.
  • net.the-color-black.ZetaWatch.mount, allowed by default, required for mounting a dataset.
  • net.the-color-black.ZetaWatch.unmount, allowed by default, required for unmounting a dataset.
  • net.the-color-black.ZetaWatch.snapshot, allowed by default, required for creating a snapshot.
  • net.the-color-black.ZetaWatch.rollback, requires admin authentication by default, required for rolling back a filesystem.
  • net.the-color-black.ZetaWatch.clone, requires admin authentication by default, required for cloning a filesystem.
  • net.the-color-black.ZetaWatch.create, requires admin authentication by default, required for creating a new filesystem.
  • net.the-color-black.ZetaWatch.destroy, requires admin authentication by default, required for destroying a filesystem or snapshot.
  • net.the-color-black.ZetaWatch.key, allowed by default, required for loading or unloading a key for a dataset. This also includes the ability to auto mount / unmount them.
  • net.the-color-black.ZetaWatch.scrub, allowed by default, required for starting, stopping or pausing scrubs.

These permissions can be manipulated via the security command line program. To inspect the current dataset creation permissions, and switching it to allow this to all users:

security authorizationdb read net.the-color-black.ZetaWatch.create
security authorizationdb write net.the-color-black.ZetaWatch.create allow

Permissions include allow, deny or authenticate-admin.

More detailed information about this topic can be found in the article apples documentation about AuthorizationServices and Managing the Authorization Database in OS X Mavericks.

Security & Code Signing

Official release builds are signed and notarized, and should run without issues even on newer Mac OS X. But there are still issues with authentication reported with the program not being recognized as signed. To verify security manually, the following commands can be used:

codesign -v -v -d ZetaWatch.app
xcrun stapler validate -v ZetaWatch.app

Building ZetaWatch requires an apple developer account with DeveloperID signing capabilities, since it uses SMJobBless to run a helper service as root. This service executes actions on behalf of the user, such as mounting, unmounting or loading a key. Notarization is required to create binaries that can be run without without warning on the newest Mac OS X.

Self Updating

The self-updating uses SparkleFramework. Since the newest released sparkle does not yet support hardened runtime, it needs to be compiled manually. Building the "Distribution" target in the Sparkle submodule in release mode is sufficient. The sparkle submodule contains a version that is slimmed down by removing most languages, which saves space. Since ZetaWatch is not localized, this is not a problem. To create a working fork, adjust the public key and update url in the Info.plist file.

ZFS Binary Compatibility

Since ZetaWatch directly links to the zfs libraries, it only works if those are compatible. And while Sparkle has built-in support for OS compatibility checking, it doesn't have the same for other dependencies. There is support for custom appcast filtering, to select a suitable version, but since the ZFS version and the ZetaWatch version are kind of orthogonal, this didn't seem fitting.

The chosen solution was to have a ZFS version specific appcast URL, and make ZetaWatch query the appropriate appcast. This allows updating ZetaWatch when the used ZFS version changes, but also have several supported parallel builds. Currently, the only supported ZFS version is 1.9.

License

This program is copyrighted by me, because I wrote it. This program is licensed under the "3-clause BSD" License. See the LICENSE.md file for details.

zetawatch's People

Contributors

cbreak-black avatar vitorgalvao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zetawatch's Issues

OpenZFS on Mac is now 2.2.2. ZetaWatch mostly works.

I have OpenZFS 2.2.2 installed on macOS Sonoma on a M1 Ultra Studio. Since upgrading my macOS and OpenZFS on it, ZetaWatch still works, but scrubbing is messed up. It says "Never Scrubbed". It does have the option to "Start Scrub", and it does indeed start scrubbing. But it doesn't give any updates on the scrub and still says "Never Scrubbed" for the pool.

It did, however, show when I had 1 CRC error on my pool. Hence, I scrubbed it.

https://openzfsonosx.org/wiki/Downloads

zfs-2.2.2-1
zfs-kmod-2.2.2-1

Breaks with the OpenZFS 2.1.99 test build

The new OpenZFS 2.1.99 test build breaks ZetaWatch. Error is Couldn't communicate with a helper application. Also got one "ZFS encountered an error: Internal nvlist structure size does not match video_sta...

Scheduled Scrubs

Have you considered implementing a way to schedule and activate scrubs?

ARM version doesn't run

Hi,

I get the following crash report:

-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Process:               net.the-color-black.ZetaAuthorizationHelper [1033]
Path:                  /Library/PrivilegedHelperTools/net.the-color-black.ZetaAuthorizationHelper
Identifier:            net.the-color-black.ZetaAuthorizationHelper
Version:               ???
Code Type:             ARM-64 (Native)
Parent Process:        launchd [1]
User ID:               0

Date/Time:             2022-12-04 22:22:30.3074 +0100
OS Version:            macOS 12.6.1 (21G217)
Report Version:        12
Anonymous UUID:        403AAFF1-90BE-5D70-C84C-F7EB6830469C


Time Awake Since Boot: 47 seconds

System Integrity Protection: enabled

Crashed Thread:        1  Dispatch queue: com.apple.NSXPCConnection.user.net.the-color-black.ZetaAuthorizationHelper.1025

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Reason:    Namespace DYLD, Code 4 Symbol missing
missing symbol called
(terminated at launch; ignore backtrace)

Kernel Triage:
VM - pmap_enter failed with resource shortage


Thread 0::  Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	       0x19504e8b0 mach_msg_trap + 8
1   libsystem_kernel.dylib        	       0x19504ed20 mach_msg + 76
2   CoreFoundation                	       0x195159210 __CFRunLoopServiceMachPort + 372
3   CoreFoundation                	       0x1951576c0 __CFRunLoopRun + 1180
4   CoreFoundation                	       0x195156a84 CFRunLoopRunSpecific + 600
5   Foundation                    	       0x19603c0c0 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 236
6   net.the-color-black.ZetaAuthorizationHelper	       0x104904ed0 0x104900000 + 20176
7   net.the-color-black.ZetaAuthorizationHelper	       0x1049038e8 0x104900000 + 14568
8   dyld                          	       0x10499908c start + 520

Thread 1 Crashed::  Dispatch queue: com.apple.NSXPCConnection.user.net.the-color-black.ZetaAuthorizationHelper.1025
0   dyld                          	       0x1049dfe98 __abort_with_payload + 8
1   dyld                          	       0x1049e7024 abort_with_payload_wrapper_internal + 104
2   dyld                          	       0x1049e7058 abort_with_payload + 16
3   dyld                          	       0x10499ea28 dyld4::halt(char const*) + 580
4   dyld                          	       0x1049bd504 dyld4::APIs::_dyld_missing_symbol_abort() + 44
5   net.the-color-black.ZetaAuthorizationHelper	       0x1049119f0 0x104900000 + 72176
6   net.the-color-black.ZetaAuthorizationHelper	       0x1049060ac 0x104900000 + 24748
7   Foundation                    	       0x1960a10c0 __NSXPCCONNECTION_IS_CALLING_OUT_TO_EXPORTED_OBJECT_S3__ + 16
8   Foundation                    	       0x196045678 -[NSXPCConnection _decodeAndInvokeMessageWithEvent:flags:] + 1844
9   Foundation                    	       0x195ff9b08 message_handler + 228
10  libxpc.dylib                  	       0x194dc11c0 _xpc_connection_call_event_handler + 152
11  libxpc.dylib                  	       0x194dbfc0c _xpc_connection_mach_event + 1380
12  libdispatch.dylib             	       0x194ec8274 _dispatch_client_callout4 + 20
13  libdispatch.dylib             	       0x194ee453c _dispatch_mach_msg_invoke + 464
14  libdispatch.dylib             	       0x194ecf784 _dispatch_lane_serial_drain + 376
15  libdispatch.dylib             	       0x194ee525c _dispatch_mach_invoke + 456
16  libdispatch.dylib             	       0x194ecf784 _dispatch_lane_serial_drain + 376
17  libdispatch.dylib             	       0x194ed0438 _dispatch_lane_invoke + 444
18  libdispatch.dylib             	       0x194edac98 _dispatch_workloop_worker_thread + 648
19  libsystem_pthread.dylib       	       0x195088360 _pthread_wqthread + 288
20  libsystem_pthread.dylib       	       0x195087080 start_wqthread + 8

Thread 2:
0   libsystem_pthread.dylib       	       0x195087078 start_wqthread + 0


Thread 1 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000006   x1: 0x0000000000000004   x2: 0x000000016b5854f8   x3: 0x0000000000000014
    x4: 0x000000016b5850f8   x5: 0x0000000000000000   x6: 0x0000000000000000   x7: 0x0000000000000000
    x8: 0x0000000000000020   x9: 0x0000000000000009  x10: 0x0000000000000000  x11: 0x0000000000000000
   x12: 0x0000000000000000  x13: 0x0000000000000031  x14: 0x0000000009600000  x15: 0x00000001edae9ea0
   x16: 0x0000000000000209  x17: 0x000000010499714c  x18: 0x0000000000000000  x19: 0x0000000000000000
   x20: 0x000000016b5850f8  x21: 0x0000000000000014  x22: 0x000000016b5854f8  x23: 0x0000000000000004
   x24: 0x0000000000000006  x25: 0x000000016b5850f8  x26: 0x0000000000000400  x27: 0x0000000000000400
   x28: 0x0000000000000000   fp: 0x000000016b5850c0   lr: 0x00000001049e7024
    sp: 0x000000016b585080   pc: 0x00000001049dfe98 cpsr: 0x00001000
   far: 0x000000013271c000  esr: 0x56000080  Address size fault

Binary Images:
       0x19504d000 -        0x195084fff libsystem_kernel.dylib (*) <dbf55fdd-2b9b-3701-93b6-7a3ce359bd0e> /usr/lib/system/libsystem_kernel.dylib
       0x1950d4000 -        0x19561afff com.apple.CoreFoundation (6.9) <fc3c193d-0cdb-3569-9f0e-bd2507ca1dbb> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
       0x195fd8000 -        0x1963c9fff com.apple.Foundation (6.9) <8bbf8f9b-0034-34f0-a2c5-13c31941632d> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
       0x104900000 -        0x10492ffff net.the-color-black.ZetaAuthorizationHelper (*) <a6a5a8d3-31bf-3462-bf6f-d5f1969d1643> /Library/PrivilegedHelperTools/net.the-color-black.ZetaAuthorizationHelper
       0x104994000 -        0x1049f3fff dyld (*) <24d09537-e51b-350e-b59e-181c9d94d291> /usr/lib/dyld
       0x194db3000 -        0x194df4fff libxpc.dylib (*) <21d05a8b-d782-3fa7-9a9d-55a45e6e6621> /usr/lib/system/libxpc.dylib
       0x194ec4000 -        0x194f0afff libdispatch.dylib (*) <b3c7a004-1069-3171-b630-2c386a8b399c> /usr/lib/system/libdispatch.dylib
       0x195085000 -        0x195091fff libsystem_pthread.dylib (*) <63c4eef9-69a5-38b1-996e-8d31b66a051d> /usr/lib/system/libsystem_pthread.dylib

External Modification Summary:
  Calls made by other processes targeting this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by all processes on this machine:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=663.8M resident=0K(0%) swapped_out_or_unallocated=663.8M(100%)
Writable regions: Total=558.7M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=558.7M(100%)

                                VIRTUAL   REGION 
REGION TYPE                        SIZE    COUNT (non-coalesced) 
===========                     =======  ======= 
Activity Tracing                   256K        1 
Kernel Alloc Once                   32K        1 
MALLOC                           164.2M       17 
MALLOC guard page                   96K        5 
MALLOC_NANO (reserved)           384.0M        1         reserved VM address space (unallocated)
STACK GUARD                       56.0M        3 
Stack                             9264K        3 
__AUTH                             220K       44 
__AUTH_CONST                      2891K      122 
__DATA                            2429K      125 
__DATA_CONST                      4160K      134 
__DATA_DIRTY                       233K       50 
__LINKEDIT                       579.7M       13 
__OBJC_CONST                       260K       29 
__OBJC_RO                         83.0M        1 
__OBJC_RW                         3168K        1 
__TEXT                            84.1M      140 
__UNICODE                          592K        1 
dyld private memory               1024K        1 
mapped file                       29.0M        2 
shared memory                       48K        3 
===========                     =======  ======= 
TOTAL                              1.4G      697 
TOTAL, minus reserved VM space     1.0G      697 



-----------
Full Report
-----------

{"app_name":"net.the-color-black.ZetaAuthorizationHelper","timestamp":"2022-12-04 22:22:35.00 +0100","app_version":"","slice_uuid":"a6a5a8d3-31bf-3462-bf6f-d5f1969d1643","build_version":"","platform":1,"share_with_app_devs":1,"is_first_party":1,"bug_type":"309","os_version":"macOS 12.6.1 (21G217)","incident_id":"6921ABE2-ACD2-435B-B52A-2847201535CB","name":"net.the-color-black.ZetaAuthorizationHelper"}
{
  "uptime" : 47,
  "procLaunch" : "2022-12-04 22:22:25.3126 +0100",
  "procRole" : "Unspecified",
  "version" : 2,
  "userID" : 0,
  "deployVersion" : 210,
  "modelCode" : "MacBookAir10,1",
  "procStartAbsTime" : 1030157810,
  "coalitionID" : 906,
  "osVersion" : {
    "train" : "macOS 12.6.1",
    "build" : "21G217",
    "releaseType" : "User"
  },
  "captureTime" : "2022-12-04 22:22:30.3074 +0100",
  "incident" : "6921ABE2-ACD2-435B-B52A-2847201535CB",
  "bug_type" : "309",
  "pid" : 1033,
  "procExitAbsTime" : 1149696000,
  "translated" : false,
  "cpuType" : "ARM-64",
  "procName" : "net.the-color-black.ZetaAuthorizationHelper",
  "procPath" : "\/Library\/PrivilegedHelperTools\/net.the-color-black.ZetaAuthorizationHelper",
  "parentProc" : "launchd",
  "parentPid" : 1,
  "coalitionName" : "net.the-color-black.ZetaAuthorizationHelper",
  "crashReporterKey" : "403AAFF1-90BE-5D70-C84C-F7EB6830469C",
  "sip" : "enabled",
  "isCorpse" : 1,
  "exception" : {"codes":"0x0000000000000000, 0x0000000000000000","rawCodes":[0,0],"type":"EXC_CRASH","signal":"SIGABRT"},
  "termination" : {"code":4,"flags":518,"namespace":"DYLD","indicator":"Symbol missing","details":["(terminated at launch; ignore backtrace)"],"reasons":["missing symbol called"]},
  "ktriageinfo" : "VM - pmap_enter failed with resource shortage\n",
  "extMods" : {"caller":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"system":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"targeted":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"warnings":0},
  "faultingThread" : 1,
  "threads" : [{"id":7127,"queue":"com.apple.main-thread","frames":[{"imageOffset":6320,"symbol":"mach_msg_trap","symbolLocation":8,"imageIndex":0},{"imageOffset":7456,"symbol":"mach_msg","symbolLocation":76,"imageIndex":0},{"imageOffset":545296,"symbol":"__CFRunLoopServiceMachPort","symbolLocation":372,"imageIndex":1},{"imageOffset":538304,"symbol":"__CFRunLoopRun","symbolLocation":1180,"imageIndex":1},{"imageOffset":535172,"symbol":"CFRunLoopRunSpecific","symbolLocation":600,"imageIndex":1},{"imageOffset":409792,"symbol":"-[NSRunLoop(NSRunLoop) runMode:beforeDate:]","symbolLocation":236,"imageIndex":2},{"imageOffset":20176,"imageIndex":3},{"imageOffset":14568,"imageIndex":3},{"imageOffset":20620,"symbol":"start","symbolLocation":520,"imageIndex":4}]},{"triggered":true,"id":7445,"threadState":{"x":[{"value":6},{"value":4},{"value":6095918328},{"value":20},{"value":6095917304},{"value":0},{"value":0},{"value":0},{"value":32},{"value":9},{"value":0},{"value":0},{"value":0},{"value":49},{"value":157286400},{"value":8282611360,"symbolLocation":0,"symbol":"OBJC_CLASS_$___NSArrayI"},{"value":521},{"value":4372132172,"symbolLocation":392,"symbol":"__simple_bprintf"},{"value":0},{"value":0},{"value":6095917304},{"value":20},{"value":6095918328},{"value":4},{"value":6},{"value":6095917304},{"value":1024},{"value":1024},{"value":0}],"flavor":"ARM_THREAD_STATE64","lr":{"value":4372459556},"cpsr":{"value":4096},"fp":{"value":6095917248},"sp":{"value":6095917184},"esr":{"value":1442840704,"description":" Address size fault"},"pc":{"value":4372430488,"matchesCrashFrame":1},"far":{"value":5141282816}},"queue":"com.apple.NSXPCConnection.user.net.the-color-black.ZetaAuthorizationHelper.1025","frames":[{"imageOffset":310936,"symbol":"__abort_with_payload","symbolLocation":8,"imageIndex":4},{"imageOffset":340004,"symbol":"abort_with_payload_wrapper_internal","symbolLocation":104,"imageIndex":4},{"imageOffset":340056,"symbol":"abort_with_payload","symbolLocation":16,"imageIndex":4},{"imageOffset":43560,"symbol":"dyld4::halt(char const*)","symbolLocation":580,"imageIndex":4},{"imageOffset":169220,"symbol":"dyld4::APIs::_dyld_missing_symbol_abort()","symbolLocation":44,"imageIndex":4},{"imageOffset":72176,"imageIndex":3},{"imageOffset":24748,"imageIndex":3},{"imageOffset":823488,"symbol":"__NSXPCCONNECTION_IS_CALLING_OUT_TO_EXPORTED_OBJECT_S3__","symbolLocation":16,"imageIndex":2},{"imageOffset":448120,"symbol":"-[NSXPCConnection _decodeAndInvokeMessageWithEvent:flags:]","symbolLocation":1844,"imageIndex":2},{"imageOffset":137992,"symbol":"message_handler","symbolLocation":228,"imageIndex":2},{"imageOffset":57792,"symbol":"_xpc_connection_call_event_handler","symbolLocation":152,"imageIndex":5},{"imageOffset":52236,"symbol":"_xpc_connection_mach_event","symbolLocation":1380,"imageIndex":5},{"imageOffset":17012,"symbol":"_dispatch_client_callout4","symbolLocation":20,"imageIndex":6},{"imageOffset":132412,"symbol":"_dispatch_mach_msg_invoke","symbolLocation":464,"imageIndex":6},{"imageOffset":46980,"symbol":"_dispatch_lane_serial_drain","symbolLocation":376,"imageIndex":6},{"imageOffset":135772,"symbol":"_dispatch_mach_invoke","symbolLocation":456,"imageIndex":6},{"imageOffset":46980,"symbol":"_dispatch_lane_serial_drain","symbolLocation":376,"imageIndex":6},{"imageOffset":50232,"symbol":"_dispatch_lane_invoke","symbolLocation":444,"imageIndex":6},{"imageOffset":93336,"symbol":"_dispatch_workloop_worker_thread","symbolLocation":648,"imageIndex":6},{"imageOffset":13152,"symbol":"_pthread_wqthread","symbolLocation":288,"imageIndex":7},{"imageOffset":8320,"symbol":"start_wqthread","symbolLocation":8,"imageIndex":7}]},{"id":7446,"frames":[{"imageOffset":8312,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":7}]}],
  "usedImages" : [
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6795087872,
    "size" : 229376,
    "uuid" : "dbf55fdd-2b9b-3701-93b6-7a3ce359bd0e",
    "path" : "\/usr\/lib\/system\/libsystem_kernel.dylib",
    "name" : "libsystem_kernel.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6795640832,
    "CFBundleShortVersionString" : "6.9",
    "CFBundleIdentifier" : "com.apple.CoreFoundation",
    "size" : 5533696,
    "uuid" : "fc3c193d-0cdb-3569-9f0e-bd2507ca1dbb",
    "path" : "\/System\/Library\/Frameworks\/CoreFoundation.framework\/Versions\/A\/CoreFoundation",
    "name" : "CoreFoundation",
    "CFBundleVersion" : "1866"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6811385856,
    "CFBundleShortVersionString" : "6.9",
    "CFBundleIdentifier" : "com.apple.Foundation",
    "size" : 4136960,
    "uuid" : "8bbf8f9b-0034-34f0-a2c5-13c31941632d",
    "path" : "\/System\/Library\/Frameworks\/Foundation.framework\/Versions\/C\/Foundation",
    "name" : "Foundation",
    "CFBundleVersion" : "1866"
  },
  {
    "source" : "P",
    "arch" : "arm64",
    "base" : 4371513344,
    "size" : 196608,
    "uuid" : "a6a5a8d3-31bf-3462-bf6f-d5f1969d1643",
    "path" : "\/Library\/PrivilegedHelperTools\/net.the-color-black.ZetaAuthorizationHelper",
    "name" : "net.the-color-black.ZetaAuthorizationHelper"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 4372119552,
    "size" : 393216,
    "uuid" : "24d09537-e51b-350e-b59e-181c9d94d291",
    "path" : "\/usr\/lib\/dyld",
    "name" : "dyld"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6792359936,
    "size" : 270336,
    "uuid" : "21d05a8b-d782-3fa7-9a9d-55a45e6e6621",
    "path" : "\/usr\/lib\/system\/libxpc.dylib",
    "name" : "libxpc.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6793478144,
    "size" : 290816,
    "uuid" : "b3c7a004-1069-3171-b630-2c386a8b399c",
    "path" : "\/usr\/lib\/system\/libdispatch.dylib",
    "name" : "libdispatch.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6795317248,
    "size" : 53248,
    "uuid" : "63c4eef9-69a5-38b1-996e-8d31b66a051d",
    "path" : "\/usr\/lib\/system\/libsystem_pthread.dylib",
    "name" : "libsystem_pthread.dylib"
  }
],
  "sharedCache" : {
  "base" : 6792019968,
  "size" : 3144728576,
  "uuid" : "7cf73f63-0640-33ec-8444-138d9834ecb5"
},
  "vmSummary" : "ReadOnly portion of Libraries: Total=663.8M resident=0K(0%) swapped_out_or_unallocated=663.8M(100%)\nWritable regions: Total=558.7M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=558.7M(100%)\n\n                                VIRTUAL   REGION \nREGION TYPE                        SIZE    COUNT (non-coalesced) \n===========                     =======  ======= \nActivity Tracing                   256K        1 \nKernel Alloc Once                   32K        1 \nMALLOC                           164.2M       17 \nMALLOC guard page                   96K        5 \nMALLOC_NANO (reserved)           384.0M        1         reserved VM address space (unallocated)\nSTACK GUARD                       56.0M        3 \nStack                             9264K        3 \n__AUTH                             220K       44 \n__AUTH_CONST                      2891K      122 \n__DATA                            2429K      125 \n__DATA_CONST                      4160K      134 \n__DATA_DIRTY                       233K       50 \n__LINKEDIT                       579.7M       13 \n__OBJC_CONST                       260K       29 \n__OBJC_RO                         83.0M        1 \n__OBJC_RW                         3168K        1 \n__TEXT                            84.1M      140 \n__UNICODE                          592K        1 \ndyld private memory               1024K        1 \nmapped file                       29.0M        2 \nshared memory                       48K        3 \n===========                     =======  ======= \nTOTAL                              1.4G      697 \nTOTAL, minus reserved VM space     1.0G      697 \n",
  "legacyInfo" : {
  "threadTriggered" : {
    "queue" : "com.apple.NSXPCConnection.user.net.the-color-black.ZetaAuthorizationHelper.1025"
  }
}
}


Zetawatch r47 and OpenZFS2.0.1 issues

Hi,
it seems that ZetaWatch want to use libraryes in /usr/local/lib (like e.g. ./ZetaWatch
dyld: Library not loaded: /usr/local/lib/libzpool.1.dylib
Referenced from: /Applications/ZetaWatch.app/Contents/MacOS/./ZetaWatch
Reason: image not found
Abort trap: 6

It seems that the newer OpenZFS installs libraries in /usr/local/zfs/lib
This was NOT the case is OpenZFS 1.9.4 where the libraries are installed in /usr/local/lib
Also: Zetawatch needs libzpool.1.dylib
but in OpenZFS 2.0.1 this lib has a newer version libzpool.4.dylib

Hope this helps

Import certain pool with zfs import -f (Feature Request)

I share my pool between MacOS and Linux in a dual boot fashion. Whenever I did some work on the Linux side the next time when I boot into MacOS the pool will not be imported automatically by ZetaWatch. Presumably this is because the pool was not exported upon shutdown, or hostid mismatch. Since at anytime only one OS has access to the pool in my setting, it is safe to fix it by running zfs import -f <pool> manually.

I understand one does not want an option to enable force import of all pools.
Is there a way to do a force import for selected pool automatically?

Loading encrypted ZFS enters infinite loop

After upgrading to ZFS 2.1.0, I was able to zfs mount -l my partitions. However, if I mount the disk via ZetaWatch, it would enter an infinite loop. Any fix for this?

image

Error keeps popping up on Ventura

Error Internal NV list. Check on several machines. Something about 'error - reading pool configuration'. Systems seem to be working fine, not seeing adverse effects but I am checking daily just in case.
Screenshot 2023-06-03 at 9 18 31 AM

import pool with alternate root

Auto-importing may produce unexpected results when foreign pools are mounted over the current filesystem

It would be nice if ZetaWatch provided an option to mount with alternate root for some or all pools when auto-importing; either by default in /mnt : zpool import -R /mnt pool
or user-configurable

List available pools and do not mount on import (Feature Request)

Maybe down the road, but I would find it helpful to have the option to list any available pools that can be imported and also selectively import them. I don't necessarily want to import all pools. Also, maybe "Import (Do not mount)" option.

Great little helper program so far!!

Compatability with OpenZFS 2.1.0

When opening ZetaWatch, it produces a dyld: Library not loaded: /usr/local/zfs/lib/libzpool.4.dylib error. Under /usr/local/zfs/lib/ you do see libzpool.5.dylib instead. Maybe a version bump from v4 to v5 would work?

Context: I upgraded OpenZFS from 2.0.1 to 2.1.0.

add option and menu entry to import pool / mount datasets as readonly

this is a feature request:
after importing a pool, not only Spotlight and Finder notoriously grab the disk and do their things, but maybe I also want to import a pool that contains backups read-only.
Having the option to import as read-only in the menu would be a great time-saver for that.
Additionally there could be a setting to default to read-only import when host-id doesn't match.
And eventually, one could want to write on a pool that was imported as read-only - then a menu entry for remounting with write access would be totally awesome.

greetings ๐Ÿ‘

Rejecting /usr/local/lib/libzpool.1.dylib

Zetawatch does not launch. I see the following in console.

Library Validation failed: Rejecting '/usr/local/lib/libzpool.1.dylib' (Team ID: none, platform: no) for process 'ZetaWatch(14032)' (Team ID: 8THUW5GT6P, platform: no), reason: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.

I authorized the popup when originally launched, but still get this and no other popups. Nothing showing in Privacy settings requesting auth either.

I'm using 10.14.4. OpenZfs OSX 1.7.4.
Just installed the r13 version.

Error reading pool configuration

Launched Zetawatch r13 (new install) getting an error "Error reading pool configuration" and the popup notification shows:
ZFS encountered an error: Internal nvlist structure dize does not match vdev_stat_t size.

This is on High Sierra 10.13.6, zfs on osx 1.7.4.

My pools are setup with most newer feature flags disabled to allow importing on older linux systems. Just a guess, but maybe I need certain feature flags enabled?

zpools renamed and i/o errors

I've had a great experience with ZFS up until something strange happened. I downloaded the ZetaWatch r9 binary to help me manage my zpools at boot. I have 4 pools of mirrored vdevs and they each have an encrypted dataset except for the first one I will mention where I store data directly on the pool (Fentanyl 2x1.5TB SATA motherboard controller, Ketamina 2x3TB SATA motherboard controller, Diprivan 2x3TB LSI PCIe SAS HBA, Midazolam 2x3TB LSI PCIe SAS HBA). I ran ZetaWatch and it failed to import the pools that had an encrypted dataset on it but it did report that the plain unencrypted pool Fentanyl was OK.

After this I tried to zpool import -a and got an error "zfs: cannot import Diprivan: I/O error Destroy and re-create the pool from a backup" and the same error for Midazolam. I exported all pools and rebooted. This time Fentanyl still worked fine and Midazolam was able to be imported with zpool import Midazolam and the encrypted dataset within mounted, but Diprivan had the same I/O error. Ketamina no longer existed at all. It wasn't in disk utility and when I ran diskutil list the two disks that used to be called Ketamina are now called Midazolam also. Four disks in diskutil were reporting their names as Midazolam. I exported everything, shutdown and removed the disks that make up my two working pools, Fentanyl and Midazolam. I rebooted and tried to import Ketamina, "no pool exists..." and when I tried to import Midazolam (falsely named) I got "cannot import 'Midazolam': one or more devices is currently unavailable". I have not tried to fix Diprivan yet fearing I could make this situation worse so only work with one at a time.

Reading up on the FreeNAS and zfsonlinux boards haven't given me any leads. Thank you for your time and any ideas you can give me how to fix this.

ZetaWatch r9
macos high sierra 10.13.6
OpenZFS on OS X 1.8.2

load/unload encryption keys doesn't work

I moved from zfs 1.9.4 to zfs 2.0.1. on Catalina. Everything went well. I exported my pools, then I upgraded them and now I can mount my encrypted zfs volumes manually with sudo zfs mount -l
However, when I'm trying to load/unload mount/unmount volumes from zetawatch it does not do anything. The volumes still are unmounted/mounted and keys are uloaded/loaded after these operations. In 1.9.4 everything worked fine.

Can't understand the install process

I guess I'm obtuse, but I just don't understand. I cloned the repo, copied the full ZetaWatch directory tree to /Users//Applications, but I don't know where to go from there.... I don't see anything starting automatically. I've rebooted, double clicked on ZetaWatch ... I'm out of ideas.

Improve "Enter password for pool/dataset" dialog usability

Running version 43 and I have a usability improvement request.

I have a couple of encrypted pools. Upon login, there is an "Enter password for pool/dataset" dialog popping up and grabs focus of the cursor. Since I use keychain to remember passwords I just let it do its thing until all the encrypted datasets are open and mounted.

However, it usually takes anywhere between 10 to 20 seconds to import and open all my encrypted datasets, across a couple of SSDs. If a family member uses the computer he or she will start a browser by then and accidentally type into the password dialog (because it has focus) without realizing so. Then I will be told the browser does not work.

I think if keychain is used most of time the dialog can be replaced by a notification window saying something like "Opening pool/dataset..." without needing to grab the focus, and affecting the user's action while the dialog is open.

So can I suggest the following UI improvement?

  1. Unlock the encrypt dataset using a notification instead of a dialog that grabs focus, if keychain is used.
  2. Only pop up a dialog asking for password when step 1 fails, or when keychain is not used.

Auto-Import imports pools that were just exported

I connect to a Thunderbay using TB3 from my MacBook Pro. When I wish to unmount my drives and go mobile, I go to Zetawatch and select Export.

Before I have the ability to pull the TB3 cable off the computer, ZetaWatch already re-imports the drives and I get a spinning beachball of death as I simultaneously unplug he drives, and have to do a hard-reboot.

If ZetaWatch exported a pool during the current session, it shouldn't auto-import that same pool unless the drives were unplugged and plugged back in.

Can't create snapshot with special characters

I tries to create snapshot with name contains space and slashes.

Actual behaviour: silently accepted, no new snapshots.

Expected behaviour: create a snapshot replacing special characters, or message.

Not yet supporting M1

/Users/<user>/Downloads/ZetaWatch.app/Contents/MacOS/ZetaWatch ; exit;
dyld[2273]: Library not loaded: /usr/local/zfs/lib/libnvpair.3.dylib
  Referenced from: /Users/<user>/Downloads/ZetaWatch.app/Contents/MacOS/ZetaWatch
  Reason: tried: '/usr/local/zfs/lib/libnvpair.3.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/usr/lib/libnvpair.3.dylib' (no such file)
zsh: abort      /Users/<user>/Downloads/ZetaWatch.app/Contents/MacOS/ZetaWatch

Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
Deleting expired sessions...       9 completed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.