Score:0

Why do I can't see the bond created by systemd service

cn flag

I have created systemd service to create a bond, and confirmed it's created successfully from the output in the logs, but I can not see the bond in my current shell.

mlx_bonding.service

[Unit]
Description=Create bonding with mlx_bond_0

[Service]
Type=simple
ExecStart=/root/scripts/bonding/mlx_bonding_start.sh
ExecStop=/root/scripts/bonding/mlx_bonding_stop.sh

[Install]
WantedBy=multi-user.target

mlx_bonding_start.sh

#!/bin/bash

ip link add bond0 type bond
ip link set bond0 down
ip link set bond0 type bond mode 802.3ad miimon 100 updelay 100 downdelay 100 xmit_hash_policy layer3+4
ip link set p0 down
ip link set p1 down
ip link set p0 master bond0
ip link set p1 master bond0
ip link set p0 up
ip link set p1 up
ip link set bond0 up
ip link show dev bond0
cat /proc/net/bonding/bond0

The output:

Mar 20 06:09:13 dpu-bf2-105 mlx_bonding_start.sh[5243]: 24: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
Mar 20 06:09:13 dpu-bf2-105 mlx_bonding_start.sh[5243]: link/ether 08:c0:eb:3e:8e:ce brd ff:ff:ff:ff:ff:ff
Mar 20 06:09:13 dpu-bf2-105 mlx_bonding_start.sh[5243]: Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
Mar 20 06:09:13 dpu-bf2-105 mlx_bonding_start.sh[5243]: Bonding Mode: IEEE 802.3ad Dynamic link aggregation
Mar 20 06:09:13 dpu-bf2-105 mlx_bonding_start.sh[5243]: Transmit Hash Policy: layer3+4 (1)
Mar 20 06:09:13 dpu-bf2-105 mlx_bonding_start.sh[5243]: MII Status: up
Mar 20 06:09:13 dpu-bf2-105 mlx_bonding_start.sh[5243]: MII Polling Interval (ms): 100
Mar 20 06:09:13 dpu-bf2-105 mlx_bonding_start.sh[5243]: Up Delay (ms): 100
Mar 20 06:09:13 dpu-bf2-105 mlx_bonding_start.sh[5243]: Down Delay (ms): 100
Mar 20 06:09:13 dpu-bf2-105 mlx_bonding_start.sh[5243]: Peer Notification Delay (ms): 0
Mar 20 06:09:13 dpu-bf2-105 mlx_bonding_start.sh[5243]: 802.3ad info
Mar 20 06:09:13 dpu-bf2-105 mlx_bonding_start.sh[5243]: LACP rate: slow
Mar 20 06:09:13 dpu-bf2-105 mlx_bonding_start.sh[5243]: Min links: 0
Mar 20 06:09:13 dpu-bf2-105 mlx_bonding_start.sh[5243]: Aggregator selection policy (ad_select): stable
Mar 20 06:09:13 dpu-bf2-105 mlx_bonding_start.sh[5243]: System priority: 65535
Mar 20 06:09:13 dpu-bf2-105 mlx_bonding_start.sh[5243]: System MAC address: 08:c0:eb:3e:8e:ce
Mar 20 06:09:13 dpu-bf2-105 mlx_bonding_start.sh[5243]: Active Aggregator Info:
Mar 20 06:09:13 dpu-bf2-105 mlx_bonding_start.sh[5243]: Aggregator ID: 1
Mar 20 06:09:13 dpu-bf2-105 mlx_bonding_start.sh[5243]: Number of ports: 1
Mar 20 06:09:13 dpu-bf2-105 mlx_bonding_start.sh[5243]: Actor Key: 0
Mar 20 06:09:13 dpu-bf2-105 mlx_bonding_start.sh[5243]: Partner Key: 1
Mar 20 06:09:13 dpu-bf2-105 mlx_bonding_start.sh[5243]: Partner Mac Address: 00:00:00:00:00:00
Mar 20 06:09:13 dpu-bf2-105 mlx_bonding_start.sh[5243]: Slave Interface: p0
Mar 20 06:09:13 dpu-bf2-105 mlx_bonding_start.sh[5243]: MII Status: going back

You can see the bond is created in the log, and everything looks fine, but if I run commands to check the bond in shell

[root@dpu-bf2-105 bonding]# ls /proc/net/bonding/
[root@dpu-bf2-105 bonding]# ip link show type bond
[root@dpu-bf2-105 bonding]#

I can't see it.

What could be the possible reasons for that? Thank you so much

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.