This topic describes all of the zestyctl disk ezswitch
CLI commands.
EZswitch on Linux automatically creates a new Zesty Disk filesystem and transfers existing files to it.
For general information about the EZswitch feature, see Use EZswitch for standalone instances.
For information about how to run EZswitch from the zestyctl CLI, see Run EZswitch on Linux from the zestyctl CLI.
You can use the following commands to manage EZswitch migration:
zestyctl disk ezswitch analyze
: analyze whether a designated filesystem is compatible with EZswitch migrationzestyctl disk ezswitch start
: start an EZswitch migrationzestyctl disk ezswitch status
: check the status of an ongoing EZswitch migrationzestyctl disk ezswitch abort
: cancel an ongoing EZswitch migration
Prerequisites
The commands share common prerequisites:
The Zesty Disk Agent is installed
The zestyctl CLI is enabled as part of the Agent installation.
For more information, see Install the Zesty Disk Agent on standalone instances.
Root access to the Linux instance
zestyctl disk ezswitch analyze
This command returns a report based on the analysis of a designated filesystem that is a candidate for EZswitch migration. The analysis checks for problems that can prevent the migration from completing successfully.
Syntax
zestyctl disk ezswitch analyze <mount point>
Parameters
Parameter | Description | Required |
---|---|---|
| Returns a report about analysis of compatibility with EZswitch | Y |
| The filesystem to be analyzed | Y |
Output
Output, similar to the following is displayed:
$ zestyctl disk ezswitch analyze /mnt/data
Analysis Result: mount point is ready to be ezswitched.
zestyctl disk ezswitch start
This command starts an EZswitch migration.
Note
Only one migration can be running at a time.
In order to prepare for successful migration, this command begins by automatically running the zestyctl disk verification
and zestyctl disk ezswitch analyze
commands. If errors are detected, the process will stop so you can fix those before running the migration.
As part of the EZswitch migration verification, these AWS-related automations are performed:
Verify that the AWS instance account has the privileges required to perform all EZswitch operations.
You can bypass this with a CLI flag.
Create a new EBS volume.
Create a snapshot of the current filesystem.
By default, the snapshot is deleted after 7 days.You can bypass the snapshot creation entirely, and you can change the timing for the deletion with CLI flags.
Detach the old EBS volume.
After EZswitch completes, the source file system is unmounted and the target Zesty Disk file system is mounted in its place under the original mount point.
Syntax
zestyctl disk ezswitch start <source-path> [--auto-reboot] [--delete-ebs-after days] [--delete-snapshot-after days] [--skip-verification] [--skip-snapshot] [-f]
Example
zestyctl disk ezswitch start /mnt/data --auto-reboot --delete-ebs-after 1 --delete-snapshot-after 7
This example starts EZswitch migration of the data in /mnt/data.
When the process begins, it will verify AWS privileges.
A snapshot of the current filesystem will be made.
During the migration, automatic reboots will be done.
Automatic deletion of the source EBS volume (1 day after completion) and its snapshots (7 days after completion).
Parameters
Parameter | Description | Required |
---|---|---|
| Starts the EZswitch migration | Y |
| The mount path to be migrated. This cannot be a system folder. | Y |
| To reboot the instance automatically, add this. | N |
| To change when the old EBS volume is deleted (default: 7 days after the migration finishes), add If you do not want automatic deletion, add the argument with a value of 0 days. | N |
| When a snapshot is created, to change when the snapshot is deleted (default: 7 days after the migration finishes), add If you do not want automatic deletion, add the argument with a value of 0 days. | N |
| To skip the premigration verification, add this argument. | N |
| To not create a snapshot during migration, add this argument. | N |
| To run the command in noninteractive mode, add this argument. | N |
zestyctl disk ezswitch status
This command returns a report with the status of the current ezswitch migration, including:
The mount point being migrated
The current phase of the migration
Migration progress (%); is a reboot pending
Estimated time until completion
Syntax
zestyctl disk ezswitch status
Parameters
Parameter | Description | Required |
---|---|---|
| Returns a report of the status of the current migration | Y |
Output
Output similar to the following is displayed:
zestyctl disk ezswitch abort
This command stops a migration that is in process.
Note
EZswitch can be stopped only before the first reboot.
Syntax
zestyctl disk ezswitch abort <source-path>
Parameters
Parameter | Description | Required |
---|---|---|
| Stops a migration that is in progress | Y |
| The mount path in which the current migration should be stopped | Y |