Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Samba, error(101): Network is unreachable
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
lekto
n00b
n00b


Joined: 20 Sep 2014
Posts: 32

PostPosted: Tue Jan 02, 2018 8:18 pm    Post subject: [SOLVED] Samba, error(101): Network is unreachable Reply with quote

Hi, I have issue with auto mounting samba shares. Shares aren't mounted on boot, but I can mount them manually by run "mount -a". It's possible that openrc try to mount shares before 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 mount.cifs)
mount error(101): Network is unreachable
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
 * Could not mount all network filesystems


dmesg
Code:
[   30.887392] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   30.986346] CIFS VFS: Error 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 operation.
[   30.988095] CIFS VFS: cifs_mount failed w/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
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5647

PostPosted: Tue Jan 02, 2018 9:19 pm    Post subject: 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: 13624

PostPosted: Wed Jan 03, 2018 12:15 am    Post subject: Reply with quote

Those shares are (attempted to) mount on boot, which is your problem. You did not mark them as _netdev, so localmount attempts to mount them, which fails because localmount runs before the network is started. You should mark them as _netdev to prevent mounting them before the network starts. You may also need to follow Ant P.'s instructions to get them to mount once network is available.
Back to top
View user's profile Send private message
lekto
n00b
n00b


Joined: 20 Sep 2014
Posts: 32

PostPosted: Mon Jan 08, 2018 8:25 pm    Post subject: Reply with quote

I edited netmount and added _netdev, but it sometimes worked and sometimes not. Then I haved realized I forgot to run net.eth0 and after fix it samba shares work well.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
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