Table of ContentsLibraryView in Frames

Monitoring disk space on volumes with LUNs that use Snapshot copies

This example illustrates how to monitor disk space on a volume when taking Snapshot copies.

Considerations

Assume that you start with a new volume, and the LUN requires three 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.

Steps

  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: vol create volspace aggr1 67gdf -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

  2. Set the percentage of snap reserve space to zero by entering the following command: snap reserve volspace 0
  3. Create a LUN (/vol/volspace/lun0) by entering the following commands: lun create -s 6g -t aix /vol/volspace/lun0df -r /vol/volspace

    The following sample output is displayed. Approximately six 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/volspace/.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. igroup create -i -t aix aix_host iqn.1996-04.aixhost.host1 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, refer to your Host Utilities documentation. 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. Ensure that the active file system is in a quiesced or synchronized state.
  8. Take a Snapshot copy of the active file system named snap1, write one GB of data to it, and observe the effect on disk space by entering the following commands: snap create volspace snap1df -r /vol/volspace

    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/volspace/.snapshot

  9. 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: df -r /vol/volspace

    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, and after the write operation, there was 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

  10. Ensure that the active file system is in a quiesced or synchronized state.
  11. Take a Snapshot copy of the active file system named snap2 and observe the effect on disk space by entering the following command: snap create volspace snap2

    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

  12. From the host, write 2 GB of data to the LUN and observe the effect on disk space by entering the following command: df -r /vol/volspace

    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