Skip to main content
NetApp Knowledge Base

Which snapshots are deleted automatically and which ones are supposed to be busy?

Views:
2,904
Visibility:
Public
Votes:
2
Category:
snapmirror
Specialty:
dp
Last Updated:

Applies to

  • SnapMirror
  • SnapVault
  • Data ONTAP operating in 7-Mode

Answer

Should I delete a busy Snapshot?

Which Snapshots are supposed to be deleted automatically?

  • SnapMirror keeps only the most recent Snapshot and deletes the previous one as soon as the next update completes successfully.
  • SnapVault and regular volume Snapshots are deleted according to the Snapshot retention value set in the schedule.

 

Which Snapshots are not deleted automatically?

  • Snapshots created by SnapMirror resync, SnapMirror restore, SnapVault restore, SnapRestore, dump, volcopy, and ndmpcopy are not deleted automatically.

 

Which Snapshots are expected to be in a busy state?

  • Qtree SnapMirror (QSM) and SnapVault lock the last created Snapshot on the destination because it is needed for the next incremental update. On the source, the Snapshot is owned by the service that created it, but it is not locked.
  • Note that for volume SnapMirror (VSM), all Snapshots on the source volume will be marked "busy" during a SnapMirror update because all Snapshots are transferred. Once the VSM update completes, the busy status will automatically clear from the volume Snapshots.

    Once the transfer has completed the snapshot will go back into a "snapmirror" state. The first snapshot from the snapmirror relationship will then be deleted. Any snapshot that was also held as "busy" because of the transfer will be released.

    For example
     

    Volume testvol1
    working...

    %/used %/total date name
    ---------- ---------- ------------ --------
    0% ( 0%) 0% ( 0%) Apr 16 10:33 f840-ca3(0033583371)_dstsm.31 (busy,snapmirror)
    0% ( 0%) 0% ( 0%) Apr 16 10:33 test1 (busy)
    1% ( 0%) 0% ( 0%) Apr 16 10:31 f840-ca3(0033583371)_dstsm.30 (busy,snapmirror)

    f840-ca1> snapmirror status
    Snapmirror is on.
    Source Destination State Lag Status

    f840-ca1:testvol1 f840-ca3:dstsm Source 00:02:10 Transferring (136 KB done)

    f840-ca1> snap list testvol1
    Volume testvol1
    working...

    %/used %/total date name
    ---------- ---------- ------------ --------
    0% ( 0%) 0% ( 0%) Apr 16 10:33 f840-ca3(0033583371)_dstsm.31 (snapmirror)
    0% ( 0%) 0% ( 0%) Apr 16 10:33 test1

  • Also, if a Snapshot is being used by a NDMP backup or dump, the Snapshot will be marked "(busy, backup[#],snapmirror)". The busy status will automatically clear once the backup has completed, or if the backup is terminated. To determine if a backup is using the Snapshot, run the "backup status" command.

  • LUN or volume clone, CIFS share, RAID mirroring, etc. lock their respective Snapshot.

    Note: See KB: Snapshots are showing as busy

  • Starting in Data ONTAP 7.3, functionality has been added to allow FlexClones to be built off snapmirror destinations without causing SnapMirror transfers to fail. However, for versions prior to Data ONTAP 7.3, FlexClone locks SnapMirror Snapshots: you can clone SnapMirror volumes, but you must be aware that a clone of a SnapMirror destination locks the Snapshot copy from which the clone was created. In doing so, it also locks down that copy in the source volume, and in every volume in the cascade, if the volume is part of a SnapMirror cascade. Also, if a FlexClone volume is created from a Snapshot copy in the destination volume that is not the most recent copy, and hence has locked down the Snapshot copy, if that Snapshot copy no longer exists on the source volume, every update needs to delete the copy on the destination. In this case, all SnapMirror updates to the destination volume will fail until the clone is destroyed or split. This does not occur if the clone is created from the most recent Snapshot copy in the SnapMirror destination, because that copy still exists in the source volume.

 

Use snap list -b vol_name command to define which service owns a Snapshot: The "-b" option is available in Data ONTAP 7.0.2 and later. The first column lists all the Snapshots in a volume. The second column lists owners of the Snapshot, if it is busy. If the Snapshot is not busy, no owners are reported.

system>snap list -b vol1
Volume vol1 working...
name                                 owners
-----------                          -----------
snap1                                LUN clone
clone_vclone.1                       volume clone
system(0033604314)_vol1_q1-dst.2     snapmirror


When a snap delete is attempted on a busy Snapshot, the output is a similar list of owners of the Snapshot, failing the snap delete. For example:

System>snap delete -a vol1
Are you sure you want to delete all snapshots for volume vol1?
Y snap delete -a: Remaining snapshots are currently in use by dump, snap restore, SnapMirror, a CIFS share, RAID mirroring, LUNs or retained by SnapLock.
Please try to delete remaining snapshots later.
System>snap delete vol1 system(0033604314)_vol1_q1-dst.2        
Snapshot system(0033604314)_vol1_q1-dst.2 is busy because of snapmirror

Additional Information

additionalInformation_text

 

NetApp provides no representations or warranties regarding the accuracy or reliability or serviceability of any information or recommendations provided in this publication or with respect to any results that may be obtained by the use of the information or observance of any recommendations provided herein. The information in this document is distributed AS IS and the use of this information or the implementation of any recommendations or techniques herein is a customer's responsibility and depends on the customer's ability to evaluate and integrate them into the customer's operational environment. This document and the information contained herein may be used solely in connection with the NetApp products discussed in this document.