Hi list,
I've installed C8 on my workstation. I configured my network devices (two bridges, two nics) using nmcli. Now that NM is the default I tried it. On C7 I always disabled it.
I noticed some problem:
1) During the boot, also if NetworkManager-wait-online.service status is OK, I noticed that opening a terminal and ping some address it needs some time to perform ping and any operation on a network connection. So seems that in the first 30sec/1min there isn't an available network connection. After this time if I run a ping or whatever network is available.
2) Due to the problem 1, It cannot mount samba shares on boot saying "Not suitable address found". After the network is available I can mount samba shares.
3) I noticed that with NetworkManager a bridge must have an address. If I don't specify an address for the bridge, NM will try to assign some address, enable the connection forever (reporting errors in messages and on notification bar).
4) NetworkManager-wait-online slow down boot time and network availability.
To solve this problem I installed network-scripts and disabled NetworkManager but I don't understand why NetworkManager need so much time to enable a connection.
Can someone point me in the right direction?
Thanks in advance.
--On Wednesday, November 20, 2019 10:37 AM +0100 Alessandro Baggi alessandro.baggi@gmail.com wrote:
- Due to the problem 1, It cannot mount samba shares on boot saying "Not
suitable address found". After the network is available I can mount samba shares.
Are the shares mounted as systemd mount or automount units that wait for networking?
https://www.freedesktop.org/software/systemd/man/systemd.automount.html
Il 20/11/19 12:29, Kenneth Porter ha scritto:
--On Wednesday, November 20, 2019 10:37 AM +0100 Alessandro Baggi alessandro.baggi@gmail.com wrote:
- Due to the problem 1, It cannot mount samba shares on boot saying
"Not suitable address found". After the network is available I can mount samba shares.
Are the shares mounted as systemd mount or automount units that wait for networking?
https://www.freedesktop.org/software/systemd/man/systemd.automount.html
Really I don't know, I can say that they have an entry in fstab and I have several mnt-share.mount unit as generated.
On Nov 20, 2019, at 06:45, Alessandro Baggi alessandro.baggi@gmail.com wrote:
Il 20/11/19 12:29, Kenneth Porter ha scritto:
--On Wednesday, November 20, 2019 10:37 AM +0100 Alessandro Baggi alessandro.baggi@gmail.com wrote:
- Due to the problem 1, It cannot mount samba shares on boot saying "Not
suitable address found". After the network is available I can mount samba shares.
Are the shares mounted as systemd mount or automount units that wait for networking? https://www.freedesktop.org/software/systemd/man/systemd.automount.html
Really I don't know, I can say that they have an entry in fstab and I have several mnt-share.mount unit as generated.
For the .mount units, you could make them run after the network-waits-online service, thus making sure that they only mount after a stable network is up. Adding _netdev to the fstab mount options also does that, I think.
The best solution I’ve found for this issue is to use .automount units for every network .mount unit. It will only mount the volume when it’s actually read or written to, which might be well after the boot, and uncounted it after inactivity. It prevents stale mounts if the file server reboots or dies too.
-- Jonathan Billings billings@negate.org
Once upon a time, Alessandro Baggi alessandro.baggi@gmail.com said:
Really I don't know, I can say that they have an entry in fstab and I have several mnt-share.mount unit as generated.
Are the fstab entries marked "_netdev"?
Il 20/11/19 14:44, Chris Adams ha scritto:
Once upon a time, Alessandro Baggi alessandro.baggi@gmail.com said:
Really I don't know, I can say that they have an entry in fstab and I have several mnt-share.mount unit as generated.
Are the fstab entries marked "_netdev"?
No
--On Wednesday, November 20, 2019 12:45 PM +0100 Alessandro Baggi alessandro.baggi@gmail.com wrote:
Really I don't know, I can say that they have an entry in fstab and I have several mnt-share.mount unit as generated.
fstab is no longer parsed directly by the mount command at boot time. Since C7, when systemd was introduced, it's now parsed by systemd to create unit files. It's a transition mechanism. I recommend converting all the mounts not created by the installer to permanent real unit files so you can use all the power of unit syntax. (How does systemd know the difference between generated files and hand-crafted ones? Can one just remove the fstab entry once the generated one is present? That would make migration easier.)
Read up on what systemd does with fstab:
https://www.freedesktop.org/software/systemd/man/systemd-fstab-generator.html
On Nov 20, 2019, at 16:17, Kenneth Porter shiva@sewingwitch.com wrote: (How does systemd know the difference between generated files and hand-crafted ones? Can one just remove the fstab entry once the generated one is present? That would make migration easier.)
Mount units created by the systemd generator are dynamically created each boot. You can create a persistent one in /etc/systemd/system to override the dynamic one from fstab.
-- Jonathan Billings billings@negate.org
--On Wednesday, November 20, 2019 4:51 PM -0500 Jonathan Billings billings@negate.org wrote:
On Nov 20, 2019, at 16:17, Kenneth Porter shiva@sewingwitch.com wrote: (How does systemd know the difference between generated files and hand-crafted ones? Can one just remove the fstab entry once the generated one is present? That would make migration easier.)
Mount units created by the systemd generator are dynamically created each boot. You can create a persistent one in /etc/systemd/system to override the dynamic one from fstab.
Where does it put the dynamic ones? I've never gone down that rabbit hole...
Ok, I braved the rabbit hole and found it puts them in a subdirectory of /run/systemd, a volatile filesystem recreated at boot time. So one could copy the generated file to /etc/systemd/system which has higher priority than the generated files and thereby make them permanent. One then removes the fstab entry.
https://www.freedesktop.org/software/systemd/man/systemd.generator.html
My sense is that static, simple mounts for which drivers are present at boot time are best placed in fstab, and more complex dynamic mounts like network mounts are best placed in units.
Once upon a time, Alessandro Baggi alessandro.baggi@gmail.com said:
- I noticed that with NetworkManager a bridge must have an address.
If I don't specify an address for the bridge, NM will try to assign some address, enable the connection forever (reporting errors in messages and on notification bar).
Do you have the device configured to not configure IP? From the CLI, do "nmcli con mod <device> ipv4.method disabled ipv6.method ignore".
Il 20/11/19 14:46, Chris Adams ha scritto:
Once upon a time, Alessandro Baggi alessandro.baggi@gmail.com said:
- I noticed that with NetworkManager a bridge must have an address.
If I don't specify an address for the bridge, NM will try to assign some address, enable the connection forever (reporting errors in messages and on notification bar).
Do you have the device configured to not configure IP? From the CLI, do "nmcli con mod <device> ipv4.method disabled ipv6.method ignore".
I have only configured br1 to have a manual method for ipv4.address. This is different from having method disabled?
Hi list,
I've installed C8 on my workstation. I configured my network devices (two bridges, two nics) using nmcli. Now that NM is the default I tried it. On C7 I always disabled it.
I noticed some problem:
- During the boot, also if NetworkManager-wait-online.service status is
OK, I noticed that opening a terminal and ping some address it needs some time to perform ping and any operation on a network connection. So seems that in the first 30sec/1min there isn't an available network connection. After this time if I run a ping or whatever network is available.
- Due to the problem 1, It cannot mount samba shares on boot saying
"Not suitable address found". After the network is available I can mount samba shares.
- I noticed that with NetworkManager a bridge must have an address. If
I don't specify an address for the bridge, NM will try to assign some address, enable the connection forever (reporting errors in messages and on notification bar).
- NetworkManager-wait-online slow down boot time and network
availability.
To solve this problem I installed network-scripts and disabled NetworkManager but I don't understand why NetworkManager need so much time to enable a connection.
Can someone point me in the right direction?
I don't know C8 or smbmount but on C7 with nfs, I had to add this to the fstab options to make it works as expected:
x-systemd.requires=network-online.target
Maybe something similar is needed in your situation.
Regards, Simon