Quick command reference for FCP Linux® Host

Quick command reference for FCP Linux® Host
Linux® Host Utilities 6.2 Quick Command Reference
Clustered Data ONTAP®
Service management commands
system license show
vserver iscsi create -vserver name
-status-admin up
vserver fcp create -vserver name
-status-admin up
vserver {iscsi |fcp} start -vserver name
vserver {iscsi |fcp} stop -vserver name
Verifies the FCP and iSCSI licenses are installed on the cluster.
Enables iSCSI on the specified Vserver.
Enables FC on the specified Vserver.
Starts the FC or iSCSI service on the specified Vserver.
Stops the FC or iSCSI service on the specified Vserver.
Logical interface (LIF) management commands
network interface create -vserver name
-lif lif_name -role data -dataprotocol
{iscsi |fcp} -home-node node
-home-port port
network interface show
Creates a data LIF for either iSCSI or FC. You must create a
data LIF in each Vserver on each node to enable failover.
portset create -vserver name -portset
portset_name -protocol mixed -port-name
lif_list
Creates a port set that you can add to an igroup to limit which
LIFs can be used to access LUNs mapped to that igroup.
Verifies status of LIFs.
iSCSI authentication (CHAP) management commands
vserver iscsi security create initiator initiator -auth-type CHAP user-name inname -password inpassword [outbound-user-name outname –
outboundpassword outpassword]
vserver iscsi security show
Defines authentication method for the specified initiator. For
initiator, use the host’s iSCSI node name in iqn or eui format. Note
that inname on storage system is set to outgoing user name on host.
Displays the current iSCSI authentication configuration.
Target status and troubleshooting commands
vserver {fcp|iscsi} show
vserver iscsi connection show
vserver fcp initiator show
Displays current status of the FC or iSCSI targets.
Displays details of iSCSI connections.
Displays details of FC initiators.
LUN and igroup management commands
vserver setup
lun create -vserver name -volume
vol_name -lun lun_name -size size
-ostype type
-space-reserve {enabled | disabled}
igroup create -vserver name -igroup
igroup_name -protocol {fcp | iscsi |
mixed} –ostype windows -initiator
list
[-portset portset_name]
lun map -vserver name -volume
vol_name
-lun lun_name -igroup igroup_name
[-lun-id integer]
lun igroup show [-vserver name]
[ -igroup igroup_name]
lun show [-instance] [parameters]
lun modify -vserver name -volume
vol_name -lun lun_name -state {online
| offline}
lun delete -vserver name -volume
vol_name -lun lun_name
Interactive Vserver, volume, LUN, and igroup creation.
Manual LUN creation. Enter size as an integer with one of the
following suffixes: m (megabytes), g (gigabytes), or t (terabytes).
Manual initiator group creation. Specify the initiator WWPNs or
iSCSI node name. Use the optional port set to limit which initiator
ports access LUNs mapped to this igroup.
Makes the specified LUN accessible to initiators in the specified
igroup. Specify optional LUN ID or take default of lowest available
value.
Displays the initiators in all igroups or in the specified initiator
group or for the specified Vserver.
Lists LUNs. Use -instance to display more details. Add
parameters to filter the list; run man lun show for available
parameters.
Enables or disables block-protocol access to the specified LUN.
Deletes the specified LUN and all its data.
General notes
The format of an iSCSI node name is iqn.yyyy-mm.reverse_domain_name:anything and is automatically set on the storage
system (target) and each host (initiator). NetApp recommends that you use the host name for the anything portion of the initiator
node name.
Clustered SAN environment requires Data ONTAP 8.1 or later.
Part number: 215-08114_B0
September 2014
Copyright © 1994-2014 NetApp, Inc. All rights reserved.
1
Linux® Host Utilities 6.2 Quick Command Reference
Data ONTAP operating in 7-Mode
Management commands
fcp {start|stop}
iscsi {start|stop}
fcp config [adapter [up|down]
[partner {adapter|None}|-partner]
[mediatype {ptp|auto|loop}]
[speed {1|2|4|auto}]]
fcp show adapter [-v] [adapter]
fcp show cfmode
Starts or stops the FC or iSCSI service on the storage system.
fcp show initiator [-v] [adapter]
Displays information about initiators connected to the storage system.
Displays or adds license codes on the storage system. Use to verify that both
FC and iSCSI are licensed on the storage system.
Displays or sets the iSCSI target node name.
Displays information about initiators connected to the target.
Displays or configures network parameters for the specified interface. Use –a
to display all network interfaces.
license [add code]
iscsi nodename [new_nodename]
iscsi initiator show
ifconfig [-a | interface]
Configures the FC target adapters on the storage system. Not all versions of
Data ONTAP support 4-gigabyte speed. Enter fcp config with no
arguments to display adapter information.
Displays information about target adapters on the storage system.
Displays the cfmode of a storage system in active/active configuration.
Target status, performance, and troubleshooting commands
{fcp | iscsi} status
sysstat {–i|-f} [interval]
fcp stats [-z] [adapter]
fcp stats -i interval [-c count]
[-a|adapter]
lun stats [-z] [-o] [-a|lun_path]
lun config_check [-S] [-s|-v]
iscsi stats [-z]
ifstat [-z] –a | interface
Displays the status of the FC or iSCSI service on the storage system.
Displays iSCSI (-i) or FC (-f) performance statistics. interval is integer
reporting interval in seconds; default is 15 seconds.
Displays statistics for the specified FC target adapter. Use -z to clear statistics.
Displays FC performance statistics over a specified interval. interval is integer
reporting interval in seconds. Specify adapter or use -a to display statistics for
all FC target adapters.
Displays block access statistics for the specified LUN. Use -z to clear statistics;
-o for extended stats; -a to show stats for all LUNs.
(FC only) Performs checks on the lun/igroup/fcp configuration of the storage
system. Requires Data ONTAP 7.1 or later.
Displays numbers of iSCSI PDUs and CDBs, and error statistics.
(iSCSI only) Displays device-level statistics for the specified network
interface. Use -z to clear statistics. Use -a to display statistics for all interfaces.
iSCSI authentication (CHAP) management commands
iscsi security add -i initiator -s CHAP -p
inpassword -n inname [-o outpassword -m outname]
iscsi security default -s CHAP -p
inpassword -n inname [-o outpassword -m outname]
Defines the authentication method for specified initiator. For
initiator, use node name in IQN format. Note that inname on a
storage system is set to the outgoing user name on a host. Use -o
and -m for bidirectional CHAP.
Sets the default authentication method, user names, and
passwords for all initiators not specifically configured.
LUN and igroup management commands
lun setup
lun create -s size -t linux lun_path
igroup create -f -t linux initiator_group
[ WWPN…]
igroup show [initiator_group]
lun map lun_path initiator_group [lun_id]
lun show [-v|-m|-c] [all|mapped|offline|
online|unmapped| lun_path|-g initiator_group]
lun online | offline lun_path…
lun destroy [-f] lun_path…
vol options vol_name nosnap on
igroup create -i [-t aix|hpux|default|
linux|netware|solaris|vmware|windows]
Part number: 215-08114_B0
September 2014
Interactive LUN creation. Combines lun create , igroup
create, igroup add , and lun map command functions.
(FC only) Manual LUN creation. Enter size as integer bytes with
one of the following suffixes: m (megabytes), g (gigabytes), or t
(terabytes).
Creates a new FC initiator group. Optionally, specify the initiator
worldwide port names (WWPN…), or add them using the
igroup add command.
Displays the initiator nodes in the specified initiator group. Omit
initiator_group to see all igroups.
Makes the specified LUN accessible to initiators in the specified
igroup. The default is the lowest available value.
Displays general (-v), mapping (-m), or clone (-c) information
about the specified set of LUNs.
Enables or disables block-protocol access to the specified LUNs.
Destroys the specified LUNs and all their data. Use -f if LUN is
in use.
(iSCSI only) Turns off scheduled Snapshot copies for a volume
containing LUNs. Recommended: Enable space reservations.
Creates an iSCSI initiator group. Optionally, specify the initiator
node names (node…) or add them using igroup add.
Copyright © 1994-2014 NetApp, Inc. All rights reserved.
2
Linux® Host Utilities 6.2 Quick Command Reference
initiator_group [ node…]
igroup add initiator_group node…
Part number: 215-08114_B0
September 2014
Adds initiator nodes to the specified igroup.
Copyright © 1994-2014 NetApp, Inc. All rights reserved.
3
Linux® Host Utilities 6.2 Quick Command Reference
Red Hat® Enterprise Linux
Host configuration files
/etc/modprobe.conf
Contains HBA driver parameter settings.
/etc/fstab
/etc/multipath.conf
Lists file systems on FC or iSCSI LUNs to mount.
Lists local disks to exclude (blacklist) from multipathing and sets specific
device parameters for NetApp® storage systems.
Contains the iSCSI node name of the initiator.
For Red Hat Enterprise Linux 5 or later:
/etc/iscsi/initiatorname.iscsi
For Red Hat Enterprise Linux 4:
/etc/initiatorname.iscsi
For Red Hat Enterprise Linux 5 or later:
/etc/iscsi/iscsid.conf
For Red Hat Enterprise Linux 4:
/etc/iscsi.conf
Lists most settings for the iSCSI initiator.
iSCSI service management commands
For RedHat Enterprise Linux 7 series
systemctl start iscsi
For RedHat Enterprise Linux 4 or 5 or 6 series
/etc/init.d/iscsi start
For RedHat Enterprise Linux 7 series
systemctl enable iscsi
Manually starts the iSCSI service on the Linux host.
Configures the iSCSI service to start automatically.
For RedHat Enterprise Linux 4 or 5 or 6 series
chkconfig iscsi on
Multipathing (dm-multipath) commands
For RedHat Enterprise Linux 7 series
systemctl start multipathd
For RedHat Enterprise Linux 4 or 5 or 6 series
/etc/init.d/multipathd start
For RedHat Enterprise Linux 7 series
systemctl enable multipathd
Manually starts the multipathing service on the Linux host.
Configures the multipathing service to start automatically.
For RedHat Enterprise Linux 4 or 5 or 6 series
chkconfig --add multipathd
chkconfig multipathd on
multipath –ll
multipath –v3
multipath –f device_map
multipath –ll –v3 -d
Displays the multipathing configuration.
Creates the initial multipathing configuration.
Removes an existing LUN from the multipathing configuration.
Displays the multipathing configuration in verbose mode.
Accessing LUNs on host
sanlun fcp show adapter -v
sanlun lun show all
sanlun lun show –p
ls –lh /dev/mapper/
fdisk device
mkfs –V -t ext3 device
e2label device label
mount -a
df -h
For Red Hat Enterprise Linux 5 or later:
iscsiadm -m session
iscsiadm -m session --sid=N --rescan
iscsiadm -m session --rescan
For Red Hat Enterprise Linux 4:
/etc/init.d/iscsi reload
/etc/init.d/iscsi restart
Part number: 215-08114_B0
September 2014
Displays HBA information.
Lists available LUNs as seen by the sanlun script.
Provides multipath information for both DM-Multipath and Veritas
Storage FoundationTM dynamic multipathing solutions.
Lists DM-Multipath devices generated for LUNs.
Partitions the LUN. device is the /dev/sdx name for the LUN.
Creates an ext3 file system on the partition or multipath device. For
DM-Multipath, creates the file system on the /dev/mapper/ device.
Creates a persistent label for a file system. device is the partition; label
is a unique string up to 16 characters. Not needed with DM-Multipath.
Mounts all file systems listed in /etc/fstab.
Lists all mounted file systems.
(iSCSI only) Gets the list of all the current sessions.
Rescans a specific session. Makes new LUNs visible on the host.
Rescans all the sessions.
Makes new LUNs visible on the host. Does not affect other LUNs.
(iSCSI only) Discovers LUNs when reload fails. Interrupts all iSCSI
Copyright © 1994-2014 NetApp, Inc. All rights reserved.
4
Linux® Host Utilities 6.2 Quick Command Reference
For Red Hat Enterprise Linux 5:
iscsiadm -m session --sid=0 -i
For Red Hat Enterprise Linux 4:
/sbin/iscsi-ls -l
Part number: 215-08114_B0
September 2014
sessions.
(iSCSI only) Lists available LUNs as seen by the Linux host.
Copyright © 1994-2014 NetApp, Inc. All rights reserved.
5
Linux® Host Utilities 6.2 Quick Command Reference
SUSE® Linux Enterprise Server
Host configuration files
/etc/modprobe.conf.local
/etc/fstab
/etc/multipath.conf
/etc/iscsi/initiatorname.iscsi
/etc/iscsi/iscsid.conf
Contains HBA driver parameter settings.
Lists file systems on FC or iSCSI LUNs to mount.
Lists local disks to exclude (blacklist) from multipathing. You must create
this file on SUSE Linux Enterprise Server 10; it is not present by default.
Contains the iSCSI node name of the initiator.
Lists most settings for the iSCSI initiator.
iSCSI service management commands
/etc/init.d/open-iscsi {start|stop}
chkconfig open-iscsi on
Manually starts or stops the iSCSI service on the Linux host.
Configures the iSCSI service to start automatically.
Multipathing (dm-multipath) commands
/etc/init.d/boot.multipath start
/etc/init.d/multipathd start
insserv boot.multipath multipathd
Manually starts the multipathing service on the Linux host.
multipath –ll
Displays the multipathing configuration.
Adds new LUNs to the multipath configuration.
Removes an existing LUN from the multipath configuration.
Displays the multipathing configuration.
multipath –v3
multipath –f device_map
multipath –ll –v3 -d
Configures the multipath service to start automatically.
Accessing LUNs on host
sanlun fcp show adapter -v
sanlun lun show all
sanlun lun show –p
iscsiadm -m session
iscsiadm -m session --sid=N --rescan
iscsiadm -m session --rescan
ls –lh /dev/mapper/
fdisk device
mkfs –V -t ext3 device
mount -a
df -h
/etc/init.d/iscsi restart
For SUSE Linux Enterprise Server 10 SP2:
iscsiadm --mode session --sid=N -P 3
For SUSE Linux Enterprise Server 10 SP1:
iscsiadm -m session --sid=0 -i
iscsiadm -m session
iscsiadm -m session --sid=N --rescan
iscsiadm -m session --rescan
Part number: 215-08114_B0
September 2014
Displays HBA information.
Lists available LUNs as seen by the sanlun script.
Provides multipath information for both native DM-Multipath and
Veritas Storage Foundation dynamic multipathing solutions.
(iSCSI only) Gets the list of all the current sessions.
Rescans a specific session. Makes new LUNs visible on the host.
Rescans all the sessions.
Makes new LUNs visible on the host. Does not affect other LUNs.
Lists DM-Multipath devices generated for LUNs.
Partitions the LUN. device is the /dev/sdx name for the LUN.
Creates an ext3 file system on the partition or multipath device. For
DM-Multipath, creates the file system on the /dev/mapper/ device.
Mounts all file systems listed in /etc/fstab.
Lists all mounted file systems.
(iSCSI only) Discovers LUNs when reload fails. Interrupts all iSCSI
sessions.
(iSCSI only) Lists available LUNs as seen by the Linux host.
(iSCSI only) Gets the list of all the current sessions.
Rescans a specific session. Makes new LUNs visible on the host.
Rescans all the sessions.
Copyright © 1994-2014 NetApp, Inc. All rights reserved.
6
Linux® Host Utilities 6.2 Quick Command Reference
Veritas Storage Foundation
Multipathing commands
vxdmpadm stat restored
vxdmptune dmp_restore_interval 60
vxdmpadm getsubpaths ctlr= c1
vxdmpadm getsubpaths
dmpnodename= DMP_nodename
vxdmpadm settune dmp_tunable=value
vxdmpadm gettune all
sanlun lun show –p
vxdmpadm list dmpnode
vxdmpadm list dmpnode dmpnodename= dmpdevice-name
Displays restore daemon statistics.
Sets the DMP restore interval to 60 seconds.
Lists all the DMP paths under the controller <c1>.
Displays all the paths to a particular LUN. The DMP_nodename
can be in the OS-native or enclosure-based naming format.
Sets the value for a particular DMP tunable.
Displays the DMP’s tunable parameters.
Provides multipath information for both native DM-Multipath and
Veritas Storage Foundation dynamic multipathing solutions.
Displays information about dmpnode, such as the LUN serial
number, device attributes, and so on.
Displays information about a given dmpnode.
Accessing LUNs as Linux disk devices
vxdisk list
Lists the LUNs available to the host.
Performs initialization, encapsulation, removal, replacement of
disks, and changing the disk naming scheme, and so on.
Configures the disk for use by Veritas Volume Manager.
Manages disk groups under Veritas Volume Manager.
Manages volumes under Veritas Volume Manager.
Lists the volumes and disk group information.
vxdiskadm
vxdisksetup
vxdg
vxassist
vxprint
sanlun lun show all
ls –l /dev/vx/dmp
mkfs –V -t vxfs volume
mount –t vxfs volume
mount -a
Lists available LUNs as seen by the sanlun command.
Lists multipath devices generated for LUNs when using Veritas
multipathing.
Creates a vxfs file system on the Veritas volume. The path for the
Veritas volume is /dev/vx/dsk.
Mounts a Veritas volume.
Mounts all file systems listed in /etc/fstab.
Lists all mounted file systems.
df
Citrix XenServer:
Citrix has xe command implementation to handle host and guest management.
Please refer to the Citrix XenServer Administrator Guide.
Oracle VM:
Native RHEL commands work for Oracle VM. It is advised to use Oracle VM Manager for host and guest management.
Red Hat Enterprise Virtualization:
Native RHEL commands work for RHEV. It is advised to use RHEV Manager for all host and guest management.
Part number: 215-08114_B0
September 2014
Copyright © 1994-2014 NetApp, Inc. All rights reserved.
7
Linux® Host Utilities 6.2 Quick Command Reference
Troubleshooting information
sanlun lun show all
Verify that LUNs are visible to the host.
Verify the multipath information.
Verify the host's WWPNs.
sanlun lun show –p
sanlun fcp show adapter -v all
license or system license show (from storage
system console)
lsmod | grep qla
lsmod | grep lpfc
lsmod | grep dm
Verify that FC or iSCSI is licensed on the storage system.
(FC only) Verify that the QLogic or Emulex driver is loaded on
the host.
Verify that the DM-Multipath driver is loaded on the host.
Verify basic network connectivity between the storage system and
host.
ping storage_system_IP_address (from host console)
ping host_IP_address (from storage system console)
Verify that network parameters are compatible on the host and
ifconfig (from storage system console and host
storage system, especially duplex and jumbo frame (mtu) settings.
console)
If using jumbo frames, verify that jumbo frames are configured on all switches between the host and storage system.
If using CHAP, verify correct user names and passwords. The incoming values on the host are the outgoing values on the storage
system. The incoming values on the storage system are the outgoing values on the host.
Verifying the driver settings:
 For QLogic HBA driver: Check the values in /sys/module/qla2xxx or /sys/module/qla2xxx/parameters/.
 For Emulex HBA driver: Check the values in /sys/class/scsi_host/host<adapter_number>.
Check the log file on the storage system (/etc/messages) for error messages.
Search the NetApp Service and Support Knowledgebase at
https://support.netapp.com/eservice/SupportHome.jsp for information about the problem.
Resources
http://support.netapp.com
http://support.netapp.com/NOW/products/interoperabilit
y
http://www.redhat.com/
http://www.novell.com/home/
Part number: 215-08114_B0
September 2014
All NetApp documentation and software
downloads
Interoperability matrix
Red Hat Linux information
SUSE Linux information
Copyright © 1994-2014 NetApp, Inc. All rights reserved.
8
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertising