Bonding the Storage Interface

Scenario #2, Tutorial #2, Part #3

Per Citrix's recommendation, we'll be configuring an active-passive bond for the storage interface. The IP address that was applied to eth2 in Tutorial #1 will be inherited by the newly-created bond.

On the pool-master:

  1. Create a network specifically for the storage traffic and store the network's UUID in a shell variable for use later in this process:
    Legend: GET | SEE | USE
    [root@xs-1 ~]# NAS_NET_UUID=$(xe network-create name-label=NAS) [root@xs-1 ~]# echo -e "Storage Network UUID: $NAS_NET_UUID\n" Storage Network UUID: 929521ce-0cd6-db0a-0501-4a6829192378
  2. Identify the UUID's of each of the NIC's that we'll be bonding and store them in shell variables for use later in this process:
    Legend: GET | SEE | USE
    [root@xs-1 ~]# NAS_PIF2_UUID=$(xe pif-list host-uuid=$INSTALLATION_UUID device=eth2 params=uuid | awk '{ print $5 }') [root@xs-1 ~]# NAS_PIF4_UUID=$(xe pif-list host-uuid=$INSTALLATION_UUID device=eth4 params=uuid | awk '{ print $5 }') [root@xs-1 ~]# echo -e "Storage PIF UUID's:\n PIF2: $NAS_PIF2_UUID\n PIF4: $NAS_PIF4_UUID\n" Storage PIF UUID's: PIF2: 767aac49-ba37-3be7-5bad-87ae26d97e02 PIF4: 4c7a225b-7dfe-4b7f-117f-a42ad3be4cae
  3. Create the bond and store the bond's UUID in a shell variable for use later in this process:
    Legend: GET | SEE | USE
    [root@xs-1 ~]# NAS_BOND_UUID=$(xe bond-create network-uuid=$NAS_NET_UUID pif-uuids=$NAS_PIF2_UUID,$NAS_PIF4_UUID mode=active-backup) [root@xs-1 ~]# NAS_MSTR_UUID=$(xe pif-list network-name-label=NAS host-uuid=$INSTALLATION_UUID | awk '{ print $5 }') [root@xs-1 ~]# echo -e "Storage Bond UUID's:\n BOND INTERFACE UUID: $NAS_BOND_UUID\n BOND MASTER UUID: $NAS_MSTR_UUID\n" Storage Bond UUID's: BOND INTERFACE UUID: 2c22c629-b1de-7921-dae3-6c36141f1bf3 BOND MASTER UUID: 501c099a-7215-fc4f-97c6-324b7661f827
  4. Finish by reviewing the effects of the configuration changes that were just performed:
    1. View the list of newly-created networks that are available in the resource pool:
      Legend: GET | SEE | USE
      [root@xs-1 ~]# xe network-list params=uuid,name-label,bridge | grep -v Pool | grep -v management | grep -B1 -A2 name-label uuid ( RO) : 929521ce-0cd6-db0a-0501-4a6829192378 name-label ( RW): NAS bridge ( RO): xapi0
      Notice that, besides the default networks that were created during installation, only the network that was just created in Step #1 is available in the resource pool.
    2. View the list of physical and non-physical interfaces available on the PM from the perspective of XAPI:
      Legend: GET | SEE | USE
      [root@xs-1 ~]# xe pif-list host-uuid=$INSTALLATION_UUID physical=true IP-configuration-mode=Static params=uuid,device,IP,network-name-label uuid ( RO) : 8445b796-01b0-e2cf-ba17-9e7af7856925 device ( RO): eth0 network-name-label ( RO): Pool-wide network associated with eth0 IP ( RO): 172.16.0.10 [root@xs-1 ~]# xe pif-list host-uuid=$INSTALLATION_UUID physical=false IP-configuration-mode=Static params=uuid,device,IP,network-name-label uuid ( RO) : 501c099a-7215-fc4f-97c6-324b7661f827 device ( RO): bond0 network-name-label ( RO): NAS IP ( RO): 172.16.0.35 [root@xs-1 ~]# xe pif-list host-uuid=$INSTALLATION_UUID physical=false IP-configuration-mode=None params=uuid,device,IP,network-name-label
      Notice that, from the perspective of XAPI, the IP address of the Storage Interace (172.16.0.35) appears to have been moved from the physical interface eth2 to the new, non-physical interface, bond0. In Step #4d, below, we'll see that the IP address of the Storage Interface has actually been assigned to the newly-created virtual switch xapi0.
    3. View the list of bonded interfaces available on the PM:
      Legend: GET | SEE | USE
      [root@xs-1 ~]# xe bond-list params=uuid,master,mode uuid ( RO) : 2c22c629-b1de-7921-dae3-6c36141f1bf3 master ( RO): 501c099a-7215-fc4f-97c6-324b7661f827 mode ( RO): active-backup
      Notice that the master UUID of the newly-created bond is identical to the UUID of the new, non-physical interface, bond0.
    4. View the list of physical and non-physical interfaces available on the PM from the perspective of the control domain (Dom0):
      Legend: GET | SEE | USE
      [root@xs-1 ~]# ifconfig | grep -v '127\.0\.0\.1' | grep -B1 inet xapi0 Link encap:Ethernet HWaddr 00:26:55:D1:E8:CC inet addr:172.16.0.35 Bcast:172.16.0.47 Mask:255.255.255.240 -- xenbr0 Link encap:Ethernet HWaddr 00:1F:29:C4:9F:5C inet addr:172.16.0.10 Bcast:172.16.0.31 Mask:255.255.255.224 [root@xs-1 ~]# ifconfig -a | grep -e xen -e xapi -e eth eth0 Link encap:Ethernet HWaddr 00:1F:29:C4:9F:5C eth1 Link encap:Ethernet HWaddr 00:1F:29:C4:9F:3C eth2 Link encap:Ethernet HWaddr 00:26:55:D1:E8:CC eth3 Link encap:Ethernet HWaddr 00:26:55:D1:E8:CD eth4 Link encap:Ethernet HWaddr 00:1B:78:5A:21:8D eth5 Link encap:Ethernet HWaddr 00:1B:78:5A:21:8C xapi0 Link encap:Ethernet HWaddr 00:26:55:D1:E8:CC xenbr0 Link encap:Ethernet HWaddr 00:1F:29:C4:9F:5C xenbr1 Link encap:Ethernet HWaddr 00:1F:29:C4:9F:3C xenbr3 Link encap:Ethernet HWaddr 00:26:55:D1:E8:CD xenbr5 Link encap:Ethernet HWaddr 00:1B:78:5A:21:8C
      Notice that…
      1. The IP address of the Storage Interace (172.16.0.35) has actually been moved from the physical interface eth2 to the newly-created virtual switch xapi0.
      2. From the perspective of the control domain (Dom0) the newly-created virtual switch xapi0 functions as a non-physical interface.
      3. The newly-created virtual switch xapi0 shares the MAC address of the physical interface eth2.
    5. View the list of bonds and virtual switches on the PM from the perspective of the control domain (Dom0):
      Legend: GET | SEE | USE
      [root@xs-1 ~]# ovs-vsctl list-br xapi0 xenbr0 xenbr1 xenbr3 xenbr5 [root@xs-1 ~]# ovs-appctl bond/list bond type slaves bond0 active-backup eth2, eth4
      Notice that…
      1. The network bond bond0 has been formed by combinging the physical interfaces eth2 & eth4.
      2. The new network network bond is configured as an active-backup bond (i.e., an active-passive bond).
      3. The virtual network switch xapi0 has replaced the two default virtual switches xenbr2 & xenbr4.

On the other hosts in the resource pool:

On each of the other hosts in the resource pool: Restart the XAPI service to inherit the newly-created bonds and the newly-created networks from the PM

  1. Begin by reviewing the current state of networking on the other members of the resource pool:
    1. View the list of networks that are available in the resource pool:
      Legend: GET | SEE | USE
      [root@xs-2 ~]# xe network-list params=uuid,name-label,bridge | grep -v Pool | grep -v management | grep -B1 -A2 name-label uuid ( RO) : 929521ce-0cd6-db0a-0501-4a6829192378 name-label ( RW): NAS bridge ( RO): xapi0
      Notice that, the network that was just created on the PM in Step #1 is already visible from the other pool members.
    2. View the list of physical and non-physical interfaces available on this member of the pool from the perspective of XAPI:
      Legend: GET | SEE | USE
      [root@xs-2 ~]# xe pif-list host-uuid=$INSTALLATION_UUID physical=true IP-configuration-mode=Static params=uuid,device,IP,network-name-label uuid ( RO) : cd9d33bb-997e-5aec-c8d3-b0422e1e9cb5 device ( RO): eth2 network-name-label ( RO): Pool-wide network associated with eth2 IP ( RO): 172.16.0.36 uuid ( RO) : 7e171fca-dbbf-fb2b-dc27-b17dce481c02 device ( RO): eth0 network-name-label ( RO): Pool-wide network associated with eth0 IP ( RO): 172.16.0.12 [root@xs-2 ~]# xe pif-list host-uuid=$INSTALLATION_UUID physical=false IP-configuration-mode=Static params=uuid,device,IP,network-name-label [root@xs-2 ~]# xe pif-list host-uuid=$INSTALLATION_UUID physical=false IP-configuration-mode=None params=uuid,device,IP,network-name-label
      Notice that the IP address of the Storage Interace on this member of the resource pool (172.16.0.36) is still assigned to the physical interface eth2.
    3. View the list of bonded interfaces available in the resource pool:
      Legend: GET | SEE | USE
      [root@xs-2 ~]# xe bond-list params=uuid,master,mode uuid ( RO) : 2c22c629-b1de-7921-dae3-6c36141f1bf3 master ( RO): 501c099a-7215-fc4f-97c6-324b7661f827 mode ( RO): active-backup
      Notice that, even though the bond has not been created on this member of the resource pool yet, the bond that was created on the PM in Step #1 is visible from this member of the resource pool.
    4. View the list of physical and non-physical interfaces available on this member of the resource pool from the perspective of the control domain (Dom0):
      Legend: GET | SEE | USE
      [root@xs-2 ~]# ifconfig | grep -v '127\.0\.0\.1' | grep -B1 inet xenbr0 Link encap:Ethernet HWaddr 00:1F:29:C4:9D:BA inet addr:172.16.0.12 Bcast:172.16.0.31 Mask:255.255.255.224 -- xenbr2 Link encap:Ethernet HWaddr 00:26:55:D2:EE:50 inet addr:172.16.0.36 Bcast:172.16.0.47 Mask:255.255.255.240 [root@xs-2 ~]# ifconfig -a | grep -e xen -e xapi -e eth eth0 Link encap:Ethernet HWaddr 00:1F:29:C4:9D:BA eth1 Link encap:Ethernet HWaddr 00:1F:29:C4:9D:C2 eth2 Link encap:Ethernet HWaddr 00:26:55:D2:EE:50 eth3 Link encap:Ethernet HWaddr 00:26:55:D2:EE:51 eth4 Link encap:Ethernet HWaddr 00:1B:78:5C:74:35 eth5 Link encap:Ethernet HWaddr 00:1B:78:5C:74:34 xenbr0 Link encap:Ethernet HWaddr 00:1F:29:C4:9D:BA xenbr1 Link encap:Ethernet HWaddr 00:1F:29:C4:9D:C2 xenbr2 Link encap:Ethernet HWaddr 00:26:55:D2:EE:50 xenbr3 Link encap:Ethernet HWaddr 00:26:55:D2:EE:51 xenbr4 Link encap:Ethernet HWaddr 00:1B:78:5C:74:35 xenbr5 Link encap:Ethernet HWaddr 00:1B:78:5C:74:34
      Notice that…
      1. From the perspective of the control domain (Dom0) the IP address of the Storage Interace (172.16.0.36) is still assigned to xenbr2 (i.e., the default network that is connected to the physical interface eth2).
      2. The default network xenbr2 shares the MAC address of the physical interface the physical interface eth2.
    5. View the list of bonds and virtual switches on this member of the resource pool from the perspective of the control domain (Dom0):
      Legend: GET | SEE | USE
      [root@xs-2 ~]# ovs-vsctl list-br xenbr0 xenbr1 xenbr2 xenbr3 xenbr4 xenbr5 [root@xs-2 ~]# ovs-appctl bond/list bond type slaves
      Notice that…
      1. the virtual network switch xapi0 has not been formed on this member of the resource pool yet and has not replaced the two default virtual switches xenbr2 & xenbr4 yet.
      2. the network bond bond0 has not been formed on this member of the resource pool yet.
  2. Restart the XAPI service to inherit the newly-created bonds and the newly-created networks from the PM:
    [root@xs-2 ~]# service xapi restart && sleep 15 Stopping xapi: .. [ OK ] Starting xapi: OK [ OK ]
  3. Finish by reviewing the effects of restarting XAPI in order to inherit the configuration changes that have been performed on the PM:
    1. View the list of networks that are available in the resource pool:
      Legend: GET | SEE | USE
      [root@xs-2 ~]# xe network-list params=uuid,name-label,bridge | grep -v Pool | grep -v management | grep -B1 -A2 name-label uuid ( RO) : 929521ce-0cd6-db0a-0501-4a6829192378 name-label ( RW): NAS bridge ( RO): xapi0
    2. View the list of physical and non-physical interfaces available on this member of the resource pool from the perspective of XAPI:
      Legend: GET | SEE | USE
      [root@xs-2 ~]# xe pif-list host-uuid=$INSTALLATION_UUID physical=true IP-configuration-mode=Static params=uuid,device,IP,network-name-label uuid ( RO) : 7e171fca-dbbf-fb2b-dc27-b17dce481c02 device ( RO): eth0 network-name-label ( RO): Pool-wide network associated with eth0 IP ( RO): 172.16.0.12 [root@xs-2 ~]# xe pif-list host-uuid=$INSTALLATION_UUID physical=false IP-configuration-mode=Static params=uuid,device,IP,network-name-label uuid ( RO) : effda92b-4a34-ad8b-582e-3c1de7cfd864 device ( RO): bond0 network-name-label ( RO): NAS IP ( RO): 172.16.0.36 [root@xs-2 ~]# xe pif-list host-uuid=$INSTALLATION_UUID physical=false IP-configuration-mode=None params=uuid,device,IP,network-name-label
      Notice that the IP address of the Storage Interace of this member of the resource pool (172.16.0.36) is still assigned to the physical interface eth2.
    3. View the list of bonded interfaces available in the resource pool:
      Legend: GET | SEE | USE
      [root@xs-2 ~]# xe bond-list params=uuid,master,mode uuid ( RO) : b4da6a53-c233-3730-c98f-b90835eaf9ca master ( RO): effda92b-4a34-ad8b-582e-3c1de7cfd864 mode ( RO): active-backup uuid ( RO) : 2c22c629-b1de-7921-dae3-6c36141f1bf3 master ( RO): 501c099a-7215-fc4f-97c6-324b7661f827 mode ( RO): active-backup
      Notice that…
      1. A new network bond has been formed on this member of the resource pool.
      2. The new network network bond is configured as an active-backup bond (i.e., an active-passive bond).
      3. The master UUID of the newly-created bond is identical to the UUID of the new, non-physical interface, bond0.
    4. View the list of physical and non-physical interfaces available on this member of the resource pool from the perspective of the control domain (Dom0):
      Legend: GET | SEE | USE
      [root@xs-2 ~]# ifconfig | grep -v '127\.0\.0\.1' | grep -B1 inet xapi0 Link encap:Ethernet HWaddr 00:26:55:D2:EE:50 inet addr:172.16.0.36 Bcast:172.16.0.47 Mask:255.255.255.240 -- xenbr0 Link encap:Ethernet HWaddr 00:1F:29:C4:9D:BA inet addr:172.16.0.12 Bcast:172.16.0.31 Mask:255.255.255.224 [root@xs-2 ~]# ifconfig -a | grep -e xen -e xapi -e eth eth0 Link encap:Ethernet HWaddr 00:1F:29:C4:9D:BA eth1 Link encap:Ethernet HWaddr 00:1F:29:C4:9D:C2 eth2 Link encap:Ethernet HWaddr 00:26:55:D2:EE:50 eth3 Link encap:Ethernet HWaddr 00:26:55:D2:EE:51 eth4 Link encap:Ethernet HWaddr 00:1B:78:5C:74:35 eth5 Link encap:Ethernet HWaddr 00:1B:78:5C:74:34 xapi0 Link encap:Ethernet HWaddr 00:26:55:D2:EE:50 xenbr0 Link encap:Ethernet HWaddr 00:1F:29:C4:9D:BA xenbr1 Link encap:Ethernet HWaddr 00:1F:29:C4:9D:C2 xenbr3 Link encap:Ethernet HWaddr 00:26:55:D2:EE:51 xenbr5 Link encap:Ethernet HWaddr 00:1B:78:5C:74:34
      Just as we saw in Step #4d: Notice that, from the perspective of the control domain (Dom0) the IP address of the Storage Interace (172.16.0.36) has been moved from the physical interface eth2 to the newly-created virtual switch xapi0 which, from the perspective of the control domain (Dom0), functions as a non-physical interface. Also notice that the newly-created virtual switch xapi0 shares the MAC address of the physical interface the physical interface eth2.
    5. View the list of bonds and virtual switches on this member of the resource pool from the perspective of the control domain (Dom0):
      Legend: GET | SEE | USE
      [root@xs-2 ~]# ovs-vsctl list-br xapi0 xenbr0 xenbr1 xenbr3 xenbr5 [root@xs-2 ~]# ovs-appctl bond/list bond type slaves bond0 active-backup eth4, eth2
      Notice that…
      1. the virtual network switch xapi0 has been formed on this member of the resource pool and has replaced the two default virtual switches xenbr2 & xenbr4.
      2. the network bond bond0 has also been formed on this member of the resource pool.