Mention the new snapshot script and the new exported variables in both docs and man pages.
Signed-off-by: Dimitris Aragiorgis <[email protected]> --- doc/design-shared-storage.rst | 10 ++++++++++ man/ganeti-extstorage-interface.rst | 22 +++++++++++++++++++++- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/doc/design-shared-storage.rst b/doc/design-shared-storage.rst index 27bbd48..c1b3c01 100644 --- a/doc/design-shared-storage.rst +++ b/doc/design-shared-storage.rst @@ -185,6 +185,7 @@ An “ExtStorage provider” will have to provide the following methods: - Detach a disk from a given node - SetInfo to a disk (add metadata) - Verify its supported parameters +- Snapshot a disk (currently used during gnt-backup export) The proposed ExtStorage interface borrows heavily from the OS interface and follows a one-script-per-function approach. An ExtStorage @@ -197,6 +198,7 @@ provider is expected to provide the following scripts: - ``detach`` - ``setinfo`` - ``verify`` +- ``snapshot`` All scripts will be called with no arguments and get their input via environment variables. A common set of variables will be exported for @@ -216,6 +218,14 @@ all commands, and some of them might have extra ones. ``VOL_METADATA`` A string containing metadata to be set for the volume. This is exported only to the ``setinfo`` script. +``VOL_CNAME`` + The human readable name of the disk (if any). +``VOL_SNAPSHOT_NAME`` + The name of the volume's snapshot to be taken. + Available only to the `snapshot` script. +``VOL_SNAPSHOT_SIZE`` + The size of the volume's snapshot to be taken. + Available only to the `snapshot` script. All scripts except `attach` should return 0 on success and non-zero on error, accompanied by an appropriate error message on stderr. The diff --git a/man/ganeti-extstorage-interface.rst b/man/ganeti-extstorage-interface.rst index f082d83..44a1adb 100644 --- a/man/ganeti-extstorage-interface.rst +++ b/man/ganeti-extstorage-interface.rst @@ -22,7 +22,7 @@ REFERENCE --------- There are eight required files: *create*, *attach*, *detach*, *remove*, -*grow*, *setinfo*, *verify* (executables) and *parameters.list* +*grow*, *setinfo*, *verify*, *snapshot* (executables) and *parameters.list* (text file). Common environment @@ -69,6 +69,12 @@ VOL_CNAME VOL_UUID The uuid of the Disk config object. +VOL_SNAPSHOT_NAME + The name of the volume's snapshot. + +VOL_SNAPSHOT_SIZE + The size of the volume's size + EXECUTABLE SCRIPTS ------------------ @@ -200,6 +206,20 @@ for future use and consistency with gnt-os-interface's verify script. The script should return ``0`` on success. +snapshot +~~~~~~~~ + +The *snapshot* script is used to take a snapshot of the given volume. + +The ``VOL_SNAPSHOT_NAME`` and ``VOL_SNAPSHOT_SIZE`` variables contain +the name and size of the snapshot that is about to be taken. + +Currently this operation is used only during gnt-backup export and +Ganeti sets those values to ``VOL_NAME.snap`` and ``VOL_SIZE`` +respectively (see above). + +The script returns ``0`` on success. + TEXT FILES ---------- -- 1.7.10.4
