Thursday, May 19, 2011

Everything about esx/esxi and nfs

Test connectivity between the esx server and nfs server:

# vmkping nfs-server
PING nfs-server (172.16.100.1): 56 data bytes
64 bytes from 172.16.100.1: icmp_seq=0 ttl=253 time=0.171 ms
64 bytes from 172.16.100.1: icmp_seq=1 ttl=253 time=0.171 ms
64 bytes from 172.16.100.1: icmp_seq=2 ttl=253 time=0.168 ms

View if any nfs mounts exist on the esx or esxi server:

# esxcfg-nas -l
ABC is /isos from nfs-server mounted

Unmount an nfs mount:

# esxcfg-nas -d ABC
NAS volume ABC deleted.

Mount the same file system again:

# esxcfg-nas -a ABC -o nfs-server -s /isos -y
Connecting to NAS volume: ABC
ABC created and connected.

Make sure the nfsclient module is loaded:

# vmkload_mod -l | grep nfs
nfsclient           0x418004874000    0x14000     0x417fc55e17c0    0x2000        47 Yes

Unload a load the module if necessary (can't be in use):

# vmkload_mod -u nfsclient
vmkload_mod: Can not remove module nfsclient: module symbols in use

Reload the module:

# vmkload_mod nfsclient
vmkload_mod: Can not load module nfsclient: module is already loaded

Esxcli Examples

View the storage array type plugins available:

# esxcli nmp satp list
Name                 Default PSP    Description
VMW_SATP_ALUA_CX     VMW_PSP_FIXED  Supports EMC CX that use the ALUA protocol
VMW_SATP_SVC         VMW_PSP_FIXED  Supports IBM SVC
VMW_SATP_MSA         VMW_PSP_MRU    Supports HP MSA
VMW_SATP_EQL         VMW_PSP_FIXED  Supports EqualLogic arrays
VMW_SATP_INV         VMW_PSP_FIXED  Supports EMC Invista
VMW_SATP_SYMM        VMW_PSP_FIXED  Supports EMC Symmetrix
VMW_SATP_LSI         VMW_PSP_MRU    Supports LSI and other arrays compatible
                                    with the SIS 6.10 in non-AVT mode
VMW_SATP_EVA         VMW_PSP_FIXED  Supports HP EVA
VMW_SATP_DEFAULT_AP  VMW_PSP_MRU    Supports non-specific active/passive arrays
VMW_SATP_CX          VMW_PSP_MRU    Supports EMC CX that do not use the ALUA
                                    protocol
VMW_SATP_ALUA        VMW_PSP_MRU    Supports non-specific arrays that use the
                                    ALUA protocol
VMW_SATP_DEFAULT_AA  VMW_PSP_FIXED  Supports non-specific active/active arrays
VMW_SATP_LOCAL       VMW_PSP_FIXED  Supports direct attached devices



View the multipathing choices available:

# esxcli nmp psp list
Name           Description
VMW_PSP_MRU    Most Recently Used Path Selection
VMW_PSP_RR     Round Robin Path Selection
VMW_PSP_FIXED  Fixed Path Selection



View the runtime name of a device:

# esxcli nmp psp getconfig -d naa.60060160e09028008e4d328c91a2df11
Current Path=vmhba0:C0:T1:L18

View the multipathing attributes of all devices:

# esxcli nmp device list
naa.60060160e0902800789c7d5d91a2df11
    Device Display Name: DGC Fibre Channel Disk (naa.60060160e0902800789c7d5d91a2df11)
    Storage Array Type: VMW_SATP_CX
    Storage Array Type Device Config: {navireg ipfilter}
    Path Selection Policy: VMW_PSP_MRU
    Path Selection Policy Device Config: Current Path=vmhba0:C0:T1:L4
    Working Paths: vmhba0:C0:T1:L4
...

View if a device is using roundrobin:

# esxcli nmp roundrobin getconfig -d naa.60060160e0902800a6c73dda91a2df11
Errors:
Device naa.60060160e0902800a6c73dda91a2df11 Does not use the Round Robin path selection policy.

View the preferred path of a device:

# esxcli nmp fixed getpreferred -d naa.60060160e0902800ef19e58491a2df11
Errors:
Device naa.60060160e0902800ef19e58491a2df11 Does not use the VMW_PSP_FIXED path selection policy.