This 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 three GB of disk space. For a traditional volume, the volume size must be approximately three 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.
-
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:
vol create
volspace
aggr1
67g
df
-r
/vol/volspace
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/volspace/.snapshot
-
Set the percentage of snap reserve space to 0 and observe the effect on disk space by entering the following commands:
snap reserve
volspace 0
df
-r
/vol/volspace
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/volspace/.snapshot
-
Create a LUN named /vol/volspace/lun0 and observe the effect on disk space by entering the following commands:
lun create
-s
3g
-t
aix
/vol/volspace/lun0
df
-r
/vol/volspace
The following sample output is displayed. Three 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/volspace/.snapshot
-
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.
igroup create
-i -t
aix
aix_host
iqn.1996-04.aixhost.host1
lun map /vol/volspace/lun0aix_host 0
-
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, refer to your Host Utilities documentation. These commands have no effect on disk space.
-
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:
df
-r
/vol/volspace
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/volspace/.snapshot
-
Turn off space reservations and see the effect on space by entering the following commands:
lun set
reservation
/vol/volspace/lun0
disable
df
-r
/vol/volspace
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 of 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/volspace/.snapshot