跳过导航链接 | |
退出打印视图 | |
![]() |
Oracle Solaris 11.1 管理:设备和文件系统 Oracle Solaris 11.1 Information Library (简体中文) |
使用 cfgadm 命令执行 PCI 或 PCIe 热插拔(任务列表)
重新配置协调管理器 (Reconfiguration Coordination Manager, RCM) 脚本概述
12. 配置和管理 Oracle Solaris Internet 存储名称服务 (Internet Storage Name Service, iSNS)
本节介绍可使用 cfgadm 命令执行的各种 SCSI 热插拔过程。
注 - 一般情况下,SCSI 框架支持 SCSI 设备的热插拔。但是,您应该参考硬件文档,以确认 SCSI 设备是否支持热插拔。
这些过程以特定设备为例,说明如何使用 cfgadm 命令来热插拔 SCSI 组件。您提供的以及 cfgadm 命令显示的设备信息取决于系统配置。
本节介绍的所有过程需要管理特权,一般不授予用户帐户。有关更多信息,请参见《Oracle Solaris 11.1 管理:安全服务》中的"如何使用指定给您的管理权限"。
以下过程在使用 cfgadm 命令显示设备类型配置信息的示例中使用 SCSI 控制器 c2 和 c3 以及与其连接的设备。
注 - 如果 cfgadm 命令不支持 SCSI 设备,则该设备不会显示在 cfgadm 命令输出中。
# cfgadm -l Ap_Id Type Receptacle Occupant Condition c2 scsi-bus connected configured unknown c3 scsi-sas connected configured unknown
本示例中,c2 和 c3 代表两个 SCSI 控制器。
# cfgadm -al Ap_Id Type Receptacle Occupant Condition c2 scsi-bus connected configured unknown c2::dsk/c2t0d0 CD-ROM connected configured unknown c3 scsi-sas connected configured unknown c3::dsk/c3t0d0 disk connected configured unknown c3::dsk/c3t1d0 disk connected configured unknown c3::dsk/c3t2d0 disk connected configured unknown c3::dsk/c3t3d0 disk connected configured unknown
注 - cfgadm -l 命令显示有关 SCSI HBA 而不是 SCSI 设备的信息。使用 cfgadm -al 命令可显示有关 SCSI 设备(如磁盘和磁带)的信息。
以下过程在取消配置 SCSI 控制器的示例中使用 SCSI 控制器 c2。
# cfgadm -c unconfigure c2
# cfgadm -al Ap_Id Type Receptacle Occupant Condition c2 scsi-bus connected unconfigured unknown c2::dsk/c2t0d0 unavailable connected uncconfigured unknown c3 scsi-sas connected configured unknown c3::dsk/c3t0d0 disk connected configured unknown c3::dsk/c3t1d0 disk connected configured unknown c3::dsk/c3t2d0 disk connected configured unknown c3::dsk/c3t3d0 disk connected configured unknown
请注意,c2 的 Occupant 列指定为 unconfigured,表明 SCSI 总线没有已配置的插卡。
如果取消配置操作失败,请参见如何解决失败的 SCSI 取消配置操作。
以下过程在配置 SCSI 控制器的示例中使用 SCSI 控制器 c2。
# cfgadm -c configure c2
# cfgadm -al Ap_Id Type Receptacle Occupant Condition c2 scsi-bus connected configured unknown c2::dsk/c2t0d0 unavailable connected unconfigured unknown c3 scsi-sas connected configured unknown c3::dsk/c3t0d0 disk connected configured unknown c3::dsk/c3t1d0 disk connected configured unknown c3::dsk/c3t2d0 disk connected configured unknown c3::dsk/c3t3d0 disk connected configured unknown
前面的取消配置过程移除了 SCSI 总线上的所有设备。现在,所有设备都已配置回系统中。
以下过程在配置 SCSI 设备的示例中使用 SCSI 磁盘 c2t0d0。
# cfgadm -al Ap_Id Type Receptacle Occupant Condition c2 scsi-bus connected configured unknown c2::dsk/c2t0d0 unavailable connected unconfigured unknown c3 scsi-sas connected configured unknown c3::dsk/c3t0d0 disk connected configured unknown c3::dsk/c3t1d0 disk connected configured unknown c3::dsk/c3t2d0 disk connected configured unknown c3::dsk/c3t3d0 disk connected configured unknown
# cfgadm -c configure c2::dsk/c2t0d0
# cfgadm -al Ap_Id Type Receptacle Occupant Condition c2 scsi-bus connected configured unknown c2::dsk/c2t0d0 CD-ROM connected configured unknown c3 scsi-sas connected configured unknown c3::dsk/c3t0d0 disk connected configured unknown c3::dsk/c3t1d0 disk connected configured unknown c3::dsk/c3t2d0 disk connected configured unknown c3::dsk/c3t3d0 disk connected configured unknown
以下过程在断开 SCSI 设备连接的示例中使用 SCSI 控制器 c2。
# cfgadm -al Ap_Id Type Receptacle Occupant Condition c2 scsi-bus connected configured unknown c2::dsk/c2t0d0 CD-ROM connected configured unknown c3 scsi-sas connected configured unknown c3::dsk/c3t0d0 disk connected configured unknown c3::dsk/c3t1d0 disk connected configured unknown c3::dsk/c3t2d0 disk connected configured unknown c3::dsk/c3t3d0 disk connected configured unknown
# cfgadm -c disconnect c2 WARNING: Disconnecting critical partitions may cause system hang. Continue (yes/no)? y
![]() | 注意 - 此命令可以暂停 SCSI 总线上的所有 I/O 活动,直到使用 cfgadm -c connect 命令为止。cfgadm 命令可执行一些基本检查,以防止断开关键分区的连接,但不能检测到所有情况。如果此命令使用不当,则可能会导致系统挂起并且可能需要重新引导系统。 |
# cfgadm -al Ap_Id Type Receptacle Occupant Condition c2 unavailable disconnected configured unknown c2::dsk/c2t0d0 unavailable disconnected configured unknown c3 scsi-sas connected configured unknown c3::dsk/c3t0d0 disk connected configured unknown c3::dsk/c3t1d0 disk connected configured unknown c3::dsk/c3t2d0 disk connected configured unknown c3::dsk/c3t3d0 disk connected configured unknown
控制器及其连接的所有设备都将与系统断开连接。
以下过程在连接 SCSI 控制器的示例中使用 SCSI 控制器 c2。
# cfgadm -al Ap_Id Type Receptacle Occupant Condition c2 unavailable disconnected configured unknown c2::dsk/c2t0d0 unavailable disconnected configured unknown c3 scsi-sas connected configured unknown c3::dsk/c3t0d0 disk connected configured unknown c3::dsk/c3t1d0 disk connected configured unknown c3::dsk/c3t2d0 disk connected configured unknown c3::dsk/c3t3d0 disk connected configured unknown
# cfgadm -c connect c2
# cfgadm -al Ap_Id Type Receptacle Occupant Condition c2 scsi-bus connected configured unknown c2::dsk/c2t0d0 CD-ROM connected configured unknown c3 scsi-sas connected configured unknown c3::dsk/c3t0d0 disk connected configured unknown c3::dsk/c3t1d0 disk connected configured unknown c3::dsk/c3t2d0 disk connected configured unknown c3::dsk/c3t3d0 disk connected configured unknown
在如何将 SCSI 设备添加到 SCSI 总线的示例中使用的 SCSI 控制器是 c3。
注 - 添加设备时,应指定与设备连接的 SCSI HBA(控制器)的 Ap_Id,而不是设备本身的 Ap_Id。
# cfgadm -al Ap_Id Type Receptacle Occupant Condition c2 scsi-bus connected configured unknown c2::dsk/c2t0d0 CD-ROM connected configured unknown c3 scsi-sas connected configured unknown c3::dsk/c3t0d0 disk connected configured unknown c3::dsk/c3t1d0 disk connected configured unknown c3::dsk/c3t2d0 disk connected configured unknown
例如:
# cfgadm -x insert_device c3 Adding device to SCSI HBA: /devices/pci@7c0/pci@0/pci@1/pci@0,2/LSILogic,sas@2 This operation will suspend activity on SCSI bus: c3
Continue (yes/no)? y SCSI bus quiesced successfully. It is now safe to proceed with hotplug operation.
正在执行热插拔操作的同时,SCSI 总线上的 I/O 活动会暂停。
Enter y if operation is complete or n to abort (yes/no)? y
# cfgadm -al Ap_Id Type Receptacle Occupant Condition c2 scsi-bus connected configured unknown c2::dsk/c2t0d0 CD-ROM connected configured unknown c3 scsi-sas connected configured unknown c3::dsk/c3t0d0 disk connected configured unknown c3::dsk/c3t1d0 disk connected configured unknown c3::dsk/c3t2d0 disk connected configured unknown c3::dsk/c3t3d0 disk connected configured unknown
新磁盘已添加到控制器 c3 中。
以下过程在更换 SCSI 控制器上相同设备的示例中使用 SCSI 磁盘 c3t3d0。
尝试在 SCSI 控制器上更换相同设备时,请注意以下情况:
如果要更换属于 ZFS 根池的镜像或非镜像引导设备,请参见以下参考资料:
如果设备由传统卷管理软件控制,请参考相应的卷管理文档以了解更换设备的具体步骤。如果您享有有效的 Oracle 支持计划,请参见以下参考资料:
如果使用 Solaris Volume Manager (SVM),请参见 MOS (My Oracle Support, MOS) 文档 1010753.1。
如果使用 Veritas Volume Manager (VxVM),请参见 MOS (My Oracle Support, MOS) 文档 1003122.1、1011782.1 和 1002285.1。
# cfgadm -al c2 scsi-bus connected configured unknown c2::dsk/c2t0d0 CD-ROM connected configured unknown c3 scsi-sas connected configured unknown c3::dsk/c3t0d0 disk connected configured unknown c3::dsk/c3t1d0 disk connected configured unknown c3::dsk/c3t2d0 disk connected configured unknown c3::dsk/c3t3d0 disk connected configured unknown
例如:
# cfgadm -x replace_device c3::dsk/c3t3d0 Replacing SCSI device: /devices/pci@7c0/pci@0/pci@1/pci@0,2/LSILogic,sas@2/sd@3,0 This operation will suspend activity on SCSI bus: c3
正在执行热插拔操作的同时,SCSI 总线上的 I/O 活动会暂停。
Continue (yes/no)? y SCSI bus quiesced successfully. It is now safe to proceed with hotplug operation.
更换设备应该与要移除的设备类型相同并且具有同一地址(目标和 LUN)。
Enter y if operation is complete or n to abort (yes/no)? y
# cfgadm -al Ap_Id Type Receptacle Occupant Condition c2 scsi-bus connected configured unknown c2::dsk/c2t0d0 CD-ROM connected configured unknown c3 scsi-sas connected configured unknown c3::dsk/c3t0d0 disk connected configured unknown c3::dsk/c3t1d0 disk connected configured unknown c3::dsk/c3t2d0 disk connected configured unknown c3::dsk/c3t3d0 disk connected configured unknown
以下过程在移除 SCSI 控制器上设备的示例中使用 SCSI 磁盘 c3t3d0。
# cfgadm -al Ap_Id Type Receptacle Occupant Condition c2 scsi-bus connected configured unknown c2::dsk/c2t0d0 CD-ROM connected configured unknown c3 scsi-sas connected configured unknown c3::dsk/c3t0d0 disk connected configured unknown c3::dsk/c3t1d0 disk connected configured unknown c3::dsk/c3t2d0 disk connected configured unknown c3::dsk/c3t3d0 disk connected configured unknown
例如:
# cfgadm -x remove_device c3::dsk/c3t3d0 Removing SCSI device: /devices/pci@7c0/pci@0/pci@1/pci@0,2/LSILogic,sas@2/sd@3,0 This operation will suspend activity on SCSI bus: c3
Continue (yes/no)? y SCSI bus quiesced successfully. It is now safe to proceed with hotplug operation.
正在执行热插拔操作的同时,SCSI 总线上的 I/O 活动会暂停。
Enter y if operation is complete or n to abort (yes/no)? y
注 - 如果是从 SCSI RAID 阵列中移除 SCSI RAID 设备,那么必须执行此步骤。
# cfgadm -al Ap_Id Type Receptacle Occupant Condition c2 scsi-bus connected configured unknown c2::dsk/c2t0d0 CD-ROM connected configured unknown c3 scsi-sas connected configured unknown c3::dsk/c3t0d0 disk connected configured unknown c3::dsk/c3t1d0 disk connected configured unknown c3::dsk/c3t2d0 disk connected configured unknown
本节提供有关 SCSI 配置问题的错误消息和可能的解决方法。有关对 SCSI 配置问题进行故障排除的更多信息,请参见 cfgadm(1M)。
cfgadm: Component system is busy, try again: failed to offline: device-path Resource Information ------------------ -------------------------- /dev/dsk/c1t0d0s0 mounted filesystem "/file-system"
尝试移除或更换已挂载文件系统的设备。
取消挂载错误消息中列出的文件系统,并重试 cfgadm 操作。
cfgadm: Component system is busy, try again: failed to offline: device-path Resource Information ------------------ -------------------------- /dev/dsk/device-name swap area
如果使用 cfgadm 命令移除系统资源(如交换设备或专用转储设备),则在系统资源仍然处于活动状态时将显示一条类似的错误消息。
取消配置指定设备上的交换区域,并重试 cfgadm 操作。
cfgadm: Component system is busy, try again: failed to offline: device-path Resource Information ------------------ -------------------------- /dev/dsk/device-name dump device (swap)
尝试移除或更换在交换区域中配置的转储设备。
取消配置在交换区域中配置的转储设备,并重试 cfgadm 操作。
cfgadm: Component system is busy, try again: failed to offline: device-path Resource Information ------------------ -------------------------- /dev/dsk/device-name dump device (dedicated)
尝试移除或更换专用转储设备。
取消配置该专用转储设备,并重试 cfgadm 操作。
如果一个或多个目标设备繁忙并且 SCSI 取消配置操作失败,请使用此过程。否则,将来对此控制器和目标设备进行动态重新配置操作会失败,并会显示 dr in progress 消息。