Go to main content

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

退出打印视图

更新时间: 2018 年 11 月
 
 

在项目中创建文件系统或 LUN (CLI)

在项目中创建的文件系统或 LUN 会继承项目的属性。有关可以继承的标准属性的列表,请参见继承的属性。如果项目已加密,则在项目中创建的的文件系统或 LUN 也已加密。

如果要向某个非默认项目添加文件系统或 LUN,必须已经存在该项目。要创建新项目,请参见创建项目 (CLI)

  1. 转至 shares
    hostname:> shares
  2. 输入 select 和项目名称。在此示例中,选择 default 项目。
    hostname:shares > select default
  3. 输入 filesystem 和文件系统名称,或 lun 和 LUN 名称。

    名称必须包含 1 到 64 个字符,但是不能包含空格或以句点开头。允许的字符为:字母数字和特殊字符 _ - . :

    以下示例在 default 项目中创建了一个名为 fs-1 的文件系统。

    hostname:shares default> filesystem fs-1
    hostname:shares default/fs-1 (uncommitted)> 
  4. 如果创建 LUN,请输入 set volsize= 和卷大小。
    hostname:shares default/lun1 (uncommitted)> set volsize=2G
                           volsize = 2G (uncommitted)

  5. 输入 commit
    hostname:shares default/fs-1 (uncommitted)> commit
  6. 输入 select 和文件系统或 LUN 名称。
    hostname:shares default> select fs-1
  7. 使用 get 命令列出共享资源的属性:

    将显示类似于以下示例的共享资源属性。

    hostname:shares default/fs-1> get
                            aclinherit = restricted (inherited)
                               aclmode = discard (inherited)
                                 atime = true (inherited)
                       casesensitivity = mixed
                              checksum = fletcher4 (inherited)
                           compression = off (inherited)
                                 dedup = false (inherited)
                         compressratio = 100
                                copies = 1 (inherited)
                              creation = Wed Apr 29 2018 17:57:18 GMT+0000(UTC)
                               logbias = latency (inherited)
                            mountpoint = /export/fs-1 (inherited)
                         normalization = none
                                 quota = 0
                            quota_snap = true
                              readonly = false (inherited)
                            recordsize = 128K (inherited)
                           reservation = 0
                      reservation_snap = true
                              rstchown = true(inherited)
                        secondarycache = all (inherited)
                                shadow = none
                                nbmand = false (inherited)
                              sharesmb = off (inherited)
                              sharenfs = on (inherited)
                               snapdir = hidden (inherited)
                              utf8only = false
                                 vscan = false (inherited)
                            encryption = off (inherited)
                             snaplabel =
                              sharedav = off (inherited)
                              shareftp = off (inherited)
                             sharesftp = off (inherited)
                             sharetftp = off (inherited)
                                  pool = pool_demo
                        canonical_name = pool_demo/local/default/fs-1
                              exported = true (inherited)
                             nodestroy = false
                          maxblocksize = 1M (inherited)
                          lz4supported =  (inherited)
                            space_data = 31K
                      space_unused_res = 0
                       space_snapshots = 0
                       space_available = 29.4T
                           space_total = 31K
                              root_acl = owner@:rwxpDaARWcCo:allow,group@:aRc:allow,everyone@:aRc:allow
                            root_group = other
                      root_permissions = 700
                             root_user = nobody
                                origin = 
                           smbshareacl = 
  8. 要修改文件系统或 LUN 属性,请使用 set 命令。有关属性的介绍,请参见项目和共享资源属性

    例如,要对名为 fs-1 的文件系统禁用 NFS 协议,请输入:

    hostname:shares default/fs-1> set sharenfs=off
                          sharenfs = off (uncommitted)
  9. 输入 commit
    hostname:shares default/fs-1> commit
    hostname:shares default/fs-1>

相关主题