A snapshot is in a busy state if there are any LUNs backed by data in that snapshot. The snapshot contains data that is used by the LUN. These LUNs can exist either in the active file system or in some other snapshot.
The following table describes a busy snapshot scenario: how a snapshot becomes busy and stays in a busy state through the various stages of LUN creation, snapshot activity, and LUN deletion.
Stage
|
Busy snapshot scenario
|
|
1 |
Create a LUN.
Example
lun create -s 10m /vol/vol2/lunA
Result
lunA exists in the active file system.
|
|
2 |
Display LUN status to see lunA.
Example
lun show -v
Result
The following message is displayed:
/vol/vol2/lunA 10m (10485760) (r/w, online)
Serial#: BnBt/YiART3H
Share: none
Space Reservation: enabled
Multiprotocol Type: image
|
|
3 |
Take a snapshot of the volume containing lunA.
Example
snap create vol2 snap0
Result
snap0 of vol2 is created, but it is not busy.
|
|
4 |
Display snapshot status to see that snap0 is not busy.
Example
snap list vol2
Result
The following message is displayed:
Volume vol2
working ...
%/used %/total date name
--------- --------- --------- -----------
0% ( 0%) 0% ( 0%) Mar 13 02:47 snap0
|
|
5 |
Create another LUN, backed by lunA in snap0.
Example
lun create -b /vol/vol2/.snapshot/snap0/lunA /vol/vol2/lunB
Result
lunB is a writable snapshot of lunA (a backing store LUN). snap0 is now marked "(busy, LUNs)."
|
|
6 |
Display snapshot status to see that snap0 is marked busy.
Example
snap list vol2
Result
The following message is displayed:
Volume vol2
working ...
%/used %/total date name
--------- --------- --------- -----------
19% (19%) 0% ( 0%) Mar 13 02:47 snap0 (busy,LUNs)
|
|
7 |
Take another snapshot of vol2.
Example
snap create vol2 snap1
Result
snap1 now exists, but it is not busy. snap0 is still busy.
|
|
8 |
Display snapshot status to see that snap1 is not busy and snap0 is still busy.
Example
snap list vol2
Result
The following message is displayed:
Volume vol2
working ...
%/used %/total date name
--------- --------- --------- -----------
0% ( 0%) 0% ( 0%) Mar 13 02:50 snap1
19% (19%) 0% ( 0%) Mar 13 02:47 snap0 (busy,LUNs)
|
|
9 |
Delete the LUN that was backed by lunA in snap0, lunB.
Example
lun destroy /vol/vol2/lunB
Result
lunB is deleted, but snap0 is still busy because snap1 contains a copy of lunB.
If you attempt to delete snap0, the following message is displayed:
vol2: Snapshot in use by dump, snap restore, SnapMirror, a CIFS share, RAID
mirroring, LUNs or volume clone.
|
|
10 |
Identify the LUNs in existing snapshots that are backed by data in the specified snapshot.
Example
lun snap usage vol2 snap0
Result
The following message is displayed:
snap1:
LUN: /vol/vol2/.snapshot/snap1/lunB
Backed By: /vol/vol2/.snapshot/snap0/lunA
|
|
11 |
Delete snap1.
Example
snap delete vol2 snap1
Result
snap1 is deleted, and snap0 is no longer marked busy.
|
|
12 |
Display snapshot status to see that snap0 is no longer busy.
Example
snap list vol2
Result
The following message is displayed:
Volume vol2
working ...
%/used %/total date name
--------- --------- --------- -----------
19% (19%) 0% ( 0%) Mar 13 02:47 snap0
|
|
13 |
Delete snap0.
Example
snap delete vol2 snap0
Result
snap0 is deleted.
|
|
14 |
Display snapshot status to see that there are no more snapshots.
Example
snap list vol2
Result
The following message is displayed:
Volume vol2
working ...
No snapshots exist.
|
To delete a snapshot in a busy state, complete the following steps.
Step
|
Action
|
|
1 |
Identify all snapshots that are in a busy state, locked by LUNs, by entering the following command:
snap list vol-name
Example
snap list vol2
Result
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 snapshots that contain them by entering the following command:
lun snap usage vol_name snap_name
Example
lun snap usage vol2 snap0
Result
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 preceding LUNs are backed by lunA in the snap0 snapshot. |
|
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 snapshots 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
Result
All the snapshots containing lunB are now deleted and snap0 is no longer busy.
|
|
5 |
Delete the snapshot by entering the following command:
snap delete vol-name snapshot-name
Example
snap delete vol2 snap0
|