Sachin Pandit 35c6ca05d8 feature/snapshot : Interface to delete all snapshots belonging
to a system as-well-as to a particular volume.

Problem :
With the current design we can only delete a single snapshot.
And the deletion of volume which contains snapshot is not allowed.
Because of that user might be forced to delete all the snapshots
manually before he is allowed to delete a volume.

Solution:
Following is the interface with which user can delete
all the snapshots of a system or belonging to a particular volume.

        Syntax : gluster snapshot delete all

        *To delete all the snapshots present in a system

        Syntax : gluster snapshot delete volume <volname>

        *To deletes all the snapshot present in a volume specified.

========================================================================
Sample Output:

Case 1 : Deleting a single snapshot.
[root@snapshot-24 glusterfs]# gluster snapshot delete snap1
Deleting snap will erase all the information about the snap. Do you still want to continue? (y/n) y
snapshot delete: snap1: snap removed successfully

-----------------------------------------------------------------
Case 2 : Deleting all the snapshots in a Volume.
[root@snapshot-24 glusterfs]# gluster snapshot delete volume vol1
Volume (vol1) contains 9 snapshot(s).
Do you still want to continue and delete them?  (y/n) y
snapshot delete: snap2: snap removed successfully
snapshot delete: snap3: snap removed successfully
snapshot delete: snap4: snap removed successfully
snapshot delete: snap5: snap removed successfully
.
.
.

-----------------------------------------------------------------
Case 3 : Deleting all the snapshots in a system.
[root@snapshot-24 glusterfs]# gluster snapshot delete all
System contains 4 snapshot(s).
Do you still want to continue and delete them?  (y/n) y
snapshot delete: snap7: snap removed successfully
snapshot delete: snap8: snap removed successfully
snapshot delete: snap9: snap removed successfully
snapshot delete: snap10: snap removed successfully
========================================================================

Change-Id: Ifec8e128ab2011cbbba208376b9c92cfbe7d8d71
BUG: 1112613
Signed-off-by: Sachin Pandit <spandit@redhat.com>
Reviewed-on: http://review.gluster.org/8162
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-by: Kaushal M <kaushal@redhat.com>
2014-07-25 03:23:44 -07:00
..
2014-07-15 23:00:48 -07:00
2014-05-21 19:53:46 -07:00
2014-07-15 22:59:44 -07:00

Regression tests framework for GlusterFS

Prereq

  • Build and install the version of glusterfs with your changes. Make sure the installed version is accessible from $PATH.

How-To

  • To mount glusterfs, NEVER use 'mount -t glusterfs', instead use 'glusterfs -s ' method. This is because with the patch build setup doesnot install the /sbin/mount.glusterfs necessary, where as the glusterfs binary will be accessible with $PATH, and will pick the right version.
  • (optional) Set environment variables to specify location of export directories and mount points. Unless you have special requirements, the defaults should just work. The variables themselves can be found at the top of tests/include.rc. All of them can be overriden with environment variables.

Usage

  • Execute /usr/share/glusterfs/run-tests.sh as root.

  • If you want to run individual tests located in /usr/share/glusterfs/tests as opposed to the full test-suite, invoke it as /usr/share/glusterfs/run-tests.sh [pattern]*, where pattern can be:

    • the trailing parts of the full path of a test, e.g. tests/basic/mount.t
    • the name of a file or directory, e.g self-heal.t or basic/
    • bug number, which will match against numbered bugs in the tests/bugs/ directory.
    • a glob pattern (see man 7 glob for mor info on globs)
  • If some test cases fail, report to GlusterFS community at gluster-devel@gluster.org.

Reminder

  • BE WARNED THAT THE TEST CASES DELETE /var/lib/glusterd/* !!!