Ordering Snapshots
To create snapshots of your storage volume, either in an automated way or manually, you need to purchase space to hold them. You can purchase snapshot capacity during the initial volume purchase or later by using these steps.
Determining how much snapshot space you need
Generically speaking, snapshot space is used by snapshots based on two key factors:
- How much your active file system changes over time.
- How long you plan to retain snapshots.
The way to calculate the amount of space that you need is (Rate of Change) x (number of hours/days/weeks/months data is retained).
The first snapshot uses a negligible amount of space as it's just a copy of the metadata (pointers) that indicates the active file system blocks.
A volume with numerous changes and a lengthy retention period needs more space than a volume with moderate changes and a moderate retention schedule. An example for the first type is a high change rate database. An example for the second type is a VMware® datastore.
If you take 12 hourly snapshots of 500 GB of actual data, and the change rate is 1 percent between each snapshot, you end up with 60 GB for snapshots.
*(5-GB Rate of Change) x (12 hourly snapshots) = (60 GB of used space)*
Conversely, if that 500 GB of actual data, with 12 hourly snapshots, saw 10 percent of change every hour, the snapshot space that is used is 600 GB.
*(50-GB Rate of Change) x (12 hourly snapshots) = (600 GB of used space)*
So when you determine how much Snapshot space you need, consider the rate of change carefully. It's a huge influence on how much snapshot space you need. A bigger volume is more likely to change more often. However, a 500-GB volume with 5 GB of change and a 10-TB volume with 5 GB of change use the same amount of snapshot space.
Additionally, for most workloads, the larger a volume is the less space needs to be set aside initially. It's primarily due to the underlying data efficiencies, and the nature of how snapshots work in the environment.
Ordering Snapshot space in the console
-
Log in to the IBM Cloud® console and click the menu icon .
-
select Infrastructure > Classic Infrastructure.
-
Access your Storage through Storage > File Storage for Classic.
-
Click Actions , then click Add Snapshot Space.
-
Select the amount of space that you need and the payment method.
-
Click Continue.
-
Enter any Promo Codes that you have and click Recalculate. The Charges for this order and Order Review have default values.
Discounts are applied when the order is processed.
-
Check the box to confirm that you read and understood the terms and conditions and click Place Order. Your snapshot space is provisioned in a few minutes.
Ordering Snapshot space from the CLI
Before you begin, decide on the CLI client that you want to use.
- You can either install the IBM Cloud CLI and install the SL plug-in with
ibmcloud plugin install sl
. For more information, see Extending IBM Cloud CLI with plug-ins. - Or, you can install the SLCLI.
Provisioning from the IBMCLOUD CLI
Use the ibmcloud sl file snapshot-order
command to provision snapshot space for your volume. The following example creates a 1000 GB snapshot space for the file share, which is identified by its ID 560156918
.
ibmcloud sl file snapshot-order 560156918 -s 1000 -t 4
For more information about all of the parameters that are available for this command, see ibmcloud sl file snapshot-order.
Provisioning from the SLCLI
Use the slcli file snapshot-order
command to provision snapshot space for your volume.
$ slcli file snapshot-order --help
Usage: slcli file snapshot-order [OPTIONS] VOLUME_ID
Options:
--capacity INTEGER Size of snapshot space to create in GB [required]
--tier [0.25|2|4|10] Endurance Storage Tier (IOPS per GB) of the file
volume for which space is ordered [optional, and only
valid for endurance storage volumes]
--upgrade Flag to indicate that the order is an upgrade
-h, --help Show this message and exit.
Ordering Snapshot space with Terraform
When you provision a storage volume with Terraform, use the ibm_storage_file
resource and specify the snapshot_capacity
argument. The following example defines 10 GB snapshot space.
resource "ibm_storage_file" "fs_endurance" {
type = "Endurance"
datacenter = "dal09"
capacity = 20
iops = 0.25
# Optional fields
allowed_virtual_guest_ids = ["28961689"]
allowed_subnets = ["10.146.139.64/26"]
allowed_ip_addresses = ["10.146.139.84"]
snapshot_capacity = 10
hourly_billing = true
}
If you want to increase the snapshot space, update the snapshot_capacity
argument with a larger number and apply the changes.
For more information about the arguments and attributes, see ibm_storage_file.