ZSys daemon and client for zfs systems
ZSys is a Zfs SYStem tool targeting an enhanced ZOL experience.
It allows running multiple ZFS systems in parallel on the same machine, get automated snapshots, managing complex zfs dataset layouts separating user data from system and persistent data, and more.
You can find a whole series of blog posts explaining in details the internals and goals of ZSys.
ZFS SYStem integration control zsys daemon
Zfs SYStem tool for an enhanced ZFS on Linux experience. It allows running multiple ZFS system in parallels on the same machine, get automated snapshots, managing complex zfs dataset layouts separating user data from system and persistent data, and more.
zsysctl COMMAND [flags]
-h, --help help for zsysctl
-v, --verbose count issue INFO (-v) and DEBUG (-vv) output
Generates completion scripts (will attempt to automatically detect shell)
To load completions: NOTE: When shell type isn't defined shell will be automatically identified based on the $SHELL environment vairable
Bash:
source <(zsysctl completion bash)
# To load completions for each session, execute once:
# Linux:
zsysctl completion bash > /etc/bash_completion.d/zsysctl
# macOS:
zsysctl completion bash > /usr/local/etc/bash_completion.d/zsysctl
Zsh:
# If shell completion is not already enabled in your environment,
# you will need to enable it. You can execute the following once:
echo "autoload -U compinit; compinit" >> ~/.zshrc
# To load completions for each session, execute once:
zsysctl completion zsh > "${fpath[1]}/_zsysctl"
# You will need to start a new shell for this setup to take effect.
PowerShell:
zsysctl completion powershell | Out-String | Invoke-Expression
# To load completions for every new session, run:
zsysctl completion powershell > zsysctl.ps1
# and source this file from your PowerShell profile.
zsysctl completion [bash|zsh|powershell] [flags]
-h, --help help for completion
-v, --verbose count issue INFO (-v) and DEBUG (-vv) output
List all the machines and basic information.
Alias of zsysctl machine list. List all the machines and basic information.
zsysctl list [flags]
-h, --help help for list
-v, --verbose count issue INFO (-v) and DEBUG (-vv) output
Machine management
zsysctl machine COMMAND [flags]
-h, --help help for machine
-v, --verbose count issue INFO (-v) and DEBUG (-vv) output
List all the machines and basic information.
zsysctl machine list [flags]
-h, --help help for list
-v, --verbose count issue INFO (-v) and DEBUG (-vv) output
Shows the status of the machine.
zsysctl machine show [MachineID] [flags]
--full Give more detail informations on each machine.
-h, --help help for show
-v, --verbose count issue INFO (-v) and DEBUG (-vv) output
Saves the current state of the machine. By default it saves only the user state. state_id is generated if not provided.
Alias of zsysctl state save. Saves the current state of the machine. By default it saves only the user state. state_id is generated if not provided.
zsysctl save [state id] [flags]
--auto Signal this is an automated request triggered by script
-h, --help help for save
--no-update-bootmenu Do not update bootmenu on system state save
-s, --system Save complete system state (users and system)
-u, --user string Save the state for a given user or current user if empty
-v, --verbose count issue INFO (-v) and DEBUG (-vv) output
Service management
zsysctl service COMMAND [flags]
-h, --help help for service
-v, --verbose count issue INFO (-v) and DEBUG (-vv) output
Dumps the current state of zsys.
zsysctl service dump [flags]
-h, --help help for dump
-v, --verbose count issue INFO (-v) and DEBUG (-vv) output
Run daemon state saves garbage collection.
zsysctl service gc [flags]
-a, --all Collects all the datasets including manual snapshots and clones.
-h, --help help for gc
-v, --verbose count issue INFO (-v) and DEBUG (-vv) output
Sets the logging level of the daemon.
zsysctl service loglevel 0|1|2 [flags]
-h, --help help for loglevel
-v, --verbose count issue INFO (-v) and DEBUG (-vv) output
Refreshes machines states.
zsysctl service refresh [flags]
-h, --help help for refresh
-v, --verbose count issue INFO (-v) and DEBUG (-vv) output
Reloads daemon configuration.
zsysctl service reload [flags]
-h, --help help for reload
-v, --verbose count issue INFO (-v) and DEBUG (-vv) output
Shows the status of the daemon.
zsysctl service status [flags]
-h, --help help for status
-v, --verbose count issue INFO (-v) and DEBUG (-vv) output
Stops zsys daemon.
zsysctl service stop [flags]
-h, --help help for stop
-v, --verbose count issue INFO (-v) and DEBUG (-vv) output
Start profiling until you exit this command yourself or when duration is done. Default is CPU profiling with a 30s timeout.
zsysctl service trace [flags]
--duration int Duration of the capture. Default is 30 seconds. (default 30)
-h, --help help for trace
-o, --output string Dump the trace to a file. Default is ./zsys.<trace-type>.pprof
-t, --type string Type of profiling cpu or mem. Default is cpu. (default "cpu")
-v, --verbose count issue INFO (-v) and DEBUG (-vv) output
Shows the status of the machine.
Alias of zsysctl machine show. Shows the status of the machine.
zsysctl show [MachineID] [flags]
--full Give more detail informations on each machine.
-h, --help help for show
-v, --verbose count issue INFO (-v) and DEBUG (-vv) output
Machine state management
zsysctl state COMMAND [flags]
-h, --help help for state
-v, --verbose count issue INFO (-v) and DEBUG (-vv) output
Remove the current state of the machine. By default it removes only the user state if not linked to any system state.
zsysctl state remove [state id] [flags]
--dry-run Dry run, will not remove anything
-f, --force Force removing, even if dependencies are found
-h, --help help for remove
-s, --system Remove system state (system and users linked to it)
-u, --user string Remove the state for a given user or current user if empty
-v, --verbose count issue INFO (-v) and DEBUG (-vv) output
Saves the current state of the machine. By default it saves only the user state. state_id is generated if not provided.
zsysctl state save [state id] [flags]
--auto Signal this is an automated request triggered by script
-h, --help help for save
--no-update-bootmenu Do not update bootmenu on system state save
-s, --system Save complete system state (users and system)
-u, --user string Save the state for a given user or current user if empty
-v, --verbose count issue INFO (-v) and DEBUG (-vv) output
Returns version of client and server
zsysctl version [flags]
-h, --help help for version
-v, --verbose count issue INFO (-v) and DEBUG (-vv) output
ZFS SYStem integration daemon
Zfs SYStem daemon for an enhanced ZFS on Linux experience. It allows running multiple ZFS system in parallels on the same machine, get automated snapshots, managing complex zfs dataset layouts separating user data from system and persistent data, and more.
zsysd [flags]
-h, --help help for zsysd
-v, --verbose count issue INFO (-v) and DEBUG (-vv) output
Generates completion scripts (will attempt to automatically detect shell)
To load completions: NOTE: When shell type isn't defined shell will be automatically identified based on the $SHELL environment vairable
Bash:
source <(zsysd completion bash)
# To load completions for each session, execute once:
# Linux:
zsysd completion bash > /etc/bash_completion.d/zsysd
# macOS:
zsysd completion bash > /usr/local/etc/bash_completion.d/zsysd
Zsh:
# If shell completion is not already enabled in your environment,
# you will need to enable it. You can execute the following once:
echo "autoload -U compinit; compinit" >> ~/.zshrc
# To load completions for each session, execute once:
zsysd completion zsh > "${fpath[1]}/_zsysd"
# You will need to start a new shell for this setup to take effect.
PowerShell:
zsysd completion powershell | Out-String | Invoke-Expression
# To load completions for every new session, run:
zsysd completion powershell > zsysd.ps1
# and source this file from your PowerShell profile.
zsysd completion [bash|zsh|powershell] [flags]
-h, --help help for completion
-v, --verbose count issue INFO (-v) and DEBUG (-vv) output
Those commands are hidden from help and should primarily be used by the system itself.
Ensure that the right datasets are ready to be mounted and committed during early boot
zsysctl boot COMMAND [flags]
-h, --help help for boot
-p, --print-changes Display if any zfs datasets have been modified to boot
-v, --verbose count issue INFO (-v) and DEBUG (-vv) output
Commit system and user datasets states as a successful boot
zsysctl boot commit [flags]
-h, --help help for commit
-p, --print-changes Display if any zfs datasets have been modified to boot
-v, --verbose count issue INFO (-v) and DEBUG (-vv) output
Prepare boot by ensuring correct system and user datasets are switched on and off
zsysctl boot prepare [flags]
-h, --help help for prepare
-p, --print-changes Display if any zfs datasets have been modified to boot
-v, --verbose count issue INFO (-v) and DEBUG (-vv) output
Update last used timestamp
zsysctl boot update-lastused [flags]
-h, --help help for update-lastused
-p, --print-changes Display if any zfs datasets have been modified to boot
-v, --verbose count issue INFO (-v) and DEBUG (-vv) output
Update system boot menu
zsysctl boot update-menu [flags]
--auto Signal this is an automated request triggered by script
-h, --help help for update-menu
-p, --print-changes Display if any zfs datasets have been modified to boot
-v, --verbose count issue INFO (-v) and DEBUG (-vv) output
User datasets creation and rename
zsysctl userdata COMMAND [flags]
-h, --help help for userdata
-v, --verbose count issue INFO (-v) and DEBUG (-vv) output
Create a new home user dataset via an user dataset (if doesn't exist) creation
zsysctl userdata create USER HOME_DIRECTORY [flags]
-h, --help help for create
-v, --verbose count issue INFO (-v) and DEBUG (-vv) output
dissociate current user data from current system but preserve history
zsysctl userdata dissociate USER [flags]
-h, --help help for dissociate
-r, --remove Empty home directory content if not associated to any machine state
-v, --verbose count issue INFO (-v) and DEBUG (-vv) output
Rename a user's home directory via renaming corresponding user dataset
zsysctl userdata set-home OLD_HOME NEW_HOME [flags]
-h, --help help for set-home
-v, --verbose count issue INFO (-v) and DEBUG (-vv) output
Prepare boot by ensuring correct system and user datasets are switched on and off, synchronously
zsysd boot-prepare [flags]
-h, --help help for boot-prepare
-v, --verbose count issue INFO (-v) and DEBUG (-vv) output