netapp Busy Lun

Description

Basic instructions for deleting snapshots in the '(busy,LUN)' state are provided in Deleting busy snapshot copies. However, these instructions sometimes fail because a more recent snapshot holds the blocks of the LUN, preventing the busy snapshot from being deleted. In that situation, use these modified instructions. Also, when deleting the parent LUN of a cloned LUN, lun snap usage -s is advising to delete the lun in the active filesystem in order to delete the snapshot:

You need to delete the following LUNs before deleting the snapshot

/vol/testvol/lun2.lun

Procedure

Preferred option:

If the snapshot contains mounted LUNs, they should be disconnected using the host. Under SnapDrive > Disks, in the host's MMC, locate and disconnect the offending LUNs by right clicking them and selecting 'disconnect'.

Alternate option (Data ONTAP 7.3+):

A new feature of Data ONTAP 7.3 eliminates the obligation to delete the subsequent snapshots in order to free the snapshot locking the LUN.

  1. Identify all snapshots that are locked by LUNs in a busy state by entering the following command: snap list
  2. Identify the LUNs and the snapshots that contain them by entering the following command: lun snap usage Note: See 1010736: Using lun snap usage -s when deleting busy snapshot copies for more information.
  3. Use the lun show command to display all LUNs. Does that LUN still exist? Note: Do not delete files with a .lun extension. Contact NetApp Support if you are unsure of which file to delete.
  4. Delete the temporary LUN with the following command: lun destroy
  5. Change the the snapshot_clone_dependency volume option on the volume with the locked snapshots in the busy state by using the following command: vol options volume_name snapshot_clone_dependency on Note: For more information, see the section Examples of deleting backing snapshot copies of deleted LUN clones in the Data ONTAP 7.3.2 Block Access Management Guide for iSCSI and FC.

Alternate option (previous to Data ONTAP 7.3):

  1. Identify all snapshots that are locked by LUNs in a busy state by entering the following command: snap list
  2. Identify the LUNs and the snapshots that contain them by entering the following command: lun snap usage Note: See 1010736: Using lun snap usage -s when deleting busy snapshot copies for more information.
  3. Use the lun show command to display all LUNs. Does that LUN still exist?     Note: Do not delete files with a .lun extension. Contact NetApp Support if you are unsure of which file to delete.
  4. Delete the temporary LUN with the following command: lun destroy
  5. The steps below may require deleting all of the current snapshots. To be on the safe side, take a new snapshot. Now that the LUN file has been deleted, this snapshot will not hold the busy one.
  6. Try to delete the busy snapshot with: snap delete     The delete attempt should fail, indicating that younger snapshots are holding the LUN.
  7. Find the younger snapshots and delete them. There are two approaches to this, a careful one and an expedient one:
    • The careful approach: Starting with the next youngest snapshot, look in the snapshot for the LUN file. Identify all snapshots that have this LUN file. Then starting with the youngest, delete these snapshots. Once these are deleted, delete the snapshot in the '(busy,LUN)' state.         -OR-
    • The expedient approach: Try deleting the next youngest snapshot to the busy one. If that fails, try deleting the next one younger than that. Continue until a deletion succeeds. Then work your way back until you have deleted the '(busy,LUN)' snapshot.

Cloned LUNs

This can also be encountered when the LUN in the volume is cloned from a LUN that was removed from the system. The clone is never split and is still dependant on the snapshot. In this scenario, split the LUN in the active file system using the following command:

lun clone split start /vol/testvol/lun2.lun

This will remove the dependency of the LUN in the snapshot.

Related Link:

1011117: How to delete a 'Busy,LUNs' snapshot without deleting all snapshots

This entry was posted in netapp. Bookmark the permalink.

Comments are closed.