Datera Volume Operations Tool
This is meant to ease several multi-step end-user operations for the Datera system that encompass both Datera-side operations and client-side operations. Most of the operations supported in this tool involve snapshots or discovery operations.
- Install prerequistes
- Install
python
- Install
git
- Install
open-iscsi
(we neediscsiadm
) - Install
multipath-tools
(or whatever it is on your system) - Install
mkfs.<your_favorite_format>
- Install
- Clone the repository
git clone http://github.com/Datera/dvot
cd dvot
- Install
./install.py
- Create Datera Universal Config File
vi datera-config.json
{ "username": "your_user", "password": "your_password", "tenant": "/root", "mgmt_ip": "1.1.1.1", "api_version": "2.2", "ldap": "" }
- Use
./dvot --help
Functionality can be broken down into a few categories
- Health Check
- Creating Snapshots
- Finding Resources
- Mounting Snapshots
- Restoring Snapshots
Every operation in dvot follows a pattern:
./dvot <find/list operation> --<id/name/path> <my-id/my-name/my-path> --<state-change operation>
For example:
$ ./dvot find-vol --id 33c04b21-0fa1-46ab-a8ea-035bb9d806b4 --make-snap
or
$ ./dvot find-app --name my-test-app --mount
or
$ ./dvot find-from-device-path --path /dev/sdc
Every "find" operation should have a single result that will be the object of any state-change operation
The health check is very basic. It checks that the tool has API access and then pings the Access IPs from the client.
$ ./dvot health-check
Health Check Completed Successfully
./dvot find-vol --id <my-vol-id> --make-snap
or
./dvot find-app --name <my-app-name> --make-snap
WARNING: Only use --name
with a guaranteed unique name. Use the UUID of
the Volume/AppInstance if unsure if the name is unique.
If a Volume name/id is given, then a Snapshot of that Volume will be created individually
If an AppInstance name/id is given, then a Snapshot will be created of the entire AppInstance (and all included Volumes)
./dvot find-vol --id <my-vol-id>
./dvot find-from-mount --path /mnt/my-mounted-volume
./dvot find-from-device-path --path /dev/my-device
./dvot find-app --name <my-app-name>
./dvot find-app --id <my-app-id>
./dvot find-ai-from-mount --path <mount-path>
./dvot find-ai-from-device-path --path <device-path>
./dvot find-snap --id <my-snap-uuid>
./dvot find-snap --name <my-snap-timestamp>
Snapshots that are requested for mounting will first be cloned into a new AppInstance, then all volumes within that AppInstance (one for a single-Volume Snapshot or multiple for an AppInstance Snapshot) will be logged-in/mounted
./dvot find-snap --id <my-snap-uuid> --login
./dvot find-snap --id <my-snap-uuid> --mount --fstype xfs --directory /mnt
./dvot find-app --id <my-snap-uuid> --mount --all-snaps
./dvot find-vol --id <volume-uuid> --rollback <snap-id>
./dvot find-app -id <app-id> --rollback <snap-timestamp>
In this case mounts will be unmounted, the device will be logged out a rollback of the Volume/AppInstance is completed, then the device is logged back in and remounted (if it started as a mount)
./dvot rollback --name <snap-ts> --path <mount-or-device-path>
./dovt find-vol --id <volume-uuid> --extend 20
Mounted volumes will be unmounted, the device will be logged out and the Volume will be extended to the specified size.
./dovt find-from-mount --path <mount-or-device-path> --extend 20