banner



Cifs_mount Failed W Return Code 101

View previous topic :: View next topic
Author Message
lekto
Tux's lil' helper
Tux's lil' helper

Joined: twenty Sep 2014
Posts: 101
Location: Ancient Rome


Post Posted: Tue Jan 02, 2018 8:xviii pm   Mail service subject: [SOLVED] Samba, mistake(101): Network is unreachable Reply with quote

How-do-you-do, I have issue with auto mounting samba shares. Shares aren't mounted on boot, just I can mount them manually past run "mountain -a". It's possible that openrc endeavor to mount shares earlier connecting to network?

/etc/fstab

Code:
//dedyk/transmission   /media/lekto/transmission   cifs   vers=3.0,credentials=/root/.credentials   0 0
//dedyk/backup      /media/lekto/backup      cifs   vers=3.0,credentials=/root/.credentials   0 0

/var/log/rc.log

Code:
 * Mounting network filesystems ...
mount error(101): Network is unreachable
Refer to the mount.cifs(8) manual page (e.g. man mountain.cifs)
mount error(101): Network is unreachable
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
* Could non mountain all network filesystems

dmesg

Lawmaking:
[   30.887392] IPv6: ADDRCONF(NETDEV_UP): eth0: link is non ready
[   30.986346] CIFS VFS: Error connecting to socket. Aborting operation.
[   30.986349] CIFS VFS: cifs_mount failed due west/return code = -101
[   30.988093] CIFS VFS: Fault connecting to socket. Aborting operation.
[   thirty.988095] CIFS VFS: cifs_mount failed w/return code = -101
(…)
[   33.854946] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes prepare

Concluding edited past lekto on Monday Jan 08, 2018 8:25 pm; edited one time in total

Back to top

View user's profile Send private message

Ant P.
Watchman
Watchman

Joined: 18 Apr 2009
Posts: 6920


Post Posted: Tue Jan 02, 2018 ix:xix pm   Mail service discipline: Reply with quote

See the comments in /etc/conf.d/netmount and configure it appropriately.
Back to top

View user's profile Send private message

Hu
Moderator
Moderator

Joined: 06 Mar 2007
Posts: 19259


Post Posted: Wed January 03, 2018 12:15 am   Post field of study: Reply with quote

Those shares are (attempted to) mountain on boot, which is your problem. Yous did not mark them every bit _netdev, so localmount attempts to mount them, which fails because localmount runs before the network is started. You should marker them equally _netdev to forbid mounting them earlier the network starts. You may also demand to follow Ant P.'southward instructions to get them to mount once network is available.
Back to top

View user's profile Send private message

lekto
Tux's lil' helper
Tux's lil' helper

Joined: 20 Sep 2014
Posts: 101
Location: Ancient Rome


Post Posted: Monday Jan 08, 2018 8:25 pm   Post subject: Reply with quote

I edited netmount and added _netdev, just it sometimes worked and sometimes not. Then I haved realized I forgot to run cyberspace.eth0 and after ready it samba shares work well.
Back to height

View user's profile Send private message

lekto
Tux's lil' helper
Tux's lil' helper

Joined: 20 Sep 2014
Posts: 101
Location: Ancient Rome


Post Posted: Thu January 21, 2021 2:47 pm   Post subject: Reply with quote

I'thou writing here considering this doesn't work anymore for me after switching network management to dhcpcd [ane]. I had trouble with dhcpcd that information technology was taking too long to get network configuration, which was delaying start of xdm. At present in that location is no delay during boot, but network starts working few seconds after start of xfce and samba shares are non mounted.

I got this in dmesg:

Code:
[   22.517890] CIFS: Attempting to mount //dedyk/manual
[   22.517920] CIFS: VFS: Mistake connecting to socket. Aborting operation.
[   22.517922] CIFS: VFS: cifs_mount failed westward/return code = -101
[   22.518849] CIFS: Attempting to mount //dedyk/fill-in
[   22.518879] CIFS: VFS: Error connecting to socket. Aborting operation.
[   22.518880] CIFS: VFS: cifs_mount failed west/return lawmaking = -101
[   25.517359] igb 0000:05:00.0 eth0: igb: eth0 NIC Link is Upwards 1000 Mbps Total Duplex, Flow Control: RX/TX

/etc/conf.d/netmount:

Lawmaking:
rc_need="dhcpcd"

/etc/fstab:

Code:
//dedyk/transmission                            /media/lekto/transmission       cifs            vers=iii.0,_netdev,credentials=/root/.credentials 0 0
//dedyk/fill-in                                  /media/lekto/backup             cifs            vers=3.0,_netdev,credentials=/root/.credentials 0 0

[1] https://wiki.gentoo.org/wiki/Network_management_using_DHCPCD

Back to top

View user's profile Send private message

lekto
Tux's lil' helper
Tux's lil' helper

Joined: 20 Sep 2014
Posts: 101
Location: Aboriginal Rome


Post Posted: Thu Jan 28, 2021 6:07 pm   Post subject: Reply with quote

Ok, I kludged information technology, in /etc/init.d/netmount I added in depend():
Code:
subsequently xdm

and in beginning():
Code:
        ebegin "Waiting for network connection"
for i in `seq 30`; do
echo -north "."
sleep 1
ping -c1 192.168.0.1 &>> /dev/null
if [ "$?" == "0" ]; then
ebegin "Network seems to work"
intermission
fi
done
Back to peak

View user's profile Send private message

lekto
Tux's lil' helper
Tux's lil' helper

Joined: 20 Sep 2014
Posts: 101
Location: Ancient Rome


Post Posted: Mon Jun 21, 2021 1:02 pm   Mail service subject: Reply with quote

Well, old after my terminal post that method stopped working. Recently I came up with this:
Code:
#!/bin/sh

function loop {
local program_name="delayed-mounter"

   for i in $(awk '/cifs/ {impress $2}' /etc/fstab); practise
echo $program_name: trying to mountain $i > /dev/kmsg

      while [ -z "$(mount | grep $i)" ]; do
mount $i
sleep five
washed

      repeat $program_name: $i is mounted, continue > /dev/kmsg
done

   echo $program_name: everything was mounted, exiting > /dev/kmsg
}

loop&


To use it put it in /etc/local.d/delayed-mounter.start, give it execute permission and add together local to default runlevel. This script is looking for line with cifs in /etc/fstab in 2d column and trying to mount it i by one until it was successfully mounted. There are some improvements that tin be added:
- Ignoring lines that are comments (starts with "#"),
- It trying to mountain share until information technology's mounted, so it tin stuck. It could be fixed by creating split up thread for every mount,
- Checking it share was mounted properly could be better.
Back to elevation

View user's profile Send private message

Hu
Moderator
Moderator

Joined: 06 Mar 2007
Posts: 19259


Post Posted: Mon Jun 21, 2021 6:55 pm   Post subject: Reply with quote

That script will mount any line that has cifs anywhere in it:
Code:
$ printf 'The scifs are here.\n' | awk '/cifs/ {print $2}'
scifs
$ printf 'Open the door; the scifs are here.\northward' | awk '/cifs/ {impress $two}'
the
Polling like that is generally bad. Why not use a dhcpcd claw to mount the filesystems afterward the network is up? Add together noauto to the mount options. Create a dhcpcd hook in /lib/dhcpcd/dhcpcd-hooks. The instance in /usr/share/dhcpcd/hooks/29-lookup-hostname looks like a practiced starting point. When the interface is brought up, bring up all the cifs filesystems, which you tin can more cleanly list using findmnt:
Code:
findmnt --fstab -t cifs --output TARGET --noheadings
Back to superlative

View user's profile Send private message

Display posts from previous:  
You cannot mail service new topics in this forum
You cannot reply to topics in this forum
Y'all cannot edit your posts in this forum
You lot cannot delete your posts in this forum
You lot cannot vote in polls in this forum

Cifs_mount Failed W Return Code 101,

Source: https://forums.gentoo.org/viewtopic-p-8167666.html?sid=7d3ba7c9432ef5d1e03d07bac6a559f6

Posted by: leeharce1991.blogspot.com

0 Response to "Cifs_mount Failed W Return Code 101"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel