Monitoring disk space
Commands for monitoring disk space
You use the following commands to monitor disk space:
Estimating the data change rate between Snapshot copies
When you initially set up volumes and LUNs, you estimate the rate of change of your data to calculate the volume size. After you create the volumes and LUNs, you use the snap delta command to monitor the actual rate of change of data. You can adjust the fractional overwrite reserve or increase the size of your aggregates or volumes based on the actual rate of change.
Displaying the change rate
To display the rate of change of data between Snapshot copies, complete the following steps:
Step
|
Action
|
|
1
|
Enter the following command:
snap delta [-A] [vol_name [begin_snapshot] [end_snapshot]]
-A displays the rate of change of data between Snapshot copies for all aggregates in the system.
vol_name is the name of the volume.
begin_snapshot is the name of the first Snapshot copy to report data for.
end_snapshot is the names of the last Snapshot copy to report data for.
If you do not specify an argument, the snap delta command displays the rate of change of data between Snapshot copies for all volumes in the system.
Example
The following example displays the rate of change of data between all Snapshot copies in vol0.
filer_1> snap delta vol0
Volume vol0
working...
From Snapshot To KB changed Time Rate (KB/hour)
--------------- -------------------- ----------- ------------ ---------------
hourly.0 Active File System 1460 0d 02:16 639.961
nightly.0 hourly.0 1492 0d 07:59 186.506
hourly.1 nightly.0 368 0d 04:00 91.993
hourly.2 hourly.1 1420 0d 04:00 355.000
hourly.3 hourly.2 1960 0d 03:59 490.034
hourly.4 hourly.3 516 0d 04:00 129.000
nightly.1 hourly.4 1456 0d 08:00 182.000
hourly.5 nightly.1 364 0d 04:00 91.000
Summary...
From Snapshot To KB changed Time Rate (KB/hour)
--------------- -------------------- ----------- ------------ ---------------
hourly.5 Active File System 9036 1d 14:16 236.043
|
Interpreting snap delta output
The first row of the snap delta output displays the rate of change between the most recent Snapshot copy and the active file system. The following rows provide the rate of change between successive Snapshot copies. Each row displays the names of the two Snapshot copies that are compared, the amount of data that has changed between them, the time elapsed between the two Snapshot copies, and how fast the data changed between the two Snapshot copies.
If you do not specify any Snapshot copies when you enter the snap delta command, the output also displays a table that summarizes the rate of change for the volume between the oldest Snapshot copy and the active file system.
Estimating the amount of space freed by Snapshot copies
To estimate the amount of space freed by deleting a set of Snapshot copies, complete the following step.
Step
|
Action
|
|
1
|
Enter the following command:
snap reclaimable vol_name snapshot snapshot...
vol_name is the name of the volume.
snapshot is the name of the Snapshot copy. You can specify more than one Snapshot copy.
Example
The following example shows the approximate amount of space that would be freed by deleting two Snapshot copies.
filer_1> snap reclaimable vol0 hourly.1 hourly.5
Processing (Press Ctrl-C to exit) ...
snap reclaimable: Approximately 1860 Kbytes would be
freed.
|
Displaying statistics about free space
You use the df option pathname command to monitor the amount of free disk space that is available on one or all volumes on a storage system. The amount of space is displayed in 1,024-byte blocks by default. You use the -k, -m, -g, or -t options to display space in KB, MB, GB, or TB format, respectively.
The -r option changes the last column to report on the amount of reserved space; that is, how much of the used space is reserved for overwrites to existing LUNs.
The output of the df command displays four columns of statistics about the active file system in the volume and the Snapshot copy directory for that volume. The following statistics are displayed:
- Amount of total space on the volume, in the byte format you specify.
Total space = used space + available space.
- Amount of used space.
Used space = space storing data + space storing Snapshot copies + space reserved for overwrites.
- Amount of available space.
Available space = space that is not used or reserved; it is free space.
- Percentage of the volume capacity being used.
This information is displayed if you do not use the -r option.
In the statistics displayed for the Snapshot copy directory, the sum of used space and available space can be larger than the total space for that volume. This is because the additional space used by Snapshot copies is also counted in the used space of the active file system.
How LUN and Snapshot copy operations affect disk space
The following table illustrates the effect on disk space when you create a sample volume, create a LUN, write data to the LUN, take Snapshot copies of the LUN, and expand the size of the volume.
For this example, assume that space reservation is enabled, fractional overwrite reserve is set to 100 percent, and snap reserve is set to 0 percent.
Action
|
Result
|
Comment
|
|
Create a 100-GB volume.
|
Used space = 0 GB Reserved space = 0 GB Available space = 100 GB Volume Total: 100 GB
Snapshot creation is allowed.
|
N/A
|
|
Create a 40-GB LUN on that volume.
|
Used space = 40 GB Reserved space = 0 GB Available space = 60 GB Volume Total: 100 GB
Snapshot creation is allowed.
|
Used space is 40 GB for the LUN.
If the LUN size was limited to accommodate at least one Snapshot copy when it was created, the LUN will always be less than one-half of the volume size.
|
|
Write 40 GB of data to the LUN.
|
Used space = 40 GB Reserved space = 0 GB Available space = 60 GB Volume Total: 100 GB
Snapshot creation is allowed.
|
The amount of used space does not change because with space reservations set to On, the same amount of space is used when you write to the LUN as when you created the LUN.
|
|
Create a Snapshot copy of the LUN.
|
Used space = 80 GB Reserved space = 40 GB Available space = 20 GB Volume Total: 100 GB
Snapshot succeeds.
|
The Snapshot copy locks all the data on the LUN so that even if that data is later deleted, it remains in the Snapshot copy until the Snapshot copy is deleted.
As soon as a Snapshot copy is created, the reserved space must be large enough to ensure that any future write operations to the LUN succeed. Reserved space is now 40 GB, the same size of the LUN. Data ONTAP always displays the amount of reserved space required for successful write operations to LUNs.
Because reserved space is also counted as used space, used space is 80 GB.
|
|
Overwrite all 40 GB of data on the LUN with new data.
|
Used space = 100 GB Reserved space = 40 GB Available space = 0 GB Volume Total: 100 GB
Snapshot creation is blocked.
|
Data ONTAP manages the space so that the overwrite increases used space to 100 GB and decreases available space to 0. The 40 GB for reserved space is still displayed.
You cannot take another Snapshot copy because no space is available. That is, all space is used by data or held in reserve so that any and all changes to the content of the LUN can be written to the volume.
|
|
Expand the volume by 100 GB.
|
Used space = 120 GB Reserved space = 40 GB Available space = 80 GB Volume Total: 200 GB
Snapshot creation is allowed.
|
After you expand the volume, the amount of used space displays the amount needed for the 40 GB LUN, the 40 GB Snapshot copy, and 40 GB of reserved space.
Free space becomes available again, so Snapshot copy creation is no longer blocked.
|
|
Overwrite all 40 GB of data on the LUN with new data.
|
Used space = 120 GB Reserved space = 40 GB Available space = 80 GB Volume Total: 200 GB
Snapshot creation is allowed.
|
Because none of the overwritten data belongs to a Snapshot copy, it disappears when the new data replaces it. As a result, the total amount of used space remains unchanged.
|
|
Create a Snapshot copy of the LUN.
|
Used space = 120 GB Reserved space = 40 GB Available space = 80 GB Volume Total: 200 GB
Snapshot creation is allowed.
|
The Snapshot copy locks all 40 GB of data currently on the LUN. The used space is the sum of 40 GB for the LUN, 40 GB for each Snapshot copy, and 40 GB for reserved space. The used space does not increase because data has not changed.
|
|
Overwrite all 40 GB of data on the LUN with new data.
|
Used space = 160 GB Reserved space = 40 GB Available space = 40 GB Volume Total: 200 GB
Snapshot creation is allowed.
|
Because the data being replaced belongs to a Snapshot copy, it remains on the volume.
|
|
Expand the LUN by 40 GB.
|
Used space = 200 GB Reserved space = 40 GB Available space = 0 GB Volume Total: 200 GB
Snapshot creation is blocked.
|
The amount of used space increases by the amount of LUN expansion.
The amount of reserved space remains at 40 GB.
Because the available space has decreased to 0, Snapshot copy creation is blocked.
|
|
Delete both Snapshot copies of the volume.
|
Used space = 80 GB Reserved space = 0 GB Available space = 120 GB Volume Total: 200 GB
Snapshot creation is allowed.
|
The 80 GB of data locked by the two Snapshot copies disappears from the used total when the Snapshot copies are deleted. Because there are no more Snapshot copies of this LUN, the reserved space decreases to 0 GB.
Snapshot creation is once again allowed.
|
|
Delete the LUN.
|
Used space = 0 GB Reserved space = 0 GB Available space = 200 GB Volume Total: 200 GB
|
Because no Snapshot copies exist for this volume, deletion of the LUN causes the used space to decrease to 0 GB.
|
Examples of disk space monitoring using the df command
The following examples illustrate how to monitor disk space when you create LUNs in various scenarios. They do not include every step required to configure the storage system or to perform tasks on the host.
- Without using Snapshot copies
- Using Snapshot copies
- Using backing store LUNs and LUN clones
In the examples, assume that the storage system is named toaster.
Monitoring disk space without using Snapshot copies
The following example illustrates how to monitor disk space on a volume when you create a LUN without using Snapshot copies. For this example, assume that you require less than the minimum capacity based on the recommendation of creating a seven-disk volume.
For simplicity, assume the LUN requires only 3 GB of disk space. For a traditional volume, the volume size must be approximately 3 GB plus 10 percent. If you plan to use 72-GB disks (which typically provide 67.9 GB of physical capacity, depending on the manufacturer), two disks provide more than enough space, one for data and one for parity.
To work through the example, complete the following steps.
Step
|
Action
|
|
1
|
From the storage system, create a new traditional volume named volspace that has approximately 67 GB, and observe the effect on disk space by entering the following commands:
toaster> vol create volspace 2
toaster> df -r /vol/volspace
Result
The following sample output is displayed. There is a snap reserve of 20 percent on the volume even though the volume will be used for LUNs because snap reserve is set to 20 percent by default.
Filesystem kbytes used avail reserved Mounted on
/vol/volspace 50119928 1440 50118488 0 /vol/volspace/
/vol/volspace/.snapshot 12529980 0 12529980 0 /vol/volsp
ace/.snapshot
|
|
2
|
Set the percentage of snap reserve space to zero and observe the effect on disk space by entering the following commands:
toaster> snap reserve volspace 0
toaster> df -r /vol/volspace
Result
The following sample output is displayed. The amount of available Snapshot copy space becomes zero, and the 20 percent of Snapshot copy space is added to available space for /vol/volspace.
Filesystem kbytes used avail reserved Mounted on
/vol/volspace/ 62649908 1440 62648468 0 /vol/volspace/
/vol/volspace/.snapshot 0 0 0 0 /vol/vols
pace/.snapshot
|
|
3
|
Create a LUN (/vol/volspace/lun0) and observe the effect on disk space by entering the following commands:
toaster> lun create -s 3g -t aix /vol/volspace/lun0
toaster> df -r /vol/volspace
Result
The following sample output is displayed. 3 GB of space is used because this is the amount of space specified for the LUN, and space reservation is enabled by default.
Filesystem kbytes used avail reserved Mounted on
/vol/volspace/ 62649908 3150268 59499640 0 /vol/volspace/
/vol/volspace/.snapshot 0 0 0 0 /vol/volsp
ace/.snapshot
|
|
4
|
Create an igroup named aix_host and map the LUN to it by entering the following commands (assuming that the host node name is iqn.1996-04.aixhost.host1). Depending on your host, you might need to create WWNN persistent bindings. These commands have no effect on disk space.
toaster> igroup create -i -t aix aix_host iqn.1996-04.aixhost.host1
toaster> lun map /vol/volspace/lun0 aix_host 0
|
|
5
|
From the host, discover the LUN, format it, make the file system available to the host, and write data to the file system. For information about these procedures, see the documentation from your Host Support Kit or Host Attach Kit. These commands have no effect on disk space.
|
|
6
|
From the storage system, ensure that creating the file system on the LUN and writing data to it has no effect on space on the storage system by entering the following command:
toaster> df -r /vol/volspace
Result
The following sample output is displayed. From the storage system, the amount of space used by the LUN remains 3 GB.
Filesystem kbytes used avail reserved Mounted on
/vol/volspace/ 62649908 3150268 59499640 0 /vol/volspace/
/vol/volspace/.snapshot 0 0 0 0 /vol/vol
space/.snapshot
|
|
7
|
Turn off space reservations and see the effect on space by entering the following commands:
toaster> lun set reservation /vol/volspace/lun0 disable
toaster> df -r /vol/volspace
Result
The following sample output is displayed. The 3 GB of space for the LUN is no longer reserved, so it is not counted as used space; it is now available space. Any other requests to write data to the volume can occupy all the available space, including the 3 GB that the LUN expects to have. If the available space is used before the LUN is written to, write operations to the LUN fail. To restore the reserved space for the LUN, turn space reservations on.
Filesystem kbytes used avail reserved Mounted on
/vol/volspace/ 62649908 144 62649584 0 /vol/volspace/
/vol/volspace/.snapshot 0 0 0 0 /vol/vols
pace/.snapshot
|
Monitoring disk space using Snapshot copies
The following example illustrates how to monitor disk space on a volume when taking Snapshot copies. Assume that you start with a new volume, and the LUN requires 3 GB of disk space, and fractional overwrite reserve is set to 100 percent. The recommended volume size is approximately 2*3 GB plus the rate of change of data. Assuming the amount of change is small, the rate of change is minimal, so using two 72-GB disks still provides more than enough space.
To work through the example, complete the following steps.
Step
|
Action
|
|
1
|
From the storage system, create a new volume named volspace that has approximately 67 GB and observe the effect on disk space by entering the following commands:
toaster> vol create volspace 2
toaster> df -r /vol/volspace
Result
The following sample output is displayed. There is a snap reserve of 20 percent on the volume even though the volume will be used for LUNs.
Filesystem kbytes used avail reserved Mounted on
/vol/volspace 50119928 1440 50118488 0 /vol/volspace/
/vol/volspace/.snapshot 12529980 0 12529980 0 /vol/vol s
pace/.snapshot
|
|
2
|
Set the percentage of snap reserve space to zero by entering the following command:
toaster> snap reserve volspace 0
|
|
3
|
Create a LUN (/vol/volspace/lun0) by entering the following commands:
toaster> lun create -s 6g -t aix /vol/volspace/lun0
toaster> df -r /vol/volspace
Result
The following sample output is displayed. Approximately 6 GB of space is taken from available space and is displayed as used space for the LUN:
Filesystem kbytes used avail reserved Mounted on
/vol/volspace/ 62649908 6300536 56169372 0 /vol/volspace/
/vol/volspace/.snapshot 0 0 0 0 /vol/volsp
ace/.snapshot
|
|
4
|
Create an igroup named aix_host and map the LUN to it by entering the following commands (assuming that the host node name is iqn.1996-04.aixhost.host1). Depending on your host, you might need to create WWNN persistent bindings. These commands have no effect on disk space.
toaster> igroup create -i -t aix aix_host iqn.1996-04.aixhost.host1
toaster> lun map /vol/volspace/lun0 aix_host 0
|
|
5
|
From the host, discover the LUN, format it, make the file system available to the host, and write data to the file system. For information about these procedures, see the documentation from your Host Support Kit or Host Attach Kit. These commands have no effect on disk space.
|
|
6
|
From the host, write data to the file system (the LUN on the storage system). This has no effect on disk space.
|
|
7
|
Take a Snapshot copy named snap1 of the active file system, write 1 GB of data to it, and observe the effect on disk space.
Caution From the host or the application, ensure that the active file system is in a quiesced or synchronized state prior to taking a snapshot.
Enter the following commands:
toaster> snap create volspace snap1
toaster> df -r /vol/volspace
Result
The following sample output is displayed. The first Snapshot copy reserves enough space to overwrite every block of data in the active file system, so you see 12 GB of used space, the 6-GB LUN (which has 1 GB of data written to it), and one Snapshot copy. Notice that 6 GB appears in the reserved column to ensure write operations to the LUN do not fail. If you disable space reservation, this space is returned to available space.
Filesystem kbytes used avail reserved Mounted on
/vol/volspace/ 62649908 12601072 49808836 6300536 /vol/volspace/
/vol/volspace/.snapshot 0 180 0 0 /vol/vols
pace/.snapshot
|
|
8
|
From the host, write another 1 GB of data to the LUN. Then, from the storage system, observe the effect on disk space by entering the following commands:
toaster> df -r /vol/volspace
Result
The following sample output is displayed. The amount of data stored in the active file system does not change. You just overwrote 1 GB of old data with 1 GB of new data. However, the Snapshot copy requires the old data to be retained. Before the write operation, there was only 1 GB of data, after the write operation, there were 1 GB of new data and 1 GB of data in a Snapshot copy. Notice that the used space increases for the Snapshot copy by 1 GB, and the available space for the volume decreases by 1 GB.
Filesystem kbytes used avail reserved Mounted on
/vol/volspace/ 62649908 12601072 47758748 0 /vol/volspace/
/vol/volspace/.snapshot 0 1050088 0 0 /vol/volspace/.
snapshot
|
|
9
|
Take a Snapshot copy named snap2 of the active file system and observe the effect on disk space by entering the following command:
Caution From the host or the application, ensure that the active file system is in a quiesced or synchronized state prior to taking a snapshot.
toaster> snap create volspace snap2
Result
The following sample output is displayed. Because the first Snapshot copy reserved enough space to overwrite every block, only 44 blocks are used to account for the second Snapshot copy.
Filesystem kbytes used avail reserved Mounted on
/vol/volspace/ 62649908 12601072 47758748 6300536 /vol/volspace/
/vol/volspace/.snapshot 0 1050136 0 0 /vol/volspace/
.snapshot
|
|
10
|
From the host, write 2 GB of data to the LUN and observe the effect on disk space by entering the following command:
toaster> df -r /vol/volspace
Result
The following sample output is displayed. The second write operation requires the amount of space actually used if it overwrites data in a Snapshot copy.
Filesystem kbytes used avail reserved Mounted on
/vol/volspace/ 62649908 12601072 4608427 6300536 /vol/volspace/
/vol/volspace/.snapshot 0 3150371 0 0 /vol/volspace/
.snapshot
|
Copyright © 1994-2005, Network Appliance, Inc. All rights
reserved.
Part No. 210-01094_B0
File: c8disk-2.htm
Last updated: 08-Dec-2005 13:25:33