Home > Storage > PowerFlex > White Papers > Using Dell PowerFlex with Linux KVM > Protection for KVM on PowerFlex
One of the benefits of using array-based storage for KVM is the ability to use the features of the array, such as local and remote replication. KVM does offer VM-based snapshots, but they are unable to offer a consistent copy of all objects that are part of the storage domain like array technology can. Such copies can serve multiple purposes, from cloning, to restores and backups. And as storage domains are used to run production applications, it is essential to have a backup strategy in case there is a failure.
PowerFlex offers snapshot capability for block and file storage through both UI and CLI, and remote replication for block storage. While remote replication is beyond the scope of this paper, the following sections walk through creating a snapshot in the PowerFlex UI for both a block volume and a file system which are in use as storage domains. In addition, snapshot policies are demonstrated which enable regular backups.
In the PowerFlex UI, log in and navigate to Block > Volumes. Using the check box, select the wanted volume where the storage domain is provisioned, in this case Volume-for-oVirt-KVM. From the More Actions menu select Create Snapshot from the menu as in Figure 62.
PowerFlex presents the following dialog in Figure 63. The user can select to create a Read/Write snapshot or Read Only. In addition, the Use secure snapshot option, which is checked here, prohibits deletion of the snapshots until the defined expiration period has elapsed. Click Create to start the task.
Successful completion results in the message in Figure 64.
After the snapshot is created, it is available for use with the oVirt functionality such as importing the storage domain.
In the UI, log in and go to File > File Systems. Select the wanted file system in use as a storage domain, in this case isorepo. Select Protection > Create Snapshot from the menu as in Figure 65.
PowerFlex presents the following three types of snapshots that are shown in Figure 66.
The retention period is set to one week by default. One can set a different retention period or select the No Automatic Deletion for indefinite retention.
For the purposes of backup and restore, a protocol (read-only) snapshot is the best option because it is only mounted when required and does not permit overwriting the data. A protocol (read/write) snapshot would be useful for test or development purposes. Finally, the “snapshot” snapshot, unlike the other two, is made available immediately to the system through the existing NFS file system. This type of snapshot is useful to do a quick restore of objects in the file system. In Linux, the way to access it is through the “.snapshot” directory of the NFS datastore. This directory does not show up, even when listing hidden files. The user must know that the snapshot exists, and they must change the directory into .snapshot. Alternatively, if the same NFS datastore is also available as an SMB share, the snapshot is available by right clicking the share, selecting Properties and then the Previous Versions tab as seen in Figure 67.
By opening the folder, the objects in the snapshot are available for restore.
In additional to individual snapshots, PowerFlex provides the ability to setup protection policies which consist of snapshot rules that automate how often to take a snapshot of a block volume or file system and how long to retain them. A volume or file system may only have a single protection policy that is assigned to it. As both block and file protection policies are similar, it is unnecessary to include both. This example uses a block volume. To create a protection policy:
Upon completion, click Create and Activate. If only Create is clicked, the policy enters a paused state, even if a volume is assigned to it. It would then require activation.
The policy remains in effect for that volume until it is paused or removed.