升级到常规用途 v2 存储帐户Upgrade to a general-purpose v2 storage account

常规用途 v2 存储帐户支持最新的 Azure 存储功能,并纳入了常规用途 v1 存储帐户和 Blob 存储帐户的所有功能。General-purpose v2 storage accounts support the latest Azure Storage features and incorporate all of the functionality of general-purpose v1 and Blob storage accounts. 建议将常规用途 v2 帐户用于大多数存储方案。General-purpose v2 accounts are recommended for most storage scenarios. 常规用途 v2 帐户提供适用于 Azure 存储的最低每 GB 容量价格,以及具有行业竞争力的事务价格。General-purpose v2 accounts deliver the lowest per-gigabyte capacity prices for Azure Storage, as well as industry-competitive transaction prices. 在“热”、“冷”或“存档”分层中,常规用途 v2 帐户支持热/冷和 blob 级别的默认帐户访问层级。General-purpose v2 accounts support default account access tiers of hot or cool and blob level tiering between hot, cool, or archive.

从常规用途 v1 或 Blob 存储帐户升级到常规用途 v2 存储帐户非常简单。Upgrading to a general-purpose v2 storage account from your general-purpose v1 or Blob storage accounts is straightforward. 可以使用 Azure 门户、PowerShell 或 Azure CLI 升级。You can upgrade using the Azure portal, PowerShell, or Azure CLI. 升级到常规用途 v2 存储帐户不会有停机或数据丢失的风险。There is no downtime or risk of data loss associated with upgrading to a general-purpose v2 storage account. 帐户升级通过更改帐户类型的简单 Azure 资源管理器操作进行。The account upgrade happens via a simple Azure Resource Manager operation that changes the account type.

Important

将常规用途 v1 或 Blob 存储帐户升级到常规用途 v2 是永久性的,不能撤消。Upgrading a general-purpose v1 or Blob storage account to general-purpose v2 is permanent and cannot be undone.

  1. 登录到 Azure 门户Sign in to the Azure portal.

  2. 导航到存储帐户。Navigate to your storage account.

  3. 在“设置”部分单击“配置”。 In the Settings section, click Configuration.

  4. 在“帐户类型”下单击“升级” 。Under Account kind, click on Upgrade.

  5. 在“确认升级”下键入帐户名称。 Under Confirm upgrade, type in the name of your account.

  6. 单击边栏选项卡底部的“升级”。 Click Upgrade at the bottom of the blade.

    升级帐户种类

指定 Blob 数据的访问层Specify an access tier for blob data

常规用途 v2 帐户支持所有 Azure 存储服务和数据对象,但访问层仅适用于 Blob 存储中的块 Blob。General-purpose v2 accounts support all Azure storage services and data objects, but access tiers are available only apply to block blobs within Blob storage. 升级到常规用途 v2 存储帐户时,可以指定“热”或“冷”默认帐户访问层,这表示将上传 blob 数据的默认层,就像未指定各个 blob 访问层参数一样。When you upgrade to a general-purpose v2 storage account, you can specify a default account access tier of hot or cool, which indicates the default tier your blob data will be uploaded as if the individual blob access tier parameter is not specified.

Blob 访问层允许根据预期使用模式选择最具经济效益的存储。Blob access tiers enable you to choose the most cost-effective storage based on your anticipated usage patterns. 块 Blob 可以存储在热层、冷层或存档层中。Block blobs can be stored in a hot, cool, or archive tiers. 有关访问层的详细信息,请参阅 Azure Blob 存储:热、冷、存档存储层For more information on access tiers, see Azure Blob storage: Hot, Cool, and Archive storage tiers.

默认情况下,新存储帐户在热访问层中创建,常规用途 v1 存储帐户可以升级到“热”或“冷”帐户层。By default, a new storage account is created in the hot access tier, and a general-purpose v1 storage account can be upgraded to either the hot or cool account tier. 如果升级时未指定帐户访问层,则默认情况下,它将升级到“热”层。If an account access tier is not specified on upgrade, it will be upgraded to hot by default. 如果正探讨要将哪个访问层用于升级,请考虑当前的数据使用场景。If you are exploring which access tier to use for your upgrade, consider your current data usage scenario. 有两种典型的用户场景适合迁移到常规用途 v2 帐户:There are two typical user scenarios for migrating to a general-purpose v2 account:

  • 已经有了一个常规用途 v1 存储帐户,想要使用适合 Blob 数据的存储访问层来评估对常规用途 v2 存储帐户所做的升级。You have an existing general-purpose v1 storage account and want to evaluate an upgrade to a general-purpose v2 storage account, with the right storage access tier for blob data.
  • 已经决定使用常规用途 v2 存储帐户,或者已经有了一个这种帐户,想要评估一下是应使用热存储访问层还是冷存储访问层来存储 Blob 数据。You have decided to use a general-purpose v2 storage account or already have one and want to evaluate whether you should use the hot or cool storage access tier for blob data.

在这两种情况下,首要任务都是估算对存储在常规用途 v2 存储帐户中的数据进行存储、访问和操作所需的成本,并将该成本与当前成本进行比较。In both cases, the first priority is to estimate the cost of storing, accessing, and operating on your data stored in a general-purpose v2 storage account and compare that against your current costs.

定价和计费Pricing and billing

将 v1 存储帐户升级到常规用途 v2 帐户是免费的。Upgrading a v1 storage account to a general-purpose v2 account is free. 在升级过程中,可以指定所需的帐户层。You may specify the desired account tier during the upgrade process. 如果在升级时未指定帐户层,则已升级帐户的默认帐户层将为 HotIf an account tier is not specified on upgrade, the default account tier of the upgraded account will be Hot. 但是,在升级后更改存储访问层可能会导致帐单更改,因此建议在升级过程中指定新的帐户层。However, changing the storage access tier after the upgrade may result in changes to your bill so it is recommended to specify the new account tier during upgrade.

所有存储帐户使用的定价模型都适用于 Blob 存储,具体取决于每个 Blob 的层。All storage accounts use a pricing model for blob storage based on the tier of each blob. 使用存储帐户时,需要考虑到以下计费因素:When using a storage account, the following billing considerations apply:

  • 存储成本:除了存储的数据量,存储数据的成本将因存储访问层而异。Storage costs: In addition to the amount of data stored, the cost of storing data varies depending on the storage access tier. 层越冷,单 GB 成本越低。The per-gigabyte cost decreases as the tier gets cooler.

  • 数据访问成本:层越冷,数据访问费用越高。Data access costs: Data access charges increase as the tier gets cooler. 对于冷存储访问层和存档存储访问层中的数据,需要按 GB 支付读取方面的数据访问费用。For data in the cool and archive storage access tier, you are charged a per-gigabyte data access charge for reads.

  • 事务成本:层越冷,每个层的按事务收费越高。Transaction costs: There is a per-transaction charge for all tiers that increases as the tier gets cooler.

  • 异地复制数据传输成本:此费用仅适用于配置了异地复制的帐户,包括 GRS 和 RA-GRS。Geo-Replication data transfer costs: This charge only applies to accounts with geo-replication configured, including GRS and RA-GRS. 异地复制数据传输会产生每 GB 费用。Geo-replication data transfer incurs a per-gigabyte charge.

  • 出站数据传输成本:出站数据传输(传出 Azure 区域的数据)会按每 GB 产生带宽使用费,与通用存储帐户一致。Outbound data transfer costs: Outbound data transfers (data that is transferred out of an Azure region) incur billing for bandwidth usage on a per-gigabyte basis, consistent with general-purpose storage accounts.

  • 更改存储访问层:将帐户存储访问层从“冷”更改为“热”会产生费用,费用等于读取存储帐户中存在的所有数据的费用。Changing the storage access tier: Changing the account storage access tier from cool to hot incurs a charge equal to reading all the data existing in the storage account. 但是,将帐户访问层从“热”更改为“冷”产生的费用则相当于将所有数据写入冷层(仅限 GPv2 帐户)。However, changing the account access tier from hot to cool incurs a charge equal to writing all the data into the cool tier (GPv2 accounts only).

Note

有关存储帐户的定价模型的详细信息,请参阅 Azure 存储定价页。For more information on the pricing model for storage accounts, see Azure Storage Pricing page. 有关出站数据传输收费的详细信息,请参阅数据传输定价详细信息页。For more information on outbound data transfer charges, see Data Transfers Pricing Details page.

估算当前使用模式的成本Estimate costs for your current usage patterns

若要估算在特定层的常规用途 v2 存储帐户中存储和访问 Blob 数据所需的成本,请评估现有的使用模式,或对预期的使用模式进行大致的估计。To estimate the cost of storing and accessing blob data in a general-purpose v2 storage account in a particular tier, evaluate your existing usage pattern or approximate your expected usage pattern. 一般情况下,需了解:In general, you want to know:

  • Blob 存储消耗量(以 GB 为单位),包括:Your Blob storage consumption, in gigabytes, including:

    • 有多少数据存储在存储帐户中?How much data is being stored in the storage account?
    • 数据量每月如何变化;新数据是否不断替换旧数据?How does the data volume change on a monthly basis; does new data constantly replace old data?
  • Blob 存储数据的主要访问模式,包括:The primary access pattern for your Blob storage data, including:

    • 要从存储帐户读取多少数据,向其写入了多少数据?How much data is being read from and written to the storage account?
    • 针对存储帐户中的数据执行多少次读取和写入操作?How many read operations versus write operations occur on the data in the storage account?

若要确定最适合需求的访问层,确定 blob 数据容量以及如何使用这些数据会很有帮助。To decide on the best access tier for your needs, it can be helpful to determine your blob data capacity, and how that data is being used. 最好通过查看帐户的监视指标来完成此操作。This can be best done by looking at the monitoring metrics for your account.

监视现有存储帐户Monitoring existing storage accounts

若要监视现有存储帐户并收集该数据,可以利用 Azure 存储分析进行日志记录,并为存储帐户提供指标数据。To monitor your existing storage accounts and gather this data, you can make use of Azure Storage Analytics, which performs logging and provides metrics data for a storage account. 存储分析可存储一些指标,这些指标包括有关存储服务请求的聚合事务统计信息和容量数据,适用于 GPv1、GPv2 和 Blob 存储帐户类型。Storage Analytics can store metrics that include aggregated transaction statistics and capacity data about requests to the storage service for GPv1, GPv2, and Blob storage account types. 该数据存储在同一存储帐户中的已知表中。This data is stored in well-known tables in the same storage account.

有关详细信息,请参阅 About Storage Analytics Metrics(关于存储分析指标)和 Storage Analytics Metrics Table Schema(存储分析指标表架构)For more information, see About Storage Analytics Metrics and Storage Analytics Metrics Table Schema

Note

Blob 存储帐户公开表服务终结点的目的只是为了存储和访问该帐户的指标数据。Blob storage accounts expose the Table service endpoint only for storing and accessing the metrics data for that account.

若要监视 Blob 存储的存储消耗情况,需启用容量指标。To monitor the storage consumption for Blob storage, you need to enable the capacity metrics. 启用此功能后,会每天为存储帐户的 Blob 服务记录容量数据,并将容量数据记录为表条目写入到同一存储帐户中的 $MetricsCapacityBlob 表。With this enabled, capacity data is recorded daily for a storage account's Blob service and recorded as a table entry that is written to the $MetricsCapacityBlob table within the same storage account.

若要监视 Blob 存储的数据访问模式,需通过 API 启用每小时事务指标。To monitor data access patterns for Blob storage, you need to enable the hourly transaction metrics from the API. 启用每小时事务指标后,会每小时聚合按 API 进行的事务,并将这些事务记录为表条目写入到同一存储帐户中的 $MetricsHourPrimaryTransactionsBlob 表。With hourly transaction metrics enabled, per API transactions are aggregated every hour, and recorded as a table entry that is written to the $MetricsHourPrimaryTransactionsBlob table within the same storage account. 在使用 RA-GRS 存储帐户时, $MetricsHourSecondaryTransactionsBlob 表会将事务记录到辅助终结点。The $MetricsHourSecondaryTransactionsBlob table records the transactions to the secondary endpoint when using RA-GRS storage accounts.

Note

如果有一个常规用途存储帐户,在其中存储了页 Blob、虚拟机磁盘、队列、文件、表以及块 Blob 数据和追加 Blob 数据,则不适合使用此估算过程。If you have a general-purpose storage account in which you have stored page blobs and virtual machine disks, or queues, files, or tables, alongside block and append blob data, this estimation process is not applicable. 容量数据不区分块 Blob 与其他类型,因此不会给出其他数据类型的容量数据。The capacity data does not differentiate block blobs from other types, and does not give capacity data for other data types. 如果使用这些类型,则也可查看最新账单上的数量,作为一种替代方法。If you use these types, an alternative methodology is to look at the quantities on your most recent bill.

若要对数据使用和访问模式进行准确的估算,建议为指标选择一个可代表日常使用情况的保留期,并进行推断。To get a good approximation of your data consumption and access pattern, we recommend you choose a retention period for the metrics that is representative of your regular usage and extrapolate. 一种选择是让指标数据保留七天,每周收集一次数据,并在月底进行分析。One option is to retain the metrics data for seven days and collect the data every week, for analysis at the end of the month. 另一种选择是让指标数据保留 30 天,在 30 天到期以后再收集和分析数据。Another option is to retain the metrics data for the last 30 days and collect and analyze the data at the end of the 30-day period.

如需详细了解如何启用、收集和查看指标数据,请参阅存储分析指标For details on enabling, collecting, and viewing metrics data, see Storage analytics metrics.

Note

存储、访问和下载分析数据也会收费,就像使用常规用户数据一样。Storing, accessing, and downloading analytics data is also charged just like regular user data.

通过使用情况度量值来估算费用Utilizing usage metrics to estimate costs

容量费用Capacity costs

容量度量值表 $MetricsCapacityBlob 中行键为 'data' 的最新条目显示了用户数据所占用的存储容量。The latest entry in the capacity metrics table $MetricsCapacityBlob with the row key 'data' shows the storage capacity consumed by user data. 容量指标表 $MetricsCapacityBlob 中行键为 'analytics' 的最新条目显示了分析日志所占用的存储容量。The latest entry in the capacity metrics table $MetricsCapacityBlob with the row key 'analytics' shows the storage capacity consumed by the analytics logs.

用户数据和分析日志(如果已启用)所占用的这个总容量就可以用来估算在存储帐户中存储数据的费用。This total capacity consumed by both user data and analytics logs (if enabled) can then be used to estimate the cost of storing data in the storage account. 也可以使用相同方法来估算 GPv1 存储帐户中的存储成本。The same method can also be used for estimating storage costs in GPv1 storage accounts.

事务成本Transaction costs

事务度量值表中某个 API 的所有条目的 'TotalBillableRequests' 计得之和表示该特定 API 的事务总数。The sum of 'TotalBillableRequests', across all entries for an API in the transaction metrics table indicates the total number of transactions for that particular API. 例如 ,通过对行健为 'user;GetBlob' 的所有条目的计费请求进行求和可以算出一段给定时间中 'GetBlob' 事务的总数。For example, the total number of 'GetBlob' transactions in a given period can be calculated by the sum of total billable requests for all entries with the row key 'user;GetBlob'.

若要估算 Blob 存储帐户的事务费用,需将事务细分成三组,因为这些事务价格不一样。In order to estimate transaction costs for Blob storage accounts, you need to break down the transactions into three groups since they are priced differently.

  • 写入事务,例如 'PutBlob''PutBlock''PutBlockList''AppendBlock''ListBlobs''ListContainers''CreateContainer''SnapshotBlob''CopyBlob'Write transactions such as 'PutBlob', 'PutBlock', 'PutBlockList', 'AppendBlock', 'ListBlobs', 'ListContainers', 'CreateContainer', 'SnapshotBlob', and 'CopyBlob'.
  • 删除事务,例如 'DeleteBlob''DeleteContainer'Delete transactions such as 'DeleteBlob' and 'DeleteContainer'.
  • 所有其他事务。All other transactions.

若要估算 GPv1 存储帐户的事务成本,需聚合所有事务而不考虑操作/API。In order to estimate transaction costs for GPv1 storage accounts, you need to aggregate all transactions irrespective of the operation/API.

数据访问和异地复制数据传输费用Data access and geo-replication data transfer costs

虽然存储分析不提供从存储帐户读取以及写入到存储帐户的数据量,但该数据量可以通过查看事务度量值表来大致进行估算。While storage analytics does not provide the amount of data read from and written to a storage account, it can be roughly estimated by looking at the transaction metrics table. 事务度量值表中某个 API 的所有条目的 'TotalIngress' 计得之和表示该特定 API 的传入数据的总量。The sum of 'TotalIngress' across all entries for an API in the transaction metrics table indicates the total amount of ingress data in bytes for that particular API. 与此类似, 'TotalEgress' 计得之和表示传出数据的总量,以字节为单位。Similarly the sum of 'TotalEgress' indicates the total amount of egress data, in bytes.

若要估算 Blob 存储帐户的数据访问费用,需将事务细分成两组。In order to estimate the data access costs for Blob storage accounts, you need to break down the transactions into two groups.

  • 从存储帐户检索的数据量可以通过查看主要为 'GetBlob''CopyBlob' 操作的 'TotalEgress' 计得之和来估算。The amount of data retrieved from the storage account can be estimated by looking at the sum of 'TotalEgress' for primarily the 'GetBlob' and 'CopyBlob' operations.

  • 写入到存储帐户的数据量可以通过查看主要为 'PutBlob''PutBlock''CopyBlob''AppendBlock' 操作的 'TotalIngress' 计算之和来估算。The amount of data written to the storage account can be estimated by looking at the sum of 'TotalIngress' for primarily the 'PutBlob', 'PutBlock', 'CopyBlob' and 'AppendBlock' operations.

在使用 GRS 或 RA-GRS 存储帐户时,也可以通过所写入数据量的估算值来计算 Blob 存储帐户的异地复制数据传输费用。The cost of geo-replication data transfer for Blob storage accounts can also be calculated by using the estimate for the amount of data written when using a GRS or RA-GRS storage account.

Note

有关计算使用热或冷存储访问层的成本的更详细示例,请查看 Azure 存储定价页For a more detailed example about calculating the costs for using the hot or cool storage access tier, take a look at the Azure Storage Pricing Page.

后续步骤Next steps