|
| 1 | +--- |
| 2 | +title: Add storage to an Azure HPC Cache |
| 3 | +description: How to define storage targets so that your Azure HPC Cache can use your on-premises NFS system or Azure Blob containers for long-term file storage |
| 4 | +author: ekpgh |
| 5 | +ms.service: hpc-cache |
| 6 | +ms.topic: conceptual |
| 7 | +ms.date: 09/06/2019 |
| 8 | +ms.author: v-erkell |
| 9 | +--- |
| 10 | + |
| 11 | +# Add storage |
| 12 | + |
| 13 | +*Storage targets* are back-end storage for files that are accessed through an Azure HPC Cache instance. You can add NFS storage, like an on-premises hardware system, or store data in Azure Blob. |
| 14 | + |
| 15 | +You can define up to ten different storage targets for one cache. The cache presents all of the storage targets in one aggregated namespace. |
| 16 | + |
| 17 | +Remember that the storage exports must be accessible from your cache's virtual network. For on-premises hardware storage, you might need to set up a DNS server that can resolve hostnames for NFS storage access. Read more in [DNS access](hpc-cache-prereqs.md#dns-access). |
| 18 | + |
| 19 | +You can add storage targets while creating your Azure HPC Cache, or afterward. The procedure is slightly different depending on whether you're adding Azure Blob storage or an NFS export. Details for each are below. |
| 20 | + |
| 21 | +## Add storage targets while creating the cache |
| 22 | + |
| 23 | +Use the **Storage targets** tab of the cache creation wizard to define storage at the same time you create the cache instance. |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | +Click the **Add storage target** link to add storage. |
| 28 | + |
| 29 | +## Add storage targets from the cache |
| 30 | + |
| 31 | +From the Azure portal, open your cache instance and click **Storage targets** on the left sidebar. The storage target page lists all existing targets and gives a link to add a new one. |
| 32 | + |
| 33 | +## Add a new Azure Blob storage target |
| 34 | + |
| 35 | +A new Blob storage target needs an empty Blob container or a container that is populated with data in the Azure HPC Cache cloud filesystem format. Read more about pre-loading a Blob container in [Move data to Azure Blob storage](hpc-cache-ingest.md). |
| 36 | + |
| 37 | +To define an Azure Blob container, enter this information. |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | +* **Storage target name** - Set a name that identifies this storage target in the Azure HPC Cache. |
| 42 | +* **Target type** - Choose **Blob**. |
| 43 | +* **Storage account** - Select the account with the container to reference. |
| 44 | + |
| 45 | + You will need to authorize the cache instance to access the storage account as described in [Add the access roles](#add-the-access-control-roles-to-your-account). |
| 46 | +* **Storage container** - Select the Blob container for this target. |
| 47 | + |
| 48 | +* **Virtual namespace path** - Set the client-facing filepath for this storage target. Read [Configure aggregated namespace](hpc-cache-namespace.md) to learn more about the virtual namespace feature. |
| 49 | + |
| 50 | +<!-- The namespace path value must end with a slash (``/``) and should not start with one. --> |
| 51 | + |
| 52 | +When finished, click **OK** to add the storage target. |
| 53 | + |
| 54 | +### Add the access control roles to your account |
| 55 | + |
| 56 | +The Azure HPC Cache uses [role-based access control (RBAC)](https://docs.microsoft.com/azure/role-based-access-control/index) to authorize the cache application to access your storage account for Azure Blob storage targets. |
| 57 | + |
| 58 | +The storage account owner must explicitly add the rolls [Storage Account Contributor](https://docs.microsoft.com/azure/role-based-access-control/built-in-roles#storage-account-contributor) and [Storage Blob Data Contributor](https://docs.microsoft.com/azure/role-based-access-control/built-in-roles#storage-blob-data-contributor) for the user "StorageCache Resource Provider". |
| 59 | + |
| 60 | +You can do this ahead of time, or by clicking a link on the page where you add a Blob storage target. |
| 61 | + |
| 62 | +Steps to add the RBAC roles: |
| 63 | + |
| 64 | +1. Open the **Access control (IAM)** page for the storage account. (The link in the **Add storage target** page automatically opens this page for the selected account.) |
| 65 | + |
| 66 | +1. Click the **+** at the top of the page and choose **Add a role assignment**. |
| 67 | + |
| 68 | +1. Select the role "Storage Account Contributor" from the list. |
| 69 | + |
| 70 | +1. In the **Assign access to** field, leave the default value selected ("Azure AD user, group, or service principal"). |
| 71 | + |
| 72 | +1. In the **Select** field, search for "storagecache". This string should match one security principal, named "HPC Cache Resource Provider". Click that principal to select it. |
| 73 | + |
| 74 | +1. Click the **Save** button to add the role assignment to the storage account. |
| 75 | + |
| 76 | +1. Repeat this process to assign the role "Storage Blob Data Contributor". |
| 77 | + |
| 78 | + |
| 79 | + |
| 80 | +## Add a new NFS storage target |
| 81 | + |
| 82 | +An NFS storage target has some extra fields to specify how to reach the storage export and how to efficiently cache its data. Also, you can create multiple namespace paths from one NFS host if it has more than one export available. |
| 83 | + |
| 84 | + |
| 85 | + |
| 86 | +Provide this information for an NFS-backed storage target: |
| 87 | + |
| 88 | +* **Storage target name** - Set a name that identifies this storage target in the Azure HPC Cache. |
| 89 | + |
| 90 | +* **Target type** - Choose **NFS**. |
| 91 | + |
| 92 | +* **Hostname** - Enter the IP address or fully qualified domain name for your NFS storage system. (Use a domain name only if your cache has access to a DNS server that can resolve the name.) |
| 93 | + |
| 94 | +* **Usage model** - Choose one of the data caching profiles based on your workflow, described in [Choose a usage model, below](#choose-a-usage-model). |
| 95 | + |
| 96 | +You can create multiple namespace paths to represent different exports on the same NFS storage system, but you must create them all from one storage target. |
| 97 | + |
| 98 | +For each export, fill in these values: |
| 99 | + |
| 100 | +* **Virtual namespace path** - Set the client-facing filepath for this storage target. Read [Configure aggregated namespace](hpc-cache-namespace.md) to learn more about the virtual namespace feature. |
| 101 | + |
| 102 | +<!-- The virtual path should start with a slash ``/``. --> |
| 103 | + |
| 104 | +* **NFS export path** - Enter the path to the NFS export. |
| 105 | + |
| 106 | +* **Subdirectory path** - If you want to mount a specific subdirectory of the export, enter it here. If not, leave this field blank. |
| 107 | + |
| 108 | +When finished, click **OK** to add the storage target. |
| 109 | + |
| 110 | +### Choose a usage model |
| 111 | +<!-- link in GUI to this heading --> |
| 112 | + |
| 113 | +When you create a storage target that points to an NFS storage system, you need to choose the *usage model* for that target. This model determines how your data is cached. |
| 114 | + |
| 115 | +* Read heavy - If you mostly use the cache to speed up data read access, choose this option. |
| 116 | + |
| 117 | +* Read/write - If clients use the cache to read and write, choose this option. |
| 118 | + |
| 119 | +* Clients bypass the cache - Choose this option if your clients write data directly to the storage system without first writing to the cache. |
| 120 | + |
| 121 | +## Next steps |
| 122 | + |
| 123 | +After creating storage targets, consider one of these tasks: |
| 124 | + |
| 125 | +* [Mount the Azure HPC Cache](hpc-cache-mount.md) |
| 126 | +* [Move data to Azure Blob storage](hpc-cache-ingest.md) |
0 commit comments