Checks whether a dataset is mounted
Returns: Some(true): The dataset is mounted
Returns: Some(false): The dataset is not mounted
Returns: None: The dataset is not found
Otherwise, an error is returned
Checks whether key is loaded
Returns: Some(true): Key is available/loaded and/or doesn’t need it
Returns: Some(false): Key is not loaded
Returns: None: The dataset is not found
Otherwise, an error is returned
Attempts to load-key for ZFS dataset
Returns: Ok(()) if the key is successfully loaded OR already loaded
Returns: Error if dataset not found or some other system error occurred.
The command zfs load-key <dataset-name> should be authorized with visudo.
Mounts a ZFS dataset
Returns Ok(()) if successfully mounted or already mounted
Returns Err otherwise
The command zfs mount <dataset-name> should be authorized with visudo.
Attempts to load-key for ZFS dataset
Returns: Ok(()) if the key is successfully unloaded OR already unloaded
Returns: Error if dataset not found or some other system error occurred.
The command zfs unload-key <dataset-name> should be authorized with visudo.
Unmounts a ZFS dataset
Returns: Ok(()) on success or if is already mounted
Returns: Err otherwise.
The command zfs unmount <dataset-name> should be authorized with visudo.