Go to main content

Oracle® Solaris I/O Multipathing and Storage Device Administration Cheatsheet

Exit Print View

Updated: August 2018

Oracle® Solaris I/O Multipathing and Storage Device Administration Cheatsheet

This cheatsheet covers commonly used storage administration and I/O multipathing commands.

Commonly Used Storage Device and I/O Multipathing Administration Commands

For more information about the commands in the following tables, see the cfgadm(8), mpathadm(8), dladm(8), and iscsiadm(8) man pages.

Table 1  Device Administration Commands
Action on a Device
Display all the current configurable hardware information, including those represented by dynamic attachment points.
# cfgadm -al
Display the list of IB communication services currently used by the InfiniBand Transport Framework (IBTF).
# cfgadm -x list_services ib
Identify the faulty device.
# fmadm faulty
Add a SCSI device to a SCSI bus on SPARC.
# cfgadm -x insert_device controller
Remove a SCSI device on SPARC.
# cfgadm -x remove_device device
Display specific PCI slot configuration information.
# cfgadm -s "cols=ap_id:type:info" pci
Display specific PCIe slot configuration information.
# cfgadm -s "cols=ap_id:busy:o_state" pci
Configure an IB port devices.
# cfgadm -c configure IB-port-Ap-Id

# cfgadm -a IB-port-Ap-Id
Create an IB partition link.
# dladm create-part -l link -P key partition
Display an IB partition link information.
# dladm show-part
Plumb and assign an IP address to an IB partition link.
# ipadm create-ip name
# ipadm create-addr -a address [address-object]
Remove an IB partition link.
# dladm delete-part partition
Create an EoIB (Ethernet over InfiniBand) datalink.
# dladm create-eoib -l link -g gway -c gway-port eoib-link
Display the EoIB datalink information.
# dladm show-link [eoib-link]
Remove an EoIB datalink.
# dladm delete-eoib link
Display the use of disk space on ZFS file systems.
# zpool list root-pool
Display disk label information.
# prtvtoc path/device-name
List the files that have not been accessed for a specified number of days to an output file.
# find directory -type f[-atime +nnn] [-mtime +nnn] \ 
  -print > output-file &
Back up and restore a COMSTAR configuration.
# svccfg export -a stmf > COMSTAR.backup

# svccfg import COMSTAR.backup
Enable iSNS discovery for the target device.
Restrict logical unit access to selected systems.
Make the LU accessible by the system.
Add the client to the discovery domain.
# isnsadm add-node -d domain-name iSCSI-name
Display tape drive status.
# mt -f /dev/rmt/drive-number status
Create file systems on USB storage devices.
# mkfs -F  FS-type -o FS-type-specific-options raw-device-file
Table 2  Fibre Channel Administration Commands
Fibre Channel Action
Display information of the host bus adapter (HBA) ports and their statistics.
# fcinfo hba-port -l
Display all the remote ports on all the HBAs.
# fcinfo remote-port
Display all the remote ports on a physical port and their link statistics.
# fcinfo remote-port -ls -p PWWN
Display the status of LUNs of the Fibre Channel devices.
# cfgadm -al -o show_SCSI_LUN
Remove an unusable LUN from the host configuration.
# cfgadm -c unconfigure -o unusable_SCSI_LUN Ap-Id
Remove a Fibre Channel target port.
# cfgadm -c unconfigure Ap-Id
Create a virtual Fibre Channel port (NPIV).
# fcadm create-npiv-port -p virtual-port-WWN \
  -n virtual-node-WWN physical-port-PWWN
Delete an NPIV port.
# fcadm delete-npiv-port -p virtual-port-WWN \ 
  -n virtual-node-WWN physical-port-PWWN
Create a Fibre Channel over Ethernet (FCoE) target port on a specified network interface.
# fcadm create-fcoe-port -i -p port-WWN \ 
  -n node-WWN Ethernet-interface
Delete FCoE target ports.
# fcadm delete-fcoe-port network-interface
Table 3  iSCSI Device Administration Commands
iSCSI Device Action
Create an iSCSI target.
Configure the iSNS (Internet Storage Name Service) target discovery method.
initiator# svcs network/iscsi/initiator
initiator# iscsiadm add isns-server iSNS-IP-address

initiator# iscsiadm list isns-server
initiator# iscsiadm modify discovery --iSNS enable
Configure an iSCSI initiator with static configuration.
initiator# iscsiadm add static-config target-name,\
Remove an iSCSI iSNS discovery entry.
initiator# iscsiadm remove isns-server iSNS-IP-address:3205
Display the current parameter values of a specific iSCSI initiator.
initiator# iscsiadm list initiator-node
Display current parameter values of a specific iSCSI target.
initiator# iscsiadm list target-param target-name
Display information about which discovery method is used.
initiator# iscsiadm list discovery
Table 4  Oracle Solaris I/O Multipathing Administration Commands
Oracle Solaris I/O Multipathing Action
Display all the logical units (LU) on a SAN.
# mpathadm list lu
Create a logical unit.
Display the created logical unit.
Enable the LU to be accessible by all systems.
Verify the LU configuration.
Display all the LUs associated with a specific target.
# mpathadm list lu -t target-port-name
Display all the initiator ports in the system.
# mpathadm list initiator-port
Display the properties of a specific initiator port.
# mpathadm show initiator-port initiator-port-name
Identify the multipathing support on your system.
# mpathadm list mpath-support
Disable a specific LU path.
# mpathadm disable path -i initiator-port-name -t \
 target-port-name -l logical-unit-name
Enable a specific LU path.
# mpathadm enable path -i initiator-port-name -t \
  target-port-name -l logical-unit-name
Table 5  Commands for Administering a SCSI Target – COMSTAR
Enable iSNS discovery for the target device.
target# itadm modify-defaults --isns-server iSNS-server-ip-address

target# itadm modify-defaults --isns enable
Create an iSCSI target.
target# svcadm enable -r svc:/network/iscsi/target:default
target# itadm create-target
Create a logical unit.
target# zpool create sanpool mirror vol1 vol2

target# zfs create -V size-volume zfs-volume

target# stmfadm create-lu dev/zvol/rdsk/pool-name
Display the created logical unit.
target# stmfadm list-lu
Verify the LU configuration.
target# stmfadm list-view -l LU-name
Make the LU accessible by the system.
target# stmfadm add-view -h host-a -t targets-0 -n 1 guid-number
Enable the LU to be accessible by all systems.
target# stmfadm add-view LU-name
Restrict logical unit access to selected systems.
target# stmfadm create-hg host-a
target# stmfadm add-hg-member -g host-a  wwn.node-WWN wwwn.node-WWN

target# stmfadm create-tg targets-0
target# stmfadm add-tg-member -g targets-0 wwn.guid-number