View previous topic :: View next topic | Author | Message | lekto Tux'south lil' helper Joined: twenty Sep 2014 Posts: 78 Location: Mexico of Europe | Posted: Tue Jan 02, 2018 8:18 pm Post subject: [SOLVED] Samba, error(101): Network is unreachable | | | Hi, I take issue with auto mounting samba shares. Shares aren't mounted on kick, but I can mount them manually by run "mount -a". It'southward possible that openrc endeavor to mountain shares before connecting to network? /etc/fstab Lawmaking: | //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 ... mountain error(101): Network is unreachable Refer to the mount.cifs(8) manual page (eastward.g. man mount.cifs) mount error(101): Network is unreachable Refer to the mount.cifs(8) manual folio (east.g. man mountain.cifs) * Could not mount all network filesystems | dmesg Code: | [ 30.887392] IPv6: ADDRCONF(NETDEV_UP): eth0: link is non set [ xxx.986346] CIFS VFS: Fault connecting to socket. Aborting operation. [ 30.986349] CIFS VFS: cifs_mount failed w/return code = -101 [ 30.988093] CIFS VFS: Error connecting to socket. Aborting performance. [ thirty.988095] CIFS VFS: cifs_mount failed due west/return code = -101 (…) [ 33.854946] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready | Last edited by lekto on Mon Jan 08, 2018 8:25 pm; edited 1 time in total | | Back to top | | | Ant P. Watchman Joined: 18 Apr 2009 Posts: 6920 | Posted: Tue Jan 02, 2018 9:19 pm Mail subject area: | | | See the comments in /etc/conf.d/netmount and configure information technology appropriately. | | Back to top | | | Hu Moderator Joined: 06 Mar 2007 Posts: 19045 | Posted: Wednesday Jan 03, 2018 12:15 am Post subject: | | | Those shares are (attempted to) mount on kicking, which is your problem. You did non mark them as _netdev, so localmount attempts to mount them, which fails considering localmount runs before the network is started. You lot should marking them as _netdev to preclude mounting them before the network starts. You may also need to follow Ant P.'southward instructions to get them to mount in one case network is bachelor. | | Back to meridian | | | lekto Tux's lil' helper Joined: 20 Sep 2014 Posts: 78 Location: Mexico of Europe | Posted: Mon Jan 08, 2018 eight:25 pm Postal service field of study: | | | I edited netmount and added _netdev, but it sometimes worked and sometimes not. And so I haved realized I forgot to run cyberspace.eth0 and after fix it samba shares work well. | | Back to acme | | | lekto Tux's lil' helper Joined: 20 Sep 2014 Posts: 78 Location: Mexico of Europe | Posted: Thu Jan 21, 2021 2:47 pm Post discipline: | | | I'm writing here because this doesn't work anymore for me afterward switching network direction to dhcpcd [1]. I had problem with dhcpcd that it was taking too long to get network configuration, which was delaying start of xdm. At present there is no delay during kicking, but network starts working few seconds after offset of xfce and samba shares are non mounted. I got this in dmesg: Code: | [ 22.517890] CIFS: Attempting to mount //dedyk/transmission [ 22.517920] CIFS: VFS: Error connecting to socket. Aborting operation. [ 22.517922] CIFS: VFS: cifs_mount failed w/return code = -101 [ 22.518849] CIFS: Attempting to mount //dedyk/backup [ 22.518879] CIFS: VFS: Error connecting to socket. Aborting operation. [ 22.518880] CIFS: VFS: cifs_mount failed w/render lawmaking = -101 [ 25.517359] igb 0000:05:00.0 eth0: igb: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Command: RX/TX | /etc/conf.d/netmount: /etc/fstab: Code: | //dedyk/transmission /media/lekto/transmission cifs vers=iii.0,_netdev,credentials=/root/.credentials 0 0 //dedyk/backup /media/lekto/backup cifs vers=iii.0,_netdev,credentials=/root/.credentials 0 0 | [1] https://wiki.gentoo.org/wiki/Network_management_using_DHCPCD | | Back to height | | | lekto Tux's lil' helper Joined: 20 Sep 2014 Posts: 78 Location: Mexico of Europe | Posted: Thu Jan 28, 2021 6:07 pm Post subject field: | | | Ok, I kludged it, in /etc/init.d/netmount I added in depend(): and in start(): Code: | ebegin "Waiting for network connection" for i in `seq 30`; do echo -n "." sleep ane ping -c1 192.168.0.one &>> /dev/nix if [ "$?" == "0" ]; then ebegin "Network seems to work" break fi washed | | | Dorsum to top | | | lekto Tux's lil' helper Joined: twenty Sep 2014 Posts: 78 Location: Mexico of Europe | Posted: Mon Jun 21, 2021 1:02 pm Post subject: | | | Well, onetime subsequently my last post that method stopped working. Recently I came upwards with this: Code: | #!/bin/sh function loop { local program_name="delayed-mounter" for i in $(awk '/cifs/ {print $2}' /etc/fstab); exercise echo $program_name: trying to mount $i > /dev/kmsg while [ -z "$(mountain | grep $i)" ]; practice mountain $i sleep 5 done echo $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 local to default runlevel. This script is looking for line with cifs in /etc/fstab in second column and trying to mountain information technology one by one until it was successfully mounted. In that location are some improvements that can be added: - Ignoring lines that are comments (starts with "#"), - It trying to mount share until information technology's mounted, so it can stuck. It could exist fixed by creating separate thread for every mount, - Checking information technology share was mounted properly could exist better. | | Back to summit | | | Hu Moderator Joined: 06 Mar 2007 Posts: 19045 | Posted: Mon Jun 21, 2021 6:55 pm Post subject: | | | That script will mount any line that has cifs anywhere in information technology: Code: | $ printf 'The scifs are hither.\n' | awk '/cifs/ {print $2}' scifs $ printf 'Open the door; the scifs are here.\north' | awk '/cifs/ {print $2}' the | Polling like that is generally bad. Why not apply a dhcpcd hook to mount the filesystems after the network is up? Add 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 good starting point. When the interface is brought upwards, bring upward all the cifs filesystems, which you can more than cleanly list using findmnt: Code: | findmnt --fstab -t cifs --output TARGET --noheadings | | | Back to top | | | Display posts from previous: | | | You cannot mail new topics in this forum You cannot answer to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum Yous cannot vote in polls in this forum | |
Source: https://forums.gentoo.org/viewtopic-p-8167666.html?sid=7d3ba7c9432ef5d1e03d07bac6a559f6
Posted by: wellsuplits00.blogspot.com
0 Response to "Cifs_mount Failed W Return Code 101"
Post a Comment