Table of ContentsLibraryView in Frames

Deleting busy Snapshot copies

A Snapshot copy is in a busy state if there are any LUN clones backed by data in that Snapshot copy since the Snapshot copy contains data that is used by the LUN clone. These LUN clones can exist either in the active file system or in some other Snapshot copy.

Considerations

Use the lun snap usage command to list all the LUNs backed by data in the specified Snapshot copy. It also lists the corresponding Snapshot copies in which these LUNs exist.

The lun snap usage command displays the following information:
  • LUN clones that are holding a lock on the Snapshot copy given as input to this command
  • Snapshots in which these LUN clones exist

Steps

  1. Identify all Snapshot copies that are in a busy state, locked by LUNs, by entering the following command:snap list vol-name

    Example

    snap list vol2

    The following message is displayed:

    Volume vol2
    working...
    
      %/used       %/total  date          name
    ----------  ----------  ------------  --------
      0% ( 0%)    0% ( 0%)  Jan 14 04:35  snap3
      0% ( 0%)    0% ( 0%)  Jan 14 03:35  snap2
     42% (42%)   22% (22%)  Dec 12 18:38  snap1              
     42% ( 0%)   22% ( 0%)  Dec 12 03:13  snap0 (busy,LUNs)

  2. Identify the LUNs and the Snapshot copies that contain them by entering the following command: lun snap usage [-s] vol_name snap_name

    Use the -s option to only display the relevant backing LUNs and Snapshot copies that must be deleted.

    Note: The -s option is particularly useful in making SnapDrive output more readable. For example:
    lun snap usage -s vol2 snap0
    You need to delete the following snapshots before deleting snapshot "snap0": 
    /vol/vol1/.snapshot/snap1 
    /vol/vol2/.snapshot/snap2

    Example

    lun snap usage vol2 snap0

    The following message is displayed:

    active:
       LUN:       /vol/vol2/lunC
       Backed By: /vol/vol2/.snapshot/snap0/lunA
    snap2:
       LUN:       /vol/vol2/.snapshot/snap2/lunB
       Backed By: /vol/vol2/.snapshot/snap0/lunA
    snap1:
       LUN:       /vol/vol1/.snapshot/snap1/lunB
       Backed By: /vol/vol2/.snapshot/snap0/lunA
    Note: The LUNs are backed by lunA in the snap0 Snapshot copy.

    In some cases, the path for LUN clones backed by a Snapshot copy cannot be determined. In those instances, a message is displayed so that those Snapshot copies can be identified. You must still delete these Snapshot copies in order to free the busy backing Snapshot copy. For example:

    lun snap usage vol2 snap0

    Snapshot - snap2:
       LUN: Unable to determine the path of the LUN
       Backed By: Unable to determine the path of the LUN
       LUN:       /vol/vol2/.snapshot/snap2/lunB
       Backed By: /vol/vol2/.snapshot/snap0/lunA

  3. Delete all the LUNs in the active file system that are displayed by the lun snap usage command by entering the following command: lun destroy [-f] lun_path [lun_path ...]

    Example

    lun destroy /vol/vol2/lunC

  4. Delete all the Snapshot copies that are displayed by the lun snap usage command in the order they appear, by entering the following command: snap delete vol-name snapshot-name

    Example

    snap delete vol2 snap2

    snap delete vol2 snap1

    All the Snapshot copies containing lunB are now deleted and snap0 is no longer busy.

  5. Delete the Snapshot copy by entering the following command: snap delete vol-name snapshot-name

    Example

    snap delete vol2 snap0