LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-01-2021, 10:37 AM   #1
boyturtle
LQ Newbie
 
Registered: Mar 2021
Posts: 4

Rep: Reputation: Disabled
Problem with aggregate NICs via netplan with fstab.


I'm running Kubuntu 20.04 and have had server shares mounted on my desktop with /etc/fstab for some time now and all has been working well, without issue.
Recently, I decided to aggregate the 2 NICs I have in my pc with netplan, my chosen mode was 802.3ad and my Unifi switch supports this. However, as I am new to netplan, this has been quite challenging, but I finally got it to work and the 2 cards were running. Unfortunately, I lost the drives that were previously mounted in /etc/fstab following a restart (but they do still work in the time after I run the command sudo netplan apply and before restarting the pc)

I'm sure mounted disks and aggregated NICs should happily live side by side, so I'm wondering if something in the code I'm using is causing this problem or if I've gone about this the wrong way.

A typical line in the /etc/fstab is
Code:
//192.168.52.170/Admin /home/ServerAdmin cifs vers=1.0,uid=boyturtle,gid=boyturtle,credentials=/home/boyturtle/.smbcredentials,iocharset=utf8 0  0
The full netplan yaml file is as follows
Code:
network:
  version: 2
  renderer: NetworkManager
  ethernets:
    enp3s0:
      dhcp4: no
    enp0s31f6:
      dhcp4: no
  bonds:
    bond0:
      interfaces: [enp3s0, enp0s31f6]
      addresses: [192.168.52.128/24]
      gateway4: 192.168.52.101
      parameters:
        mode: 802.3ad
        transmit-hash-policy: layer3+4
        mii-monitor-interval: 1
      nameservers:
        addresses:
          - 192.168.52.101
          - 1.1.1.1
          - 9.9.9.9
I understand that indentations are critical in yaml file, but I guess mine are correctly formatted as I believe the aggregation worked. The output (before restart, if it matters) for cat /proc/net/bonding/bond0 gave me
Code:
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)

Bonding Mode: IEEE 802.3ad Dynamic link aggregation
Transmit Hash Policy: layer3+4 (1)
MII Status: up
MII Polling Interval (ms): 1
Up Delay (ms): 0
Down Delay (ms): 0
Peer Notification Delay (ms): 0

802.3ad info
LACP rate: slow
Min links: 0
Aggregator selection policy (ad_select): stable

Slave Interface: enp0s31f6
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 70:85:c2:66:ec:9a
Slave queue ID: 0
Aggregator ID: 2
Actor Churn State: monitoring
Partner Churn State: monitoring
Actor Churned Count: 0
Partner Churned Count: 0

Slave Interface: enp3s0
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 70:85:c2:66:ec:98
Slave queue ID: 0
Aggregator ID: 2
Actor Churn State: monitoring
Partner Churn State: monitoring
Actor Churned Count: 0
Partner Churned Count: 0
The ouput (again, before restart) for ethtool bond0 gave me
Code:
Settings for bond0:
        Supported ports: [ ]
        Supported link modes:   Not reported
        Supported pause frame use: No
        Supports auto-negotiation: No
        Supported FEC modes: Not reported
        Advertised link modes:  Not reported
        Advertised pause frame use: No
        Advertised auto-negotiation: No
        Advertised FEC modes: Not reported
        Speed: 2000Mb/s
        Duplex: Full
        Port: Other
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: off
Cannot get wake-on-lan settings: Operation not permitted
        Link detected: yes
Can anyone suggest a way forward to get this working properly?

Last edited by boyturtle; 03-01-2021 at 12:47 PM.
 
Old 03-01-2021, 03:49 PM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
What do you mean by "lost the drives"? What happens when you attempt to mount them?
 
Old 03-01-2021, 03:54 PM   #3
boyturtle
LQ Newbie
 
Registered: Mar 2021
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by berndbausch View Post
What do you mean by "lost the drives"? What happens when you attempt to mount them?
After restart, nothing is mounted on the network shares; so the previously populated mount point is empty. Running sudo mount-a after the restart does not mount the network drives either.
 
Old 03-01-2021, 07:08 PM   #4
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
What happens when you mount them manually, e.g.
Code:
mount -t cifs -o vers=1.0,... //192.168.52.170/Admin /home/ServerAdmin
IP addresses in /etc/fstab cause problems when the network is not up at mount time, but this doesn't seem to be your case, since mount -a on the command line also doesn't seem to work.
 
Old 03-02-2021, 09:02 AM   #5
boyturtle
LQ Newbie
 
Registered: Mar 2021
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by berndbausch View Post
What happens when you mount them manually, e.g.
Running the following command
Code:
sudo mount -v -t cifs -o vers=1.0,uid=boyturtle,gid=boyturtle,credentials=/home/boyturtle/.smbcredentials,iocharset=utf8 //192.168.52.170/Admin /home/boyturtle/ServerAdmin
generates the following output
Code:
Credential formatted incorrectly: boyturtle
Credential formatted incorrectly: ********
Credential formatted incorrectly: (null)
When I run the command without the credentials element being present
Code:
sudo mount -v -t cifs //192.168.52.170/Admin /home/boyturtle/ServerAdmin
I get the following output, regardless which credentials I use, my own or root.
Code:
Password for root@//192.168.52.170/Admin:  (no echo)               
mount.cifs kernel mount options: ip=192.168.52.170,unc=\\192.168.52.170\Admin,user=root,pass=********
mount error(13): Permission denied
I'm confused as to why I am getting these errors now, after link aggregation, but that everything worked before this was in place?
 
Old 03-02-2021, 10:24 AM   #6
boyturtle
LQ Newbie
 
Registered: Mar 2021
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by boyturtle View Post
Running sudo mount-a after the restart does not mount the network drives either.
Woops. My bad. Running sudo mount -a does work after all, I missed something after all. It appears that fstab is running before the network is fully up. Have you any suggestions on how to add a delay until the network is fully up? I've tried adding _netdev to the mount options in /etc/fstab to the entries fix this problem, this didn't fix it.
 
Old 03-02-2021, 08:54 PM   #7
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
My memory is blurred, but I don't think _netdev works in conjunction with CIFS. Here is a lateral thinking solution: Use the automounter to avoid attempts to mount the filesystem pre-network: https://serverfault.com/questions/72...en-with-netdev.

This is confusing. According to the manual page, systemd should mount network-based filesystems only when the network is up. I don't understand why it sometimes doesn't work.

Last edited by berndbausch; 03-02-2021 at 08:59 PM. Reason: Added reference to systemd.mount manual page
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Aggregate Optimization & Tuning Part I LXer Syndicated Linux News 0 03-28-2006 04:21 PM
c++ initialization lists (error, non aggregate type) Que? byteframe Programming 2 12-15-2005 06:58 PM
Postgresql aggregate text functions - concatenation, merge rjlee Programming 0 07-13-2005 04:10 PM
Hi dakensta- one more problem- "Not an aggregate type" ashwinipahuja Programming 3 04-30-2004 06:42 AM
"Not an aggregate type"- Error in g++ ashwinipahuja Programming 2 04-26-2004 06:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration