Previous page

Next page

Locate page in Contents

Print this page

Managing LUN Snapshots

As with virtual machines, you can create and manage snapshots of LUNs. At that, to create a snapshot of the entire target, you will need to create snapshots of each LUN within it.

Creating LUN Snapshots

To create a snapshot of a LUN in an iSCSI target, use the pstorage-iscsi snapshot-create command. For example, for LUN 1 on target iqn.2014-04.com.pstorage:test1 :

# pstorage-iscsi snapshot-create -t iqn.2014-04.com.pstorage:test1 -l 1

Snapshot a1f54314-bc06-40c6-a587-965feb9d85bb successfully created.

Note: To generate a UUID manually, use uuidgen .

Listing LUN Snapshots

To list snapshots for the specified LUN, use the pstorage-iscsi snapshot-list command. For example, for LUN 1 on target iqn.2014-04.com.pstorage:test1 :

# pstorage-iscsi snapshot-list -t iqn.2014-04.com.pstorage:pcs4 -l 1

CREATED C UUID PARENT_UUID

2014-04-11 13:16:51 a1f54314-bc06-40c6-a587-965feb9d85bb 00000000-0000-0000-0000-000000000000

2014-04-11 13:16:57 * 9c98b442-7482-4fd0-9c45-9259374ca84e a1f54314-bc06-40c6-a587-965feb9d85bb

In the output above, the asterisk in the column C indicates the current snapshot, while the column PARENT_UUID shows snapshot dependency or history.

Switching Between LUN Snapshots

To switch to the specified LUN snapshot, use the pstorage-iscsi snapshot-switch command. For example:

# pstorage-iscsi snapshot-switch -u a1f54314-bc06-40c6-a587-965feb9d85bb

After you switch to a snapshot, the current LUN image will be removed.

Note: You can only switch between snapshots, if the LUN is offline.

Viewing LUN Snapshot Information

To view information about the specified snapshot, use the pstorage-iscsi snapshot-info command. For example:

# pstorage-iscsi snapshot-info -u 9c98b442-7482-4fd0-9c45-9259374ca84e

Target: iqn.2014-04.com.pstorage:pcs4

LUN: 1

Created: 2014-04-11 13:16:57

Parent: 00000000-0000-0000-0000-000000000000}

{a1f54314-bc06-40c6-a587-965feb9d85bb}

{9c98b442-7482-4fd0-9c45-9259374ca84e

Description: None

Deleting LUN Snapshots

To delete the specifed LUN snapshot, use the pstorage-iscsi snapshot-delete command. For example:

# pstorage-iscsi snapshot-delete -u a1f54314-bc06-40c6-a587-965feb9d85bb

If the snapshot has no any children, it will be deleted. If the snapshot has a single child, it will be merged to that child.

Notes:

1. You can only delete offline snapshots.

2. Deleting a snapshot that has multiple children is currently not supported.