VMware iSCSI enable Jumbo Frames & multi-path
Assuming your starting off with a brand new install you most likely have only one vSwitch configured. We’re going to create a second vSwitch to use for our iSCSI nics
---------------------------------------------
esxcfg-vswitch -a vSwitch1
esxcfg-vswitch -l
---------------------------------------------
The last command lists all the current switches created. You should vSwitch1 has nothing configure at this point. Before we go any further we need to set the MTU of the switch to 9000 to allow us to use jumbo frames
---------------------------------------------
esxcfg-vswitch -m 9000 vSwitch1
---------------------------------------------
Next up we need to create two vmKernel ports which we’ll later bind to our two dedicated nics. This is a two part process, first you create port groups (-A) for the switch and then you add an interface to each port group with a unique ip address within you iSCSI subnet. You’ll also notice we set the MTU of each interface to 9000 (-m)
---------------------------------------------
esxcfg-vswitch -A iSCSI-A vSwitch1
esxcfg-vswitch -A iSCSI-B vSwitch1
esxcfg-vmknic -a -i 192.168.0.31 -n 255.255.255.0 -m 9000 iSCSI-A
esxcfg-vmknic -a -i 192.168.0.31 -n 255.255.255.0 -m 9000 iSCSI-B
---------------------------------------------
Now we need to add our two physical nics we want to use for iSCSI to the vmKernel nics we created. For my setup the nics were vmnic1 and vmnic3
---------------------------------------------
esxcfg-vswitch -L vmnic1 vSwitch1
esxcfg-vswitch -L vmnic3 vSwitch1
esxcfg-vswitch -l
---------------------------------------------
At this point you should see that both nics have been added to the vSwitch and each nic is an uplink for each vmknic. If you have the physical nics plugged in already you should be able to ping your iSCSI san and other devices in your iSCSI network. We still need to make a change to the vSwitch since we want to each nic to belong to only one vmknic.
---------------------------------------------
esxcfg-vswitch -p iSCSI1 -N vmnic3 vSwitch1
esxcfg-vswitch -p iSCSI2 -N vmnic1 vSwitch1
esxcfg-vswitch -l
---------------------------------------------
The last thing we need to do is bind the two vmknics to our iSCSI adapter but first we need to enable the adapter and identify the names of our vmknics and iSCSI adapter
---------------------------------------------
esxcfg-swiscsi –e
esxcfg-scsidevs -a |grep "iSCSI Software"
esxcfg-vmknic –l
---------------------------------------------
The second command we ran should return a line that starts with vmhba##; This is our iSCSI device name. The third command returns the names of our vmknics; most likely vmk0 and vmk1 if your starting from a brand new system
---------------------------------------------
vmkiscsi-tool -V -a vmk1 vmhba33
vmkiscsi-tool -V -a vmk2 vmhba33
esxcli swiscsi nic list -d vmhba33
---------------------------------------------
At this point you should have a working iSCSI setup with dual paths to iSCSI network. At this point you would want to add your iSCSI San ip’s to dynamic discovery and assaign some storage to your new host. Add below command to /etc/rc.local
---------------------------------------------
for i in `ls /vmfs/devices/disks/ | grep naa.600` ; do esxcli --server esx2dt nmp roundrobin setconfig --type "iops" --iops=1 --device $i; done
---------------------------------------------
esxcfg-vswitch -a vSwitch1
esxcfg-vswitch -l
---------------------------------------------
The last command lists all the current switches created. You should vSwitch1 has nothing configure at this point. Before we go any further we need to set the MTU of the switch to 9000 to allow us to use jumbo frames
---------------------------------------------
esxcfg-vswitch -m 9000 vSwitch1
---------------------------------------------
Next up we need to create two vmKernel ports which we’ll later bind to our two dedicated nics. This is a two part process, first you create port groups (-A) for the switch and then you add an interface to each port group with a unique ip address within you iSCSI subnet. You’ll also notice we set the MTU of each interface to 9000 (-m)
---------------------------------------------
esxcfg-vswitch -A iSCSI-A vSwitch1
esxcfg-vswitch -A iSCSI-B vSwitch1
esxcfg-vmknic -a -i 192.168.0.31 -n 255.255.255.0 -m 9000 iSCSI-A
esxcfg-vmknic -a -i 192.168.0.31 -n 255.255.255.0 -m 9000 iSCSI-B
---------------------------------------------
Now we need to add our two physical nics we want to use for iSCSI to the vmKernel nics we created. For my setup the nics were vmnic1 and vmnic3
---------------------------------------------
esxcfg-vswitch -L vmnic1 vSwitch1
esxcfg-vswitch -L vmnic3 vSwitch1
esxcfg-vswitch -l
---------------------------------------------
At this point you should see that both nics have been added to the vSwitch and each nic is an uplink for each vmknic. If you have the physical nics plugged in already you should be able to ping your iSCSI san and other devices in your iSCSI network. We still need to make a change to the vSwitch since we want to each nic to belong to only one vmknic.
---------------------------------------------
esxcfg-vswitch -p iSCSI1 -N vmnic3 vSwitch1
esxcfg-vswitch -p iSCSI2 -N vmnic1 vSwitch1
esxcfg-vswitch -l
---------------------------------------------
The last thing we need to do is bind the two vmknics to our iSCSI adapter but first we need to enable the adapter and identify the names of our vmknics and iSCSI adapter
---------------------------------------------
esxcfg-swiscsi –e
esxcfg-scsidevs -a |grep "iSCSI Software"
esxcfg-vmknic –l
---------------------------------------------
The second command we ran should return a line that starts with vmhba##; This is our iSCSI device name. The third command returns the names of our vmknics; most likely vmk0 and vmk1 if your starting from a brand new system
---------------------------------------------
vmkiscsi-tool -V -a vmk1 vmhba33
vmkiscsi-tool -V -a vmk2 vmhba33
esxcli swiscsi nic list -d vmhba33
---------------------------------------------
At this point you should have a working iSCSI setup with dual paths to iSCSI network. At this point you would want to add your iSCSI San ip’s to dynamic discovery and assaign some storage to your new host. Add below command to /etc/rc.local
---------------------------------------------
for i in `ls /vmfs/devices/disks/ | grep naa.600` ; do esxcli --server esx2dt nmp roundrobin setconfig --type "iops" --iops=1 --device $i; done
留言