View previous topic :: View next topic |
Author |
Message |
Spanik Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 12 Dec 2003 Posts: 1014 Location: Belgium
|
Posted: Tue Jun 07, 2022 6:52 am Post subject: mounting nas at boot? (SOLVED) |
|
|
I added a NAS (Qnap TS-453 Pro) to my system. The intention is to use it as a "fileserver". It sits on a fixed IP adress
I followed the NFS wiki:
- nfs was already in the kernel as I intended to use the nas last kernel update
- emerged nfs-utils
- added nfsclient to runlevel default
- made a mount point /mnt/nas
After a reboot I could mount the NAS as root with "mount W.X.Y.Z:/Public /mnt/nas" and see the content. I changed ownership of /mnt/nas to my user/group and then I could also write files to it.
I then added the nas to fstab:
Code: | W.X.Y.Z:/Public /mnt/nas nfs noatime,rw,exec,suid,_netdev 0 0 |
When I boot the pc now and I go to /mnt/nas I get an empty folder. In dmesg I find the following:
Code: | [ 0.627827] NET: Registered PF_INET protocol family
[ 0.628100] IP idents hash table entries: 262144 (order: 9, 2097152 bytes, vmalloc)
[ 0.630132] tcp_listen_portaddr_hash hash table entries: 32768 (order: 7, 524288 bytes, vmalloc)
[ 0.630292] TCP established hash table entries: 524288 (order: 10, 4194304 bytes, vmalloc)
[ 0.630930] TCP bind hash table entries: 65536 (order: 8, 1048576 bytes, vmalloc)
[ 0.631047] TCP: Hash tables configured (established 524288 bind 65536)
[ 0.631162] UDP hash table entries: 32768 (order: 8, 1048576 bytes, vmalloc)
[ 0.631308] UDP-Lite hash table entries: 32768 (order: 8, 1048576 bytes, vmalloc)
[ 0.631533] NET: Registered PF_UNIX/PF_LOCAL protocol family
[ 0.631800] RPC: Registered named UNIX socket transport module.
[ 0.631803] RPC: Registered udp transport module.
[ 0.631806] RPC: Registered tcp transport module.
[ 0.631807] RPC: Registered tcp NFSv4.1 backchannel transport module.
.....
[ 0.745660] NFS: Registering the id_resolver key type
[ 0.745676] Key type id_resolver registered
[ 0.745678] Key type id_legacy registered |
If I mount the nas as root all is OK. I can read and write to the nas. So something must be wrong with the fstab or the config of the nas.
Another thing I do not understand is that to mount the nas I have to be root. But root (as defined on the pc) is not known on the nas. How can the nas then verify the right user is connecting? _________________ Expert in non-working solutions
Last edited by Spanik on Fri Jun 10, 2022 1:29 pm; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Hu Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
Joined: 06 Mar 2007 Posts: 23082
|
Posted: Tue Jun 07, 2022 1:48 pm Post subject: Re: mounting nas at boot? |
|
|
Spanik wrote: | If I mount the nas as root all is OK. I can read and write to the nas. So something must be wrong with the fstab or the config of the nas. | Is your system configured to mount network filesystems at boot? For openrc, I think this would be through the netmount init script. Spanik wrote: | Another thing I do not understand is that to mount the nas I have to be root. But root (as defined on the pc) is not known on the nas. How can the nas then verify the right user is connecting? | The NAS does not care who mounts it. The local kernel cares that you do not have arbitrary users mounting filesystems, neither local nor remote, without permission from the local root user. root obviously has permission from itself to mount filesystems. It can delegate that to other users with an fstab entry marking the filesystem as safe for users to mount. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Spanik Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 12 Dec 2003 Posts: 1014 Location: Belgium
|
Posted: Tue Jun 07, 2022 5:48 pm Post subject: Re: mounting nas at boot? |
|
|
[quote="Hu"]Is your system configured to mount network filesystems at boot? For openrc, I think this would be through the netmount init script.
To be honest, I have no idea. I followed the wiki. And from what I understand of what I found on the net, then adding "_netdev" in the fstab should make that this nfs drive is only mounted after the network has started. Everywhere I read it says this should do it. But it obviously does not mount the nas at boot. I looked at that script but I don't understand a single thing about it. Do I have to change it?
Could it be that the nas has gone to sleep and that it takes too long to wake? If so, then how can you tell fstab to wait x time?
Hu wrote: | The NAS does not care who mounts it. The local kernel cares that you do not have arbitrary users mounting filesystems, neither local nor remote, without permission from the local root user. root obviously has permission from itself to mount filesystems. It can delegate that to other users with an fstab entry marking the filesystem as safe for users to mount. |
Ok. But I assumed that fstab would run with the root privileges. Otherwise it would not be able to mount anything. Or am I seeing that wrongly?
But I really would like this to be mounted at boot, not requiring any extra intervention from the user (me in this case). _________________ Expert in non-working solutions |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Hu Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
Joined: 06 Mar 2007 Posts: 23082
|
Posted: Tue Jun 07, 2022 5:57 pm Post subject: |
|
|
What Wiki did you follow? Neither of your posts in this thread links to a Wiki page, so I cannot readily follow along to see what you did.
I asked if you have netmount enabled. If you don't know, you should check. That could be the explanation. On OpenRC systems, the netmount init script is responsible for mounting filesystems marked as _netdev in /etc/fstab. If you have not enabled that init script, then nothing will attempt to mount these for you.
If the NAS were asleep, but the system were attempting to mount the filesystem, you should get an error message when the mount times out. Do you?
fstab is a configuration file, so it never runs at all. Many tools that change system state based on what they find in /etc/fstab are run with root privilege, but those tools typically only act if authorized by root, either directly by having been started with a real uid of root, or indirectly by finding an annotation in fstab, such as users, that says root intends for unprivileged users to be able to act. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
alamahant Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
Joined: 23 Mar 2019 Posts: 3949
|
Posted: Tue Jun 07, 2022 6:14 pm Post subject: |
|
|
Try enabling nfsclient and network
Code: |
rc-update add net.<> default
rc-update add nfsclient default
|
from your dmesg
Code: |
RPC: Registered tcp NFSv4.1 backchannel transport module
|
it seems it is trying to mount the share as nfs vers4.1.
For that you need rpc.idmapd.
Edit
/etc/conf.d/nfsclient
like
Code: |
c_need="!rpc.statd rpc.idmapd"
|
and /etc/idmapd.conf like
Code: |
[Mapping]
Nobody-User = nobody
Nobody-Group = nobody
|
_________________
![Smile :)](images/smiles/icon_smile.gif)
Last edited by alamahant on Tue Jun 07, 2022 6:37 pm; edited 2 times in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Spanik Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 12 Dec 2003 Posts: 1014 Location: Belgium
|
Posted: Tue Jun 07, 2022 6:27 pm Post subject: |
|
|
Hu wrote: | What Wiki did you follow? Neither of your posts in this thread links to a Wiki page, so I cannot readily follow along to see what you did. |
This is what I followed: https://wiki.gentoo.org/wiki/Nfs-utils I do not have systemd or Kerberos.
Hu wrote: | I asked if you have netmount enabled. If you don't know, you should check. That could be the explanation. On OpenRC systems, the netmount init script is responsible for mounting filesystems marked as _netdev in /etc/fstab. If you have not enabled that init script, then nothing will attempt to mount these for you. |
I see these services:
Code: | rc-service --list
agetty
binfmt
bootlogd
bootmisc
cgroups
consolefont
cronie
cups-browsed
cupsd
dbus
devfs
device-mapper
dhcpcd
display-manager
display-manager-setup
dmcrypt
dmesg
dmeventd
elogind
fancontrol
fsck
fuse
gpm
gpsd
hostname
hwclock
ip6tables
iptables
keymaps
killprocs
kmod-static-nodes
lm_sensors
local
localmount
loopback
lvm
lvm-monitoring
lvmetad
lvmpolld
mit-krb5kadmind
mit-krb5kdc
mit-krb5kpropd
modules
motion
mount-ro
mtab
net-online
net.eno1
net.eno2
net.lo
netmount
nfs
nfsclient
nfsmount
ntp-client
ntpd
nullmailer
numlock
osclock
pciparm
procfs
pydoc-3.10
pydoc-3.9
root
rpc.idmapd
rpc.pipefs
rpc.statd
rpcbind
rsyncd
runsvdir
s6-svscan
samba
save-keymaps
save-termencoding
savecache
serial
smartd
sntp
sshd
stmpfiles-dev
stmpfiles-setup
swap
swclock
sysctl
sysfs
sysklogd
termencoding
udev
udev-settle
udev-trigger
urandom
virtualbox-guest-additions
xdm
|
and
Code: | rc-update
binfmt | boot
bootmisc | boot
cgroups | sysinit
cronie | default
dbus | default
devfs | sysinit
dhcpcd | default
dmesg | sysinit
fsck | boot
hostname | boot
hwclock | boot
keymaps | boot
killprocs | shutdown
kmod-static-nodes | sysinit
local | default nonetwork
localmount | boot
loopback | boot
modules | boot
mount-ro | shutdown
mtab | boot
net.eno1 | default
net.eno2 | default
netmount | default
nfs | default
nfsclient | default
ntp-client | default
procfs | boot
root | boot
save-keymaps | boot
save-termencoding | boot
savecache | shutdown
sshd | default
stmpfiles-dev | sysinit
stmpfiles-setup | boot
swap | boot
sysctl | boot
sysfs | sysinit
sysklogd | default
termencoding | boot
udev | sysinit
udev-trigger | sysinit
urandom | boot
virtualbox-guest-additions | default |
So I think netmount is running.
Quote: | If the NAS were asleep, but the system were attempting to mount the filesystem, you should get an error message when the mount times out. Do you? |
I see an error before logging in but I cannot find it back in any log. There is nothing in dmesg except that nfs has registered the key. I took a literate screenshot:https://quirinus.one/gentoo/screenshot_nfs.jpg When I want to access /mnt/log with Dolphin I get:
Code: | An error occurred while accessing '/mnt/nas', the system responded: mount.nfs: failed to prepare mount: Operation not permitted |
Quote: | fstab is a configuration file, so it never runs at all. Many tools that change system state based on what they find in /etc/fstab are run with root privilege, but those tools typically only act if authorized by root, either directly by having been started with a real uid of root, or indirectly by finding an annotation in fstab, such as users, that says root intends for unprivileged users to be able to act. |
Ok. _________________ Expert in non-working solutions |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Spanik Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 12 Dec 2003 Posts: 1014 Location: Belgium
|
Posted: Tue Jun 07, 2022 6:41 pm Post subject: |
|
|
This came while typing the previous reply.
alamahant wrote: | Try enabling nfsclient and network
Code: |
rc-update add net.<> default
rc-update add nfsclient default
|
|
As above, they are running. At least that is how I read what I get back from rc-update.
alamahant wrote: | try modifying fstab to
Code: |
W.X.Y.Z:/Public /mnt/nas nfs uid=1000,gid=1000,noatime,rw,exec,suid,_netdev 0 0
or
W.X.Y.Z:/Public /mnt/nas nfs uid=65534,gid=65534,noatime,rw,exec,suid,_netdev 0 0[/quote]
Neither of these made a difference.
[quote="alamahant"] |
from your dmesg
Code: |
RPC: Registered tcp NFSv4.1 backchannel transport module
|
it seems it is trying to mount the share as nfs vers4.1.
For that you need rpc.idmapd.
Edit
/etc/conf.d/nfsclient
like
Code: |
c_need="!rpc.statd rpc.idmapd"
|
and /etc/idmapd.conf like
Code: |
[Mapping]
Nobody-User = nobody
Nobody-Group = nobody
|
|
Now how do I know if I have to use nfsv4.1? When I go into the config of the NAS I only have an entry to "enable nfs", not choosing what version to use. and /etc/conf.d/nfsclient says to leave it alone if you do not know what version to use. Can't nfs_client work out itself what version to use? _________________ Expert in non-working solutions |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
alamahant Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
Joined: 23 Mar 2019 Posts: 3949
|
Posted: Tue Jun 07, 2022 6:51 pm Post subject: |
|
|
Quote: |
Now how do I know if I have to use nfsv4.1? When I go into the config of the NAS I only have an entry to "enable nfs", not choosing what version to use
|
Yes you are right.
Also the uid=1000,gid=1000 options dont seem to be available anymore.
Sorry for any confusion.
You can try nfsstat to deduce server nfs protocol
Code: |
nfsstat --server <ip-of-nas>
|
Plz see this
https://www.qnap.com/en-us/how-to/knowledge-base/article/how-to-enable-and-setup-host-access-for-nfs-connection
use your nas control panel to set nfs version and perms. _________________
![Smile :)](images/smiles/icon_smile.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Spanik Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 12 Dec 2003 Posts: 1014 Location: Belgium
|
Posted: Tue Jun 07, 2022 7:58 pm Post subject: |
|
|
I'll try tomorrow. Probably I'll have to check if I need an update to the nas for those settings. I do not have the choice between versions, only an "enable".
Thanks so far to you all for the suggestions. _________________ Expert in non-working solutions |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Spanik Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 12 Dec 2003 Posts: 1014 Location: Belgium
|
Posted: Thu Jun 09, 2022 12:57 pm Post subject: |
|
|
Ok, I had to update the nas to get V4 working. It is now set. I also checked the access richts of the /Public and those are ok.
Code: | # nfsstat --server 192.168.2.6
Error: No Server Stats (/proc/net/rpc/nfsd: No such file or directory). |
And it doesn't work at boot either. I I try to mount it as root I get:
Code: | # mount /mnt/nas
mount.nfs: an incorrect mount option was specified
# mount -t nfs 192.168.2.6:/Public /mnt/nas |
So it looks as if one of the options I have in fstab isn't ok for mount.nfs _________________ Expert in non-working solutions
Last edited by Spanik on Thu Jun 09, 2022 1:22 pm; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
alamahant Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
Joined: 23 Mar 2019 Posts: 3949
|
Posted: Thu Jun 09, 2022 1:00 pm Post subject: |
|
|
Plz remove from fstab nfs mount
Code: |
uid=65534,gid=65534,
or
uid=1000,gid=1000,
|
If you have them.
I had mentioned above adding these was my mistake as they are non existent mount options(any more?) _________________
![Smile :)](images/smiles/icon_smile.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Spanik Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 12 Dec 2003 Posts: 1014 Location: Belgium
|
Posted: Thu Jun 09, 2022 1:13 pm Post subject: |
|
|
alamahant wrote: | Plz remove from fstab nfs mount
Code: |
uid=65534,gid=65534,
or
uid=1000,gid=1000,
|
If you have them.
I had mentioned above adding these was my mistake as they are non existent mount options(any more?) |
They are removed so it isn't that.
I was looking now at what is shown when booting. Sadly I cannot find it in a log so I'm typing it over from a photo:
Code: | * Starting NFS sm-notify ...
* Mounting network filesystems ...
mount.nfs: Network is unreachable
* Could not mount all network filesystems
* Starting NFS mountd ...
* Starting NFS daemon ...
rpc.nfsd: Unable to access /proc/fs/nfsd errno 2 (No such file or directory).
Please try, as root, 'mount -t nfsd nfsd /proc/fs/nfsd' and then restart.nfsd to correct the problem
* Starting NFS smnotify ...
* ERROR: nfs failed to start
* Starting sshd ... |
So I'm now going to try what is says in that line "Please try, as root....". I'll come back then.
EDIT:
Code: | # mount -t nfsd nfsd /proc/fs/nfsd
mount: /proc/fs/nfsd: unknown filesystem type 'nfsd'. |
So this doesn't help either. _________________ Expert in non-working solutions |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
alamahant Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
Joined: 23 Mar 2019 Posts: 3949
|
Posted: Thu Jun 09, 2022 1:23 pm Post subject: |
|
|
Code: |
* Starting NFS sm-notify ...
* Mounting network filesystems ...
mount.nfs: Network is unreachable
* Could not mount all network filesystems
* Starting NFS mountd ...
* Starting NFS daemon ...
rpc.nfsd: Unable to access /proc/fs/nfsd errno 2 (No such file or directory).
Please try, as root, 'mount -t nfsd nfsd /proc/fs/nfsd' and then restart.nfsd to correct the problem
* Starting NFS smnotify ...
* ERROR: nfs failed to start
* Starting sshd ...
|
you are in your client so you shouldnt normally need nfsd.
Plz run
Code: |
rc-update delete nfs default
rc-update add nfsclient default
rc-update add net.<your iface> default
|
It complains
Code: |
mount.nfs: Network is unreachable
|
_________________
![Smile :)](images/smiles/icon_smile.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Spanik Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 12 Dec 2003 Posts: 1014 Location: Belgium
|
Posted: Thu Jun 09, 2022 1:42 pm Post subject: |
|
|
I removed nfs from level default and the error about rpc.nfsd is now gone. But still the error about mounting the nas.
Both network interfaces and dhcpcd are up right after entering runlevel 3, before the system tries to mount the nas. See screenphoto:
https://quirinus.one/gentoo/screenshot_nfs_2.jpg
You can see that interface eno1 has received an IP address. _________________ Expert in non-working solutions |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
alamahant Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
Joined: 23 Mar 2019 Posts: 3949
|
Posted: Thu Jun 09, 2022 1:47 pm Post subject: |
|
|
This is the problem in fstab
Code: |
W.X.Y.Z:/Public /mnt/nas nfs noatime,rw,exec,suid,_netdev 0 0
|
plz change it to
Code: |
W.X.Y.Z:/Public /mnt/nas nfs rw,defaults 0 0
or
W.X.Y.Z:/Public /mnt/nas nfs rw,suid,_netdev 0 0
|
_________________
![Smile :)](images/smiles/icon_smile.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Spanik Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 12 Dec 2003 Posts: 1014 Location: Belgium
|
Posted: Thu Jun 09, 2022 2:11 pm Post subject: |
|
|
alamahant wrote: |
plz change it to
Code: |
W.X.Y.Z:/Public /mnt/nas nfs rw,defaults 0 0
or
W.X.Y.Z:/Public /mnt/nas nfs rw,suid,_netdev 0 0
|
|
I tried both version but it continues to complain about "network unreachable". _________________ Expert in non-working solutions |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
alamahant Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
Joined: 23 Mar 2019 Posts: 3949
|
Posted: Thu Jun 09, 2022 2:27 pm Post subject: |
|
|
You get in your rc.log a
failure of name resolution.
What is the contents of
/etc/resolv.conf?
This should not matter as in fstab you used an ip for your nas server no?
Like
Code: |
192.168.2.6:/Public /mnt/nas nfs rw,defaults 0 0
|
_________________
![Smile :)](images/smiles/icon_smile.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Spanik Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 12 Dec 2003 Posts: 1014 Location: Belgium
|
Posted: Thu Jun 09, 2022 2:40 pm Post subject: |
|
|
alamahant wrote: | You get in your rc.log a
failure of name resolution.
What is the contents of
/etc/resolv.conf?
This should not matter as in fstab you used an ip for your nas server no?
Like
Code: |
192.168.2.6:/Public /mnt/nas nfs rw,defaults 0 0
|
|
resolv.conf
Code: | # Generated by dhcpcd from eno1.dhcp, eno1.dhcp6, eno1.ra
# /etc/resolv.conf.head can replace this line
domain lan
nameserver 192.168.2.1
nameserver fd10:3da9:ee3::1
# /etc/resolv.conf.tail can replace this line |
ipv6 is enable in the nas as well and the switch in between supports it.
Yes, I use an IP address in fstab
Code: | # /etc/fstab: static file system information.
#
# noatime turns off atimes for increased performance (atimes normally aren't
# needed); notail increases performance of ReiserFS (at the expense of storage
# efficiency). It's safe to drop the noatime options if you want and to
# switch between notail / tail freely.
#
# The root filesystem should have a pass number of either 0 or 1.
# All other filesystems should have a pass number of 0 or greater than 1.
#
# See the manpage fstab(5) for more information.
#
# <fs> <mountpoint> <type> <opts> <dump/pass>
# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
#
# NOTE: Even though we list ext4 as the type here, it will work with ext2/ext3
# filesystems. This just tells the kernel to use the ext4 driver.
#
# NOTE: You can use full paths to devices like /dev/sda3, but it is often
# more reliable to use filesystem labels or UUIDs. See your filesystem
# documentation for details on setting a label. To obtain the UUID, use
# the blkid(8) command.
#LABEL=boot /boot ext4 noauto,noatime 1 2
#UUID=58e72203-57d1-4497-81ad-97655bd56494 / ext4 noatime 0 1
#LABEL=swap none swap sw 0 0
#/dev/cdrom /mnt/cdrom auto noauto,ro 0 0
PARTUUID=4d06bb89-cbf7-d84c-9ee1-fa1ce078ee01 /boot vfat noauto,noatime 1 2
UUID=076be15c-015b-4bd6-8c2a-a8a9ecd5ddca none swap sw 0 0
UUID=96d663c8-081a-4834-8766-1acca3cde0a2 / xfs noatime 0 1
UUID=5961004a-94f5-4c20-9746-7c721d22e6ec /mnt/main_data xfs noatime,rw,exec,suid 0 1
UUID=94063aea-cfd4-4f05-9228-f10ba1c08ae2 /mnt/rommel xfs noatime,rw,exec,suid 0 1
UUID=cf9c0169-59c9-4c28-9d8c-d7a77b3897ca /mnt/mail xfs noatime,rw,exec,suid 0 1
UUID=377e334b-7a76-43f2-b5a9-587cd1caabed /mnt/virt_xp xfs noatime,rw,exec,suid 0 1
192.168.2.6:/Public /mnt/nas nfs rw,defaults 0 0 |
_________________ Expert in non-working solutions |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
alamahant Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
Joined: 23 Mar 2019 Posts: 3949
|
Posted: Thu Jun 09, 2022 2:44 pm Post subject: |
|
|
Is this a VirtualBox VM?
If yes what kind of net adapter have you assigned to it?
NAT or bridged? _________________
![Smile :)](images/smiles/icon_smile.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
alamahant Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
Joined: 23 Mar 2019 Posts: 3949
|
Posted: Thu Jun 09, 2022 2:54 pm Post subject: |
|
|
OK you have 2 ifaces eno1 and eno2.
Both get ip and default gateway and dns indo from dhcp.
This is the problem.
Just remove one of the two.
You can not have two ifaces in the same LAN being asigned a default gateway.
It will block the network.
So either remove one of them or configure it to not get default gateway assigned. _________________
![Smile :)](images/smiles/icon_smile.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Spanik Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 12 Dec 2003 Posts: 1014 Location: Belgium
|
Posted: Thu Jun 09, 2022 3:15 pm Post subject: |
|
|
alamahant wrote: | Is this a VirtualBox VM?
If yes what kind of net adapter have you assigned to it?
NAT or bridged? |
I do not follow this. the Gentoo is the only OS on the pc. There are VM's, but those are not running (and are not intended to be connected to the nas).
alamahant wrote: | OK you have 2 ifaces eno1 and eno2.
Both get ip and default gateway and dns indo from dhcp.
This is the problem.
Just remove one of the two.
You can not have two ifaces in the same LAN being asigned a default gateway.
It will block the network.
So either remove one of them or configure it to not get default gateway assigned. |
Both interfaces are physical interfaces on the motherboard. At this moment, only eno1 is connected to the switch. So I do not understand why it is listed as "received address". If I run ifconfig
Code: | ifconfig
bond0: flags=5123<UP,BROADCAST,MASTER,MULTICAST> mtu 1500
ether 6a:13:f3:25:4b:f8 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.2.11 netmask 255.255.255.0 broadcast 192.168.2.255
inet6 fe80::899b:f866:bf0d:8c8a prefixlen 64 scopeid 0x20<link>
inet6 fd10:3da9:ee3:0:4cd3:388:7e82:4881 prefixlen 64 scopeid 0x0<global>
inet6 2a02:a03f:610b:1300:a9ce:3fd5:6c09:1931 prefixlen 64 scopeid 0x0<global>
ether ac:1f:6b:ad:42:d2 txqueuelen 1000 (Ethernet)
RX packets 84943 bytes 98916117 (94.3 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 41969 bytes 8414356 (8.0 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device memory 0xef800000-ef87ffff
eno2: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether ac:1f:6b:ad:42:d3 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device memory 0xef700000-ef77ffff
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 14 bytes 1116 (1.0 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 14 bytes 1116 (1.0 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
|
I'm a bit confused about the "bond0" entry. The idea was to connect both interfaces to the switch as a bonded interface. Likewise the nas and the switch can be set for bonding as well. But I never did this because I never started the nas (it sat for years unused under my desk).
I'll remove net.eno2 from default and see what that gives. _________________ Expert in non-working solutions |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
alamahant Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
Joined: 23 Mar 2019 Posts: 3949
|
Posted: Thu Jun 09, 2022 4:01 pm Post subject: |
|
|
Quote: |
alamahant wrote:
Is this a VirtualBox VM?
If yes what kind of net adapter have you assigned to it?
NAT or bridged?
I do not follow this. the Gentoo is the only OS on the pc. There are VM's, but those are not running (and are not intended to be connected to the nas).
|
Then why do you have virtualbox-guest additions failing to initialize in your rc.log?
They are meant for the guest NOT the host. _________________
![Smile :)](images/smiles/icon_smile.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Spanik Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 12 Dec 2003 Posts: 1014 Location: Belgium
|
Posted: Thu Jun 09, 2022 5:32 pm Post subject: |
|
|
alamahant wrote: | Quote: |
alamahant wrote:
Is this a VirtualBox VM?
If yes what kind of net adapter have you assigned to it?
NAT or bridged?
I do not follow this. the Gentoo is the only OS on the pc. There are VM's, but those are not running (and are not intended to be connected to the nas).
|
Then why do you have virtualbox-guest additions failing to initialize in your rc.log?
They are meant for the guest NOT the host. |
Yes, I never get to understanding the wiki on installing it. Sorry. There is other stuff likewise, like nfsd... _________________ Expert in non-working solutions |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
NeddySeagoon Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
![](images/avatars/3946266373f47d606a2db3.jpg)
Joined: 05 Jul 2003 Posts: 54817 Location: 56N 3W
|
Posted: Thu Jun 09, 2022 7:21 pm Post subject: |
|
|
Spanik,
I use Code: | # DVD Collection Read Only
192.168.100.55:/mnt/mediatomb /mnt/media nfs sync,hard,intr,ro,nolock,vers=3 0 0 |
I could not get nfs version 4 to work ro,nolock are safe together. If you want a rw mount, you must have locking.
Your bond0 and an interface with an IP address makes me raise an eyebrow.
To make a bond work, you donate interfaces to the bond before they are configured, then the bond gets configured as if it were a physical interface.
I don't think any of this will fix your network error though.
What do you have in /etc/rc.conf for
Code: | # Do we allow any started service in the runlevel to satisfy the dependency
# or do we want all of them regardless of state? For example, if net.eth0
# and net.eth1 are in the default runlevel then with rc_depend_strict="NO"
# both will be started, but services that depend on 'net' will work if either
# one comes up. With rc_depend_strict="YES" we would require them both to
# come up.
#rc_depend_strict="YES" |
Its worth a try with Code: | rc_depend_strict="NO"[ |
With your rc.conf Code: | net.eno1
net.eno2
net.lo | the default is to require all three interfaces to be up before the network is considered up.
With eno2 not connected, that's not going to happen. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Spanik Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 12 Dec 2003 Posts: 1014 Location: Belgium
|
Posted: Fri Jun 10, 2022 10:44 am Post subject: |
|
|
I started with this one
Quote: | Code: | net.eno1
net.eno2
net.lo | the default is to require all three interfaces to be up before the network is considered up.
With eno2 not connected, that's not going to happen. |
I removed net.eno2 from the default startup but no difference. The reason both interfaces start are because this board has 2 ethernet interfaces and when installing from the live cd it names the interfaces differently. So I start both of them.
NeddySeagoon wrote: | I use Code: | # DVD Collection Read Only
192.168.100.55:/mnt/mediatomb /mnt/media nfs sync,hard,intr,ro,nolock,vers=3 0 0 |
I could not get nfs version 4 to work ro,nolock are safe together. If you want a rw mount, you must have locking. |
It makes no difference with those settings. Tried with the _netdev as well but again, the same error.
Quote: | Your bond0 and an interface with an IP address makes me raise an eyebrow.
To make a bond work, you donate interfaces to the bond before they are configured, then the bond gets configured as if it were a physical interface.
I don't think any of this will fix your network error though. |
I have no idea where that bond comes from. As I wrote, it was my intention to use that when I installed the pc. So I probably activated something in the kernel for it. But there it stopped.
Quote: | What do you have in /etc/rc.conf for
Code: | # Do we allow any started service in the runlevel to satisfy the dependency
# or do we want all of them regardless of state? For example, if net.eth0
# and net.eth1 are in the default runlevel then with rc_depend_strict="NO"
# both will be started, but services that depend on 'net' will work if either
# one comes up. With rc_depend_strict="YES" we would require them both to
# come up.
#rc_depend_strict="YES" |
Its worth a try with Code: | rc_depend_strict="NO"[ |
With your rc.conf |
It was with Code: | #rc_depend_strict="YES" |
I changed it to "NO" and removed the # but again, no change. _________________ Expert in non-working solutions |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|