suri - storage URIs
存储 URI 用于唯一标识不同节点间的存储对象。
除了可以引用单个分片的 dev URI 之外,所有其他 URI 类型始终表示整个磁盘。此类磁盘表示为不带分片的设备路径,例如,/dev/dsk/c0t0d0 或 /dev/dsk/c0t5000c5000288fa25d0。Such a device path without a slice may not exist for all disks on the system and the consumer of storage URIs must be prepared for that.请注意,zpool(8) 始终接受现有块设备的 cXtXdX 设备路径,甚至接受不存在的 /dev/dsk/cXtXdX 链接。
所有存储 URI 类型均不支持创建存储对象。有关各种类型的描述,请参见下文。对于支持创建存储对象的 URI 类型,请将 suriadm create 子命令与 –p create-size 选项一起使用。也可以手动创建存储对象。它不支持在映射过程中创建存储对象。
支持以下存储 URI。
dev:<local-path-under-/dev> dev://<absolute-path-to-device> dev:<absolute-path-to-device>
Examples:
dev:dsk/c0t0d0s0 dev:///dev/dsk/c0t0d0s0 dev:/dev/dsk/c0t0d0s0 dev:chassis/SYS/HD1/disk
The device URI specifies an object in the form of an existing device.dev URI 的所有形式在功能上都是等同的。The dev:dsk format with no authority section and an implied /dev/ path prefix is usually preferred.The path must always identify a device within the /dev name space.
Components of the device path may only include characters from the POSIX.1-2008 Portable Filename Character Set, 0-9a-zA-Z._-.
The dev URI type does not support the create operation.
lu:luname.naa.<ID> lu:luname.eui.<ID> lu:initiator.naa.<ID>,target.naa.<ID>,luname.naa.<ID> lu:initiator.naa.<ID>,target.naa.<ID>,luname.eui.<ID>
Examples:
lu:luname.naa.5000c5000288fa25 lu:luname.eui.0021280001cf80f6 lu:initiator.naa.2100001d38089fb0,target.naa.2100001d38089fb0,luname.naa.5000c5000288fa25 lu:initiator.naa.2100001d38089fb0,target.naa.2100001d38089fb0,luname.eui.0021280001cf80f6
Logical unit URI specifies a logical unit attached via Fibre Channel or serial-attached SCSI.在仅具有 luname 的 URI 格式中,ID 用于描述逻辑单元名称。在 initiator,target,luname 格式中,initiator 用于指定启动器端口,target 用于指定目标端口,这两者共同指定逻辑单元的路径,该逻辑单元的名称必须与该 URI 在仅具有 luname 的格式中的 luname 部分匹配。
ID 采用 SCSI-3 VPD 页面 (0x83) 逻辑单元名称来表示,该名称的格式为十六进制数字(64/128 位)。ID 不区分大小写。仅支持基于 NAA 或 EUI-64 标识符的逻辑单元名称。有关标识符格式的信息,请参见“附注”部分。
通常,建议将仅具有 luname 的 URI 与多路径结合使用。如果采用仅具有 luname 的 URI 而禁用了多路径,则会为指定的逻辑单元选择一个随机路径。要避免分配此随机路径,可以使用 initiator, target, luname URI 格式为逻辑单元选择一个特定路径。如果采用 initiator, target, luname URI 格式并启用了多路径,则多路径框架可控制用于访问该逻辑单元的路径,而该 URI 仅用于标识该单元,而不是访问路径。
如果启动器和/或目标 ID 不匹配,但根据逻辑单元名称找到该逻辑单元,则会通过备用路径访问该单元。
The lu URI type does not support the create operation.
iscsi:///luname.naa.<ID> iscsi:///luname.eui.<ID> iscsi://<host>[:<port>]/luname.naa.<ID> iscsi://<host>[:<port>]/luname.eui.<ID> iscsi:///target.<IQN>,lun.<LUN> iscsi:///target.eui.<ID>,lun.<LUN> iscsi://<host>[:<port>]/target.<IQN>,lun.<LUN> iscsi://<host>[:<port>]/target.eui.<ID>,lun.<LUN>
IQN stands for iSCSI Qualified Name, which has the form iqn.YYYY-MM.<org-naming-auth>[:<string-defined-by-org>].RFC 3721 文档《Internet Small Computer Systems Interface (iSCSI) Naming and Discovery》中定义了 IQN 格式并通过示例对其进行了详细阐述。It is recommended that <string-defined-by-org> be a Universally Unique Identifier (UUID).
The use of the target,lun form of the iSCSI URI will only be transferable between hosts if the mapping from the initiator, target, and LUN to the logical unit name is configured to be independent of the initiator.
Examples:
iscsi:///luname.eui.0021280001cf80f6 iscsi:///luname.naa.600144f03d70c80000004ea57da10001 iscsi://[::1]/luname.naa.600144f03d70c80000004ea57da10001 iscsi://127.0.0.1/luname.naa.600144f03d70c80000004ea57da10001 iscsi://127.0.0.1:3260/luname.naa.600144f03d70c80000004ea57da10001 iscsi://hostname:3260/luname.eui.0021280001cf80f6 iscsi://hostname:3260/luname.naa.600144f03d70c80000004ea57da10001 iscsi://127.0.0.1/target.iqn.com.sun:02:d0f2d311-f703,lun.0 iscsi://127.0.0.1/target.eui.bbbbbbbbbbff0011,lun.0 iscsi://127.0.0.1:3260/target.iqn.com.sun:02:d0f2d311-f703,lun.3 iscsi://127.0.0.1:3260/target.eui.bbbbbbbbbbff0011,lun.3 iscsi:///target.iqn.com.sun:02:d0f2d311-f703,lun.6 iscsi:///target.eui.bbbbbbbbbbff0011,lun.6 iscsi://[::1]/target.iqn.com.sun:02:d0f2d311-f703,lun.2 iscsi://[::1]/target.eui.bbbbbbbbbbff0011,lun.2 iscsi://hostname:3260/target.iqn.com.sun:4db41b76-e3d7-cd2f-bf2d-9abef784d76c,lun.0 iscsi://hostname:3260/target.eui.bbbbbbbbbbff0011,lun.0
iSCSI URI 可根据可通过 iSCSI 协议访问的逻辑单元编号指定对象。Optional hostname[:<port>] authority section provides information for a consumer to set up a send-targets discovery address.IPv6 地址必须括在方括号中。
ID 的格式在“逻辑单元 URI”部分进行了说明。有关基于 NAA 和 EUI-64 的标识符格式的信息,请参见“附注”部分。
The iscsi URI type does not support the create operation.
nfs://<user>:<group>@<host>[:<port>]/<nfs-share-path>/<file>
Examples:
nfs://admin:staff@host/export/test/nfs_file nfs://admin:staff@host:1000/export/test/nfs_file
The NFS URI specifies an object based on a labeled lofi device created on the given NFS file.将使用基于用户和组派生的凭证来访问 NFS 文件。可以通过 username 或 userid 指定用户和组。可以将主机指定为 IPv4 地址、IPv6 地址或主机名。IPv6 地址必须括在方括号中。
Components of the NFS share path may only include characters from the POSIX.1-2008 Portable Filename Character Set, 0-9a-zA-Z._-.
The nfs URI type supports the create operation.
file://<user>:<group>@<host>/<file-path>
Examples:
file://admin:staff@/filepath file://admin:staff@localhost/filepath
The file URI specifies an object based on a labeled lofi device created on the given local file.将使用基于用户和组派生的凭证来访问该文件。可以通过 username 或 userid 指定用户和组。不需要指定主机,但如果指定,必须指定为 localhost。
Components of the file path may only include characters from the POSIX.1-2008 Portable Filename Character Set, 0-9a-zA-Z._-.
The file URI type supports the create operation, and may also be mapped to a removable/read-only device.
要通过手动生成 URI 来避免错误,建议使用 suriadm(8) 子命令 lookup-uri 根据现有系统设备路径、逻辑单元名称或其他信息来生成 URI。有关更多信息,请参见 suriadm(8) 手册页。此类信息是通过其他方式提前标识的。对于光纤通道设备,可以使用 fcadm(8)。对于串行连接 SCSI 设备,可以使用 sasinfo(8)。对于 iSCSI 设备,可以使用 iscsiadm(8)。
有关下列属性的说明,请参见 attributes(7):
|
attributes(7), fcadm(8), iscsiadm(8), lofi(4D), sasinfo(8), suriadm(8)、 zpool(8)
《Small Computer System Interface-3》(SCSI-3)
RFC 3986-统一资源标识符 (Uniform Resource Identifier, URI):一般语法
NAA 代表 Name Address Authority(名称地址授权机构),它是标识符中的一个字段,用于指定该标识符的格式和长度。NAA 标识符格式在《SCSI Primary Commands - 3》规范的 "7.6.3.6 NAA identifier format" 部分进行了定义。WWN(World Wide Name,全局名称)标识符采用 NAA 标识符格式。EUI-64 代表 64 位扩展唯一标识符,其格式由 IEEE 进行了定义。