Go to main content

Oracle® ZFS Storage Appliance 管理指南,发行版 OS8.8.0

退出打印视图

更新时间: 2018 年 11 月
 
 

创建加密项目 (CLI)

共享资源(文件系统和 LUN)可以单独加密,也可在项目级别加密(因为共享资源会继承项目属性)。以下示例展示了如何通过加密项目本身来加密项目中的所有共享资源。

开始之前

要使用加密,必须先配置加密;请参见数据加密

  1. 要创建加密的项目,请使用以下 CLI 命令:
    hostname:shares> project myproject
    hostname:shares myproject (uncommitted)> set encryption=aes-128-ccm
                        encryption = aes-128-ccm (uncommitted)
    hostname:shares myproject (uncommitted)> set keystore=LOCAL
                          keystore = LOCAL (uncommitted)
    hostname:shares myproject (uncommitted)> set keyname=MyFirstKey
                           keyname = MyFirstKey (uncommitted)
    hostname:shares myproject (uncommitted)> commit
    hostname:shares> 

    在此项目下创建的所有共享资源将使用 LOCAL(本地)密钥库中名为 "MyFirstKey" 的密钥,自动以 AES-128 CCM 方式加密。

  2. 要在新项目中创建文件系统并显示其继承了加密属性,请使用以下 CLI 命令:
    hostname:shares> select myproject
    hostname:shares myproject> filesystem f1
    hostname:shares myproject/f1 (uncommitted)> commit
    hostname:shares myproject> select f1
    hostname:shares myproject/f1> get encryption keystore keyname keystatus
                        encryption = aes-128-ccm (inherited)
                          keystore = LOCAL (inherited)
                           keyname = MyFirstKey (inherited)
                         keystatus = available
    hostname:shares myproject/f1> done

相关主题