Mount error 101 network is unreachable

mount error (101) network unreachable

Всем привет.
Есть проблема. В сети крутится samba сервер (192.168.0.251)
На пользовательской машине установлен Alt Linux 5.0 Ковчег. В файле fstab добавлена строка:
//192.168.0.251/pomoyka  /mnt/file  cifs  credentials=/mnt/file2,rw,noperm,iocharset=utf8,forcemand 0 0

При загрузке компа, автоматически samba не монтируется. Вручную (mount /mnt/file) монтируется «на ура».
Network Manager service стартует до попытки монтирования. Параметр _netdev не помогает. :(

В Alt Linux 4.1.1 такой проблемы не было.
Хелп. Заранее благодарен за помощь!

« Последнее редактирование: 15.01.2010 21:56:18 от kwinto »


Записан


может в опции стоит добавить auto ?


Записан



Записан


Поищите на форуме — Skull уже отвечал на аналогичный вопрос. Там надо добавить специальную опцию. Какую — не помню.


Записан


Искал. Не нашёл.
Чтоб скучно сообществу не было, расскажу об ещё одном баге.
При монтировании samba’ы в Alt Linux’e 4.0 вышеуказанным способом и работе с документами по сети в Openoffice’e 2.4 всё работало прекрасно.
После обновления до Alt Linux 4.1.1 в OpenOffice’e 3.0 стали наблюдаться интересные глюки. Если я на samba’вой шаре, в примонтированной папке создаю в 3-м OO документ и сохраняю его, то потом он открывается только для чтения. Но если я создаю ссылку на рабочем столе на этот документ, всё нормально редактируется. В 2.x и в 3.1.1 OO всё работает без проблем.

« Последнее редактирование: 16.01.2010 00:20:20 от kwinto »


Записан


Разобрался.
В центре управления системой, в свойствах сетевого интерфейса вместо Network manager’а выбрал Etcnet. Всё заработало.


Записан



Записан



Записан


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

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

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: 6920

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: 19775

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
Tux’s lil’ helper
Tux's lil' helper

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

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

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

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

PostPosted: Thu Jan 21, 2021 2:47 pm    Post subject: Reply with quote

I’m writing here because this doesn’t work anymore for me after switching network management to dhcpcd [1]. I had problem with dhcpcd that it was taking too long to get network configuration, which was delaying start of xdm. Now there is no delay during boot, but network starts working few seconds after start of xfce and samba shares are not 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/return code = -101

[   25.517359] igb 0000:05:00.0 eth0: igb: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX/TX

/etc/conf.d/netmount:

Code:
rc_need=»dhcpcd»

/etc/fstab:

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

//dedyk/backup                                  /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: 118
Location: Ancient Rome

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

Ok, I kludged it, in /etc/init.d/netmount I added in depend():

Code:
after xdm



and in start():

Code:
        ebegin «Waiting for network connection»

        for i in `seq 30`; do

                echo -n «.»

                sleep 1

                ping -c1 192.168.0.1 &>> /dev/null

                if [ «$?» == «0» ]; then

                        ebegin «Network seems to work»

                        break

                fi

        done

Back to top

View user's profile Send private message

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

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

PostPosted: Mon Jun 21, 2021 1:02 pm    Post subject: Reply with quote

Well, sometime after my last 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/ {print $2}’ /etc/fstab); do

      echo $program_name: trying to mount $i > /dev/kmsg

      while [ -z «$(mount | grep $i)» ]; do

         mount $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 mount it one by one until it was successfully mounted. There are some improvements that can be added:

— Ignoring lines that are comments (starts with «#»),

— It trying to mount share until it’s mounted, so it can stuck. It could be fixed by creating separate thread for every mount,

— Checking it share was mounted properly could be better.

Back to top

View user's profile Send private message

Hu
Moderator
Moderator

Joined: 06 Mar 2007
Posts: 19775

PostPosted: 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.n’ | awk ‘/cifs/ {print $2}’

the

Polling like that is generally bad. Why not use 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 example in /usr/share/dhcpcd/hooks/29-lookup-hostname looks like a good starting point. When the interface is brought up, bring up all the cifs filesystems, which you can more cleanly list using findmnt:

Code:
findmnt —fstab -t cifs —output TARGET —noheadings

Back to top

View user's profile Send private message

Display posts from previous:   

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

  • Index
  • » Applications & Desktop Environments
  • » [SOLVED] — Cannot automount Samba share from fstab

#1 2012-09-30 12:12:38

kaipee
Member
From: Belfast, UK
Registered: 2012-07-07
Posts: 214

[SOLVED] — Cannot automount Samba share from fstab

Hi guys, I successfully got Samba working on my home serv last night but for some reason I cannot seem to automount the share at boot time (native systemd)

/etc/fstab

# kphmsrv /mnt/Files  Samba
//kphmsrv/Files /mnt/Files cifs users,username=kaipee,password={mypassword},workgroup=WORKGROUP,ip=192.168.0.10 0 0

errors.log

Sep 30 14:03:02 zoostorm-arch kernel: [    8.721292] CIFS VFS: Error connecting to socket. Aborting operation
Sep 30 14:03:02 zoostorm-arch kernel: [    8.721956] CIFS VFS: cifs_mount failed w/return code = -101

I thought systemd wouldn’t attempt mounting until network was up?

I have removed both noauto (as I did want to automount at boot) and noatime (as I read that it causes issues when mounting at boot)

Linux zoostorm-arch 3.5.4-1-ARCH #1 SMP PREEMPT Sat Sep 15 08:12:04 CEST 2012 x86_64 GNU/Linux

Last edited by kaipee (2012-10-02 18:04:25)

#2 2012-09-30 12:15:16

kaipee
Member
From: Belfast, UK
Registered: 2012-07-07
Posts: 214

Re: [SOLVED] — Cannot automount Samba share from fstab

Once logged in, however, I can successfully mount the share with

with any user

#3 2012-09-30 12:36:45

elp
Member
Registered: 2007-04-10
Posts: 27

Re: [SOLVED] — Cannot automount Samba share from fstab

My look something like this:

//192.168.0.2/big_drive /media/ArchSamba cifs auto,owner,rw,username=magnus,password=*****blabla 0 0

#4 2012-09-30 14:41:34

kaipee
Member
From: Belfast, UK
Registered: 2012-07-07
Posts: 214

Re: [SOLVED] — Cannot automount Samba share from fstab

OK so I think I have narrowed it down to the network not being connected.

My current /etc/fstab

# kphmsrv /mnt/Files  Samba
//kphmsrv/Files /mnt/Files cifs _netdev,users,username=kaipee,password={mypassword},workgroup=WORKGROUP,ip=192.168.0.10 0 0

Booting shows failed for a dependency.
Error log shows:

Sep 30 15:22:28 zoostorm-arch kernel: [ 1023.268131] CIFS VFS: default security mechanism requested.  The default security mechanism will be upgraded from ntlm to ntlmv2 in kernel release 3.3
Sep 30 16:24:39 zoostorm-arch kernel: [   10.125967] CIFS VFS: Error connecting to socket. Aborting operation
Sep 30 16:24:39 zoostorm-arch kernel: [   10.126602] CIFS VFS: cifs_mount failed w/return code = -101

Upon login I can mount the share, however if I disable my wireless connection and try to mount I get:

[kaipee@zoostorm-arch ~]$ mount /mnt/Files
mount error(101): Network is unreachable
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

…and the same error occurs:

Sep 30 15:33:04 zoostorm-arch kernel: [  515.431106] CIFS VFS: default security mechanism requested.  The default security mechanism will be upgraded from ntlm to ntlmv2 in kernel release 3.3
Sep 30 15:33:33 zoostorm-arch kernel: [  544.010324] CIFS VFS: Error connecting to socket. Aborting operation
Sep 30 15:33:33 zoostorm-arch kernel: [  544.010406] CIFS VFS: cifs_mount failed w/return code = -10

So it does indeed look like it won’t mount at boot because of no network connection — however I have included the _netdev option and I am using systemd which is supposed to not attempt mounting until network is available ??

Last edited by kaipee (2012-09-30 14:42:46)

#5 2012-09-30 15:23:58

kaipee
Member
From: Belfast, UK
Registered: 2012-07-07
Posts: 214

Re: [SOLVED] — Cannot automount Samba share from fstab

I just don’t get what is happening here. I have updated my /etc/fstab to read:

//192.168.0.10/Files /mnt/Files cifs x-systemd.device-timeout=60s,users,username=kaipee,password={mypassword},workgroup=WORKGROUP,ip=192.168.0.10 0 0

…forcing systemd to wait for at least 60 seconds to mount the share. My machine boots and logs in with a working connection in about 15 seconds after initial loading.

https://lh4.googleusercontent.com/-DOTi … 0409_6.jpg

Yet it still complains that the network is not available and is clearly ignoring the options about timeout and _netdev ??!

[kaipee@zoostorm-arch ~]$ systemctl status mnt-Files.mount
mnt-Files.mount - /mnt/Files
	  Loaded: loaded (/etc/fstab)
	  Active: failed (Result: exit-code) since Sun, 30 Sep 2012 17:06:44 +0100
	   Where: /mnt/Files
	    What: //192.168.0.10/Files
	 Process: 385 ExecMount=/bin/mount //192.168.0.10/Files /mnt/Files -t cifs -o x-systemd.device-timeout=60s,users,username=kaipee,password=P@ss,workgroup=WORKGROUP,ip=192.168.0.10 (code=exited, status=32)
	  CGroup: name=systemd:/system/mnt-Files.mount

Sep 30 17:06:44 zoostorm-arch mount[385]: mount error(101): Network is unreachable
Sep 30 17:06:44 zoostorm-arch mount[385]: Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
Sep 30 17:06:44 zoostorm-arch systemd[1]: Failed to mount /mnt/Files.

Moderator edit: The image is too big. Reduced to url.

Last edited by bernarcher (2012-09-30 15:29:43)

#6 2012-09-30 16:01:49

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [SOLVED] — Cannot automount Samba share from fstab

_netdev only works if you have proper activation of network.target. How are you establishing a network connection?

Alternatively, just use an automounter on the share and let it be mounted on first access — add noauto,x-systemd.automount to the options.

#7 2012-09-30 18:11:13

kaipee
Member
From: Belfast, UK
Registered: 2012-07-07
Posts: 214

Re: [SOLVED] — Cannot automount Samba share from fstab

Hi falconindy,

I’m connecting to a wireless network with WPA2 (WUSBN v2) using the NetworkManager service. How do I configure/check this network.target?

#8 2012-09-30 18:48:01

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [SOLVED] — Cannot automount Samba share from fstab

NetworkManager-wait-online.service should activate network.target. You’re still better off using an automount unit.

#9 2012-09-30 22:12:56

kaipee
Member
From: Belfast, UK
Registered: 2012-07-07
Posts: 214

Re: [SOLVED] — Cannot automount Samba share from fstab

How does the automount unit work?
I have a few applications and services that use the samba share/mount so kind of want it always mounted.

#10 2012-09-30 23:20:56

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [SOLVED] — Cannot automount Samba share from fstab

Automount means its… mounted automatically on first access.

#11 2012-10-01 12:26:45

kaipee
Member
From: Belfast, UK
Registered: 2012-07-07
Posts: 214

Re: [SOLVED] — Cannot automount Samba share from fstab

I was leaning more towards are there any benefits of this over mounting at boot?
Is it configured for every user automatically? Is it mounted by user or root?

Why is an automount unit better than automatically mounting during boot?

#12 2012-10-01 17:22:30

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [SOLVED] — Cannot automount Samba share from fstab

kaipee wrote:

I was leaning more towards are there any benefits of this over mounting at boot?

Sure. You don’t have to worry about when the network comes up.

kaipee wrote:

Is it configured for every user automatically? Is it mounted by user or root?

It’s mounted by root according to the options in fstab. It’s exactly the same as if you were insisting it mount on boot.

kaipee wrote:

Why is an automount unit better than automatically mounting during boot?

Boot won’t explicitly hang waiting for this to mount — only for the automount to be initialized on the mountpoint.

#13 2012-10-01 19:55:43

kaipee
Member
From: Belfast, UK
Registered: 2012-07-07
Posts: 214

Re: [SOLVED] — Cannot automount Samba share from fstab

But I kind of want boot to hang — at least until the network comes up and continues to mount the share

#14 2012-10-01 19:59:40

kaipee
Member
From: Belfast, UK
Registered: 2012-07-07
Posts: 214

Re: [SOLVED] — Cannot automount Samba share from fstab

…does the automount launch a ‘daemon’ of sorts, running in the background and waiting for a working network connection before initializing the mount? Allowing the rest of the system to function normally, and mounting the share as soon as a valid connection is confirmed?

#15 2012-10-01 20:59:22

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [SOLVED] — Cannot automount Samba share from fstab

Again, it mounts on first access by you (or will just fail if the endpoint is unreachable). I suggest trying this and seeing how it works before asking the same question again.

#16 2012-10-02 18:04:00

kaipee
Member
From: Belfast, UK
Registered: 2012-07-07
Posts: 214

Re: [SOLVED] — Cannot automount Samba share from fstab

Working /etc/fstab entry:

//192.168.0.10/Files /mnt/Files cifs auto,x-systemd.automount,cache=none,rsize=130048,wsize=57344,users,username=kaipee,password={mypassword},workgroup=WORKGROUP,ip=192.168.0.10 0 0

Last edited by kaipee (2012-10-02 18:04:10)

#17 2012-10-03 22:00:22

madchine
Member
From: Denmark
Registered: 2009-11-04
Posts: 62
Website

Re: [SOLVED] — Cannot automount Samba share from fstab

I  gotta admit I was dead set against the automount solution when I read the suggestion but it works beautifully. Hardly any lag at all on first time access and no hanging issues (so far). Thanks, falconindy.

EDIT: Spoke too soon. This thread is marked solved, so I won’t bring up my issues here. Started a new thread instead. Apologies for the mess.

Last edited by madchine (2012-10-03 22:33:59)

#19 2018-01-07 15:19:54

ninovanhooff
Member
Registered: 2018-01-07
Posts: 1

Re: [SOLVED] — Cannot automount Samba share from fstab

Just passing by to mention that the entry that turned out to work for @kaipee contains auto, non noauto as @falconindy suggested. And indeed, this works for me too.

1 made 2 edits to my own existing lines:
remove  _netdev
replace noauto by auto

Doesn’t make too much sense to me, but it works

#20 2018-01-07 15:40:17

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,010

Re: [SOLVED] — Cannot automount Samba share from fstab

ninovanhooff,

Welcome to the Arch Linux Forums.  You opened with a fairly good post that is on topic, but do keep an eye on the age of the threads; this one is five years old.
https://wiki.archlinux.org/index.php/Co … bumping.22

Using this opportunity to close this old thread.


Nothing is too wonderful to be true, if it be consistent with the laws of nature — Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. — Alan Turing

How to Ask Questions the Smart Way

  • Home
  • Forum
  • The Ubuntu Forum Community
  • Ubuntu Official Flavours Support
  • General Help
  • [all variants] mount error(101): Network is unreachable

  1. mount error(101): Network is unreachable

    I am running Lucid 64bit. I have noticed that when booting I get the following errors when mounting cifs volumes during the boot process.

    from boot.log:

    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)
    mount error(101): Network is unreachable
    Refer to the mount.cifs( 8 ) manual page (e.g. man mount.cifs)
    mountall: mount /media/misc [932] terminated with status 32
    mountall: mount /media/music [933] terminated with status 32
    mountall: mount /media/fs_files [934] terminated with status 32

    they do mount but this error pauses the boot process for 10 or 15 seconds.

    My assumption is that an attempt is made to mount the drives before the network is available.

    Here’s my fstab:

    Code:

    # /etc/fstab: static file system information.
    #
    # Use 'blkid -o value -s UUID' to print the universally unique identifier
    # for a device; this may be used with UUID= as a more robust way to name
    # devices that works even if disks are added and removed. See fstab(5).
    #
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    proc            /proc           proc    nodev,noexec,nosuid 0       0
    # / was on /dev/sdc1 during installation
    UUID=db3b4a6c-b264-409b-ba1a-46e540ae3697 /               ext3    errors=remount-ro 0       1
    # /home was on /dev/sda3 during installation
    UUID=88c8ed0c-43ee-4849-8fe3-a5603815c4d7 /home           ext3    defaults        0       2
    # swap was on /dev/sdc5 during installation
    UUID=32fb0558-2896-4532-86a2-480e33f08596 none            swap    sw              0       0
    
    //192.168.5.102/misc /media/misc  cifs  credentials=/root/.smbcredentials,noperm,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
    //192.168.5.102/music /media/music  cifs  credentials=/root/.smbcredentials,noperm,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
    //192.168.5.102/files /media/fs_files  cifs  credentials=/root/.smbcredentials,noperm,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0

    Any idea how to resolve this?

    Thanks


  2. Re: mount error(101): Network is unreachable

    Quote Originally Posted by bowens44
    View Post

    I am running Lucid 64bit. I have noticed that when booting I get the following errors when mounting cifs volumes during the boot process.
    …….
    My assumption is that an attempt is made to mount the drives before the network is available.

    Here’s my fstab:

    Code:

    # /etc/fstab: static file system information.
    .........
    //192.168.5.102/misc /media/misc  cifs  credentials=/root/.smbcredentials,noperm,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
    //192.168.5.102/music /media/music  cifs  credentials=/root/.smbcredentials,noperm,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
    //192.168.5.102/files /media/fs_files  cifs  credentials=/root/.smbcredentials,noperm,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0

    Any idea how to resolve this?

    Thanks

    Use the _netdev option:

    Code:

    //192.168.5.102/misc /media/misc  cifs  credentials=/root/.smbcredentials,noperm,iocharset=utf8,file_mode=0777,dir_mode=0777,_netdev 0 0
    //192.168.5.102/music /media/music  cifs  credentials=/root/.smbcredentials,noperm,iocharset=utf8,file_mode=0777,dir_mode=0777,_netdev 0 0
    //192.168.5.102/files /media/fs_files  cifs  credentials=/root/.smbcredentials,noperm,iocharset=utf8,file_mode=0777,dir_mode=0777,_netdev 0 0

  3. Re: mount error(101): Network is unreachable

    Quote Originally Posted by dcstar
    View Post

    Use the _netdev option:

    Unfortunately, this made no difference

    Last edited by bowens44; May 8th, 2010 at 01:26 PM.


  4. Re: mount error(101): Network is unreachable

    Worked for me. On my system, WICD is now started, the wireless connection is made, and the shares are mounted. Thank you for the help!


  5. Re: mount error(101): Network is unreachable

    I had this same problem after upgrading to Lucid and as I didn’t find a solution, I used the /etc/rc.local script as workaround:

    Code:

    #!/bin/sh 
    #
    # rc.local
    #
    # This script is executed at the end of each multiuser runlevel.
    # Make sure that the script will "exit 0" on success or any other
    # value on error.
    #
    # In order to enable or disable this script just change the execution
    # bits.
    #
    # By default this script does nothing.
    mount -t cifs -o iocharset=utf8,user=myuser,password=mypwd,rw,uid=myuid,_netdev //server/share /mount/point
    
    exit 0

    Hope this helps


  6. Re: mount error(101): Network is unreachable

    Hi,

    I’d Like to revive this thread.

    I am getting the error described here even with the _netdev option under ubuntu 10.04

    As renardeau said you can add these to the rc.local file which stops the error.

    My issue is that one of my mounts in my case is used for configs for vairous applications like SABNZBD + Sickbeard and using the rc.local method means that I cant use these applications as services. However the error(101) causes issuses with these applications on boot, as the mount is not available when the services are starting.

    Does anyone have any more suggestions? I am thinking of trying a different version.


  7. Re: mount error(101): Network is unreachable

    Ok so i have tried this on a few different versions now, 11.10 server and desktop. Both with the same issue. Its really strange.

    For me it means that I have to directly mount a native drive in order to use it as a ‘Install disk’. Shame really

    does anyone have any other ideas?


Bookmarks

Bookmarks


Posting Permissions

On a newish 18.04 system, I added a few SMB mounts to my fstab and verified they do mount, interactively.

When my system boots, it complains about CIFS mount errors, then tells me I am in emergency mode and proceeds to cloud-init (eventually obtaining an IP address, I think). If I bypass the emergency mount, I find my mounts to have been mounted no problem, probably after it obtained an IP)

Would love some advice as I’d like for this machine to boot unattended.

I have attached a screenshot and various excerpt of my journalctl -b
log that seem relevant.

Sep 15 20:46:47 watcher kernel: FS-Cache: Netfs 'cifs' registered for caching
Sep 15 20:46:47 watcher kernel: Key type cifs.spnego registered
Sep 15 20:46:47 watcher kernel: Key type cifs.idmap registered
Sep 15 20:46:47 watcher kernel: No dialect specified on mount. Default has changed to a more secure dialect, SMB2.1 or later (e.g. SMB3), from CIFS (SMB1). To use the less secure SMB1 dialect to access old servers which do not support SMB3 (or SMB2.1) specify vers=1.0 on mount.
Sep 15 20:46:47 watcher mount[645]: mount error(101): Network is unreachable
Sep 15 20:46:47 watcher mount[645]: Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
Sep 15 20:46:47 watcher kernel: CIFS VFS: Error connecting to socket. Aborting operation.
Sep 15 20:46:47 watcher kernel: CIFS VFS: cifs_mount failed w/return code = -101
Sep 15 20:46:47 watcher systemd[1]: mnt-downloads.mount: Mount process exited, code=exited status=32
Sep 15 20:46:47 watcher systemd[1]: mnt-downloads.mount: Failed with result 'exit-code'.
Sep 15 20:46:47 watcher systemd[1]: Failed to mount /mnt/downloads.
Sep 15 20:46:47 watcher systemd[1]: Dependency failed for Local File Systems.
...
    Sep 15 20:46:53 watcher cloud-init[491]: Cloud-init v. 18.3-9-g2e62cb8a-0ubuntu1~18.04.2 running 'init-local' at Sat, 15 Sep 2018 20:46:53 +0000. Up 21.61 seconds.
Sep 15 20:46:53 watcher systemd[1]: Started Initial cloud-init job (pre-networking).
Sep 15 20:46:53 watcher systemd[1]: Reached target Network (Pre).
Sep 15 20:46:53 watcher systemd[1]: Starting Raise network interfaces...
Sep 15 20:46:53 watcher systemd[1]: Starting Network Service...
Sep 15 20:46:53 watcher systemd-networkd[910]: Enumeration completed
Sep 15 20:46:53 watcher systemd[1]: Started Network Service.
Sep 15 20:46:53 watcher systemd-networkd[910]: lo: Link is not managed by us
Sep 15 20:46:53 watcher systemd-networkd[910]: eno1: IPv6 successfully enabled
Sep 15 20:46:53 watcher systemd[1]: Starting Network Name Resolution...
Sep 15 20:46:53 watcher systemd[1]: Starting Wait for Network to be Configured...
Sep 15 20:46:53 watcher kernel: IPv6: ADDRCONF(NETDEV_UP): eno1: link is not ready
...
Sep 15 20:46:53 watcher systemd[1]: Started Network Name Resolution.
Sep 15 20:46:53 watcher systemd[1]: Reached target Host and Network Name Lookups.
Sep 15 20:46:53 watcher systemd[1]: Started Raise network interfaces.
Sep 15 20:46:53 watcher systemd[1]: Reached target Network.
Sep 15 20:46:57 watcher systemd-networkd[910]: eno1: Gained carrier
Sep 15 20:46:57 watcher kernel: e1000e: eno1 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: Rx/Tx
Sep 15 20:46:57 watcher kernel: IPv6: ADDRCONF(NETDEV_CHANGE): eno1: link becomes ready
Sep 15 20:46:57 watcher systemd-networkd[910]: eno1: DHCPv4 address 192.168.7.229/24 via 192.168.7.1
Sep 15 20:46:57 watcher systemd-timesyncd[743]: Network configuration changed, trying to establish connection.
Sep 15 20:46:58 watcher systemd-networkd[910]: eno1: Gained IPv6LL
Sep 15 20:46:58 watcher systemd-networkd[910]: eno1: Configured
Sep 15 20:46:58 watcher systemd-timesyncd[743]: Network configuration changed, trying to establish connection.
Sep 15 20:46:58 watcher systemd-networkd-wait-online[942]: managing: eno1
Sep 15 20:46:58 watcher systemd-networkd-wait-online[942]: ignoring: lo
Sep 15 20:46:58 watcher systemd[1]: Started Wait for Network to be Configured.
Sep 15 20:46:58 watcher systemd[1]: Starting Initial cloud-init job (metadata service crawler)...
Sep 15 20:46:58 watcher cloud-init[1030]: Cloud-init v. 18.3-9-g2e62cb8a-0ubuntu1~18.04.2 running 'init' at Sat, 15 Sep 2018 20:46:58 +0000. Up 26.99 seconds.
Sep 15 20:46:58 watcher cloud-init[1030]: ci-info: +++++++++++++++++++++++++++++++++++++++Net device info+++++++++++++++++++++++++++++++++++++++
Sep 15 20:46:58 watcher cloud-init[1030]: ci-info: +--------+------+------------------------------+---------------+--------+-------------------+
Sep 15 20:46:58 watcher cloud-init[1030]: ci-info: | Device |  Up  |           Address            |      Mask     | Scope  |     Hw-Address    |
Sep 15 20:46:58 watcher cloud-init[1030]: ci-info: +--------+------+------------------------------+---------------+--------+-------------------+
Sep 15 20:46:58 watcher cloud-init[1030]: ci-info: |  eno1  | True |        192.168.7.229         | 255.255.255.0 | global | xx:xx:xx:xx:xx:c7 |
Sep 15 20:46:58 watcher cloud-init[1030]: ci-info: |  eno1  | True | fe80::5265:f3ff:fe1c:6dc7/64 |       .       |  link  | xx:xx:xx:xx:xx:c7 |
Sep 15 20:46:58 watcher cloud-init[1030]: ci-info: |   lo   | True |          127.0.0.1           |   255.0.0.0   |  host  |         .         |
Sep 15 20:46:58 watcher cloud-init[1030]: ci-info: |   lo   | True |           ::1/128            |       .       |  host  |         .         |
Sep 15 20:46:58 watcher cloud-init[1030]: ci-info: +--------+------+------------------------------+---------------+--------+-------------------+
Sep 15 20:46:58 watcher cloud-init[1030]: ci-info: ++++++++++++++++++++++++++++++Route IPv4 info++++++++++++++++++++++++++++++
Sep 15 20:46:58 watcher cloud-init[1030]: ci-info: +-------+-------------+-------------+-----------------+-----------+-------+
Sep 15 20:46:58 watcher cloud-init[1030]: ci-info: | Route | Destination |   Gateway   |     Genmask     | Interface | Flags |
Sep 15 20:46:58 watcher cloud-init[1030]: ci-info: +-------+-------------+-------------+-----------------+-----------+-------+
Sep 15 20:46:58 watcher cloud-init[1030]: ci-info: |   0   |   0.0.0.0   | 192.168.7.1 |     0.0.0.0     |    eno1   |   UG  |
Sep 15 20:46:58 watcher cloud-init[1030]: ci-info: |   1   | 192.168.7.0 |   0.0.0.0   |  255.255.255.0  |    eno1   |   U   |
Sep 15 20:46:58 watcher cloud-init[1030]: ci-info: |   2   | 192.168.7.1 |   0.0.0.0   | 255.255.255.255 |    eno1   |   UH  |
Sep 15 20:46:58 watcher cloud-init[1030]: ci-info: +-------+-------------+-------------+-----------------+-----------+-------+
Sep 15 20:46:58 watcher cloud-init[1030]: ci-info: +++++++++++++++++++Route IPv6 info+++++++++++++++++++
Sep 15 20:46:58 watcher cloud-init[1030]: ci-info: +-------+-------------+---------+-----------+-------+
Sep 15 20:46:58 watcher cloud-init[1030]: ci-info: | Route | Destination | Gateway | Interface | Flags |
Sep 15 20:46:58 watcher cloud-init[1030]: ci-info: +-------+-------------+---------+-----------+-------+
Sep 15 20:46:58 watcher cloud-init[1030]: ci-info: |   1   |  fe80::/64  |    ::   |    eno1   |   U   |
Sep 15 20:46:59 watcher cloud-init[1030]: ci-info: |   3   |    local    |    ::   |    eno1   |   U   |
Sep 15 20:46:59 watcher cloud-init[1030]: ci-info: |   4   |   ff00::/8  |    ::   |    eno1   |   U   |
Sep 15 20:46:59 watcher cloud-init[1030]: ci-info: +-------+-------------+---------+-----------+-------+
Sep 15 20:46:59 watcher systemd[1]: Started Initial cloud-init job (metadata service crawler).
Sep 15 20:46:59 watcher systemd[1]: Reached target Cloud-config availability.
Sep 15 20:46:59 watcher systemd[1]: Reached target Network is Online.
Sep 15 20:46:59 watcher systemd[1]: Starting iSCSI initiator daemon (iscsid)...
Sep 15 20:46:59 watcher iscsid[1080]: iSCSI logger with pid=1083 started!
Sep 15 20:46:59 watcher systemd[1]: Started iSCSI initiator daemon (iscsid).
Sep 15 20:46:59 watcher systemd[1]: Starting Availability of block devices...
Sep 15 20:46:59 watcher systemd[1]: Reached target Remote File Systems (Pre).
Sep 15 20:46:59 watcher systemd[1]: Mounting /mnt/video...
Sep 15 20:46:59 watcher kernel: No dialect specified on mount. Default has changed to a more secure dialect, SMB2.1 or later (e.g. SMB3), from CIFS (SMB1). To use the less secure SMB1 dialect to access old servers which do not support SMB3 (or SMB2.1) specify vers=1.0 on mount.
Sep 15 20:46:59 watcher systemd[1]: mnt-docker.mount: Directory /mnt/docker to mount over is not empty, mounting anyway.
Sep 15 20:46:59 watcher systemd[1]: Mounting /mnt/docker...
Sep 15 20:46:59 watcher systemd[1]: Mounting /mnt/Titan...
Sep 15 20:46:59 watcher systemd[1]: Started Availability of block devices.
Sep 15 20:46:59 watcher kernel: No dialect specified on mount. Default has changed to a more secure dialect, SMB2.1 or later (e.g. SMB3), from CIFS (SMB1). To use the less secure SMB1 dialect to access old servers which do not support SMB3 (or SMB2.1) specify vers=1.0 on mount.
Sep 15 20:46:59 watcher kernel: No dialect specified on mount. Default has changed to a more secure dialect, SMB2.1 or later (e.g. SMB3), from CIFS (SMB1). To use the less secure SMB1 dialect to access old servers which do not support SMB3 (or SMB2.1) specify vers=1.0 on mount.
Sep 15 20:46:59 watcher systemd[1]: Mounted /mnt/video.
Sep 15 20:46:59 watcher systemd[1]: Mounted /mnt/docker.
Sep 15 20:46:59 watcher systemd[1]: Mounted /mnt/Titan.
Sep 15 20:46:59 watcher systemd[1]: Reached target Remote File Systems.

  • Печать

Страницы: [1]   Вниз

Тема: [РЕШЕНО] Монтирование сетевой папки в fstab путь с пробелом  (Прочитано 18379 раз)

0 Пользователей и 1 Гость просматривают эту тему.

Оффлайн
winmasta

Монтирую сетевые папки 2 штуки в фстаб вот файл

Общие документы пробовал писать и так
после загрузки первая папка монтируется а вторая нет вот лог загрузки

где накосячил ?

« Последнее редактирование: 12 Марта 2011, 07:38:13 от winmasta »


Оффлайн
shumtest

//192.168.1.239/Общие40документы


Оффлайн
winmasta

//192.168.1.239/Общие40документы

спасибо заработало, был уверен что дело именно в пробеле, хотя из терминала монтировалось и с помощью , а 040 это пробел получается в utf8 ?


Оффлайн
AnrDaemon

0408 = 0x2016 = 3210 — ASCII код пробела.

Хотите получить помощь? Потрудитесь представить запрошенную информацию в полном объёме.

Прежде чем [Отправить], нажми [Просмотр] и прочти собственное сообщение. Сам-то понял, что написал?…


Оффлайн
winmasta

0408 = 0x2016 = 3210 — ASCII код пробела.

все ясно спасибо, вот еще вопрос возник: как сделать так чтобы примонтированная папка на рабочий стол не попадала и в меню «Переход» так сказать скрыть ее возможно ?


Оффлайн
AnrDaemon

Прежде чем что-то делать — задай себе вопрос. Зачем?

P.S.
Сам себе проблемы устраиваешь — потом бросаешься их решать.
НЕ МОНТИРУЙ РУКАМИ В /media !!!!!!!!!!!!!!! Не для тебя папка предназначена!!!

Хотите получить помощь? Потрудитесь представить запрошенную информацию в полном объёме.

Прежде чем [Отправить], нажми [Просмотр] и прочти собственное сообщение. Сам-то понял, что написал?…


Оффлайн
winmasta

Прежде чем что-то делать — задай себе вопрос. Зачем?

P.S.
Сам себе проблемы устраиваешь — потом бросаешься их решать.
НЕ МОНТИРУЙ РУКАМИ В /media !!!!!!!!!!!!!!! Не для тебя папка предназначена!!!

монтирую не руками а в fstab (я надеюсь это не одно и то же), отвечая на вопрос зачем: стоит клиент-банк, нужно экспорт и импорт в сетевую папку на винде, через fstab все сделал, но теперь эту папку видно и на рабочем столе и в меню Переход, а мне не хотелось бы чтобы юзеры туда тыкали и не дай бог там чтото накосячили (через media они вряд-ли туда попадут, а если все на виду, то могут залезть из интереса)


Оффлайн
AnrDaemon

монтирую не руками а в fstab (я надеюсь это не одно и то же)

«Я монтирую не руками, а руками»…
Руками монтируешь.
«Не руками» — это automount.

Хотите получить помощь? Потрудитесь представить запрошенную информацию в полном объёме.

Прежде чем [Отправить], нажми [Просмотр] и прочти собственное сообщение. Сам-то понял, что написал?…


Оффлайн
ArcFi

но теперь эту папку видно и на рабочем столе и в меню Переход

/mnt/<sharename>


Оффлайн
elvin_sochi

Доброго времени суток, подскажите выход.
Ситуация следующая: Провёл те же действия, что и топикстартер. При загрузке получаю:
mount: Сеть недоступна

mountall: mount /mnt/Kino [1397] прервано со статусом 32

mount: Сеть недоступна

mountall: mount /mnt/Muzzza [1396] прервано со статусом 32

Нажимаю, соответственно, два раза «S», чтобы пропустить монтирование этих двух папок, загрузка продолжается. Что интересно, папки при запуске оказываются примонтированными. Но вот как сделать загрузку автоматической?

Я сам из тех, кто Алфавит учил ещё по Букварю, а не по клавиатуре.


Оффлайн
ArcFi

elvin_sochi, сеть через что настроена?


Оффлайн
AnrDaemon

При загрузке получаю:
mount: Сеть недоступна

mountall: mount /mnt/Kino [1397] прервано со статусом 32

mount: Сеть недоступна

mountall: mount /mnt/Muzzza [1396] прервано со статусом 32

Нажимаю, соответственно, два раза «S», чтобы пропустить монтирование этих двух папок, загрузка продолжается. Что интересно, папки при запуске оказываются примонтированными. Но вот как сделать загрузку автоматической?

//host/share /mnt/dir cifs _netdev,

Хотите получить помощь? Потрудитесь представить запрошенную информацию в полном объёме.

Прежде чем [Отправить], нажми [Просмотр] и прочти собственное сообщение. Сам-то понял, что написал?…


Оффлайн
elvin_sochi

 Рядом стоит сервак, напрямую подключённый к машине во вторую сетевуху.  Сервак выполняет роль файлопомойки, данные расшарены через самбу.


Пользователь решил продолжить мысль 13 Марта 2011, 20:39:28:


Прошу прощение за тормознутость, моя сторока в fstab выглядит так:

//192.168.137.3/Muzzza   /mnt/Muzzza   cifs   user=elvin,iocharset=utf8,rw   0   0

Что именно надо поправить?


Пользователь решил продолжить мысль 13 Марта 2011, 21:01:50:


Большое спасибо за помощь, всё получилось.

« Последнее редактирование: 13 Марта 2011, 21:01:50 от elvin_sochi »

Я сам из тех, кто Алфавит учил ещё по Букварю, а не по клавиатуре.


Оффлайн
winmasta

монтирую не руками а в fstab (я надеюсь это не одно и то же)

«Я монтирую не руками, а руками»…
Руками монтируешь.
«Не руками» — это automount.

ясно, а где что почитать по автомаунту, я так понимаю надо не в фстаб строки писать а куда тогда ?


Пользователь решил продолжить мысль 14 Марта 2011, 14:00:26:


почитал, сделал, вроде работает но как-то через раз, бывает после перезагрузки оин шар не подключается, вот мой фстаб

файл .smbcredentials создал вручную написал там имя пользователя и пароль (я полагаю это можно было прям в фстабе сделать ? uid и gid был 1001 изначально, в свойствах папки где права появился юзер 1001 и группа 1001, сменил в строчке 1001 нга имя пользователя — все заработало, еще хотелось бы знать что там за цыфры 0 и 4 в конце строки, и еще один вопрос, в логе загрузки есть какие то ошибки, может что то все таки неверно я написал

но в любом случае сейчас все работает спасибо за помощь


Пользователь решил продолжить мысль 15 Марта 2011, 09:33:26:


последний пост все еще актуален — прописал 3ю папку, все 3 подключились после 4ой перезагрузки, что можно сделать для стабильной работы ?


Пользователь решил продолжить мысль 16 Марта 2011, 09:06:07:


добился стабильности и отсутствия ошибок путем монтирования через rc.local не могу понять почему это хуже чем fstab

« Последнее редактирование: 16 Марта 2011, 09:06:07 от winmasta »


Оффлайн
Greekionis

У меня тоже нихрена не монтируется через fstab, только rc.local помогает.


  • Печать

Страницы: [1]   Вверх

I’m trying to mount my local NAS on startup with a script that is called by a systemd-service. Yesterday I did the same on a Debian 11-Install and it worked. Today on Arch I run into the problem that the network is unreachable when the script is executed. This is the service:

[Unit]
Description=mount FRITZ.NAS network share
After=network-online.target
Wants=network-online.target

[Service]
Type=oneshot
ExecStart=/etc/systemd/system/connect_fritz_nas

[Install]
WantedBy=multi-user.target

And this is the executing script:

#!/bin/bash

### connecting to fritz nas
### cannot copy without "noserverino"-option

sudo mount -t cifs -o credentials=/home/user/.smbcredentials,vers=2.1,_netdev,noserverino,uid=1000,gid=1000 //192.168.178.1/FRITZ.NAS /home/user/networkshare

As I read in different posts and articles (arch wiki, freedesktop wiki), systemd-networkd.service needs to be enabled because of systemd-networkd-wait-online.service in order to reach network-online.target.

Nevertheless I receive this ouput when running systemctl status connect-fritz-nas.service after rebooting my system:

× connect-fritz-nas.service - mount FRITZ.NAS network share
     Loaded: loaded (/etc/systemd/system/connect-fritz-nas.service; enabled; vendor preset: disabled)
     Active: failed (Result: exit-code) since Tue 2022-01-04 09:24:08 CET; 17min ago
    Process: 513 ExecStart=/etc/systemd/system/connect_fritz_nas (code=exited, status=32)
   Main PID: 513 (code=exited, status=32)
        CPU: 19ms

Jan 04 09:24:08 wooden-arch-box systemd[1]: Starting mount FRITZ.NAS network share...
Jan 04 09:24:08 wooden-arch-box sudo[517]:     root : PWD=/ ; USER=root ; COMMAND=/usr/bin/mount -t cifs -o credentials=/home/hendrik/.smbcredentials,vers=2.1,_netdev,noserverino,uid=1000,gi>
Jan 04 09:24:08 wooden-arch-box sudo[517]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=0)
Jan 04 09:24:08 wooden-arch-box connect_fritz_nas[532]: mount error(101): Network is unreachable
Jan 04 09:24:08 wooden-arch-box connect_fritz_nas[532]: Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)
Jan 04 09:24:08 wooden-arch-box sudo[517]: pam_unix(sudo:session): session closed for user root
Jan 04 09:24:08 wooden-arch-box systemd[1]: connect-fritz-nas.service: Main process exited, code=exited, status=32/n/a
Jan 04 09:24:08 wooden-arch-box systemd[1]: connect-fritz-nas.service: Failed with result 'exit-code'.
Jan 04 09:24:08 wooden-arch-box systemd[1]: Failed to start mount FRITZ.NAS network share.

Telling me that the network is unreachable. I know I could use fstab as an alternative, but on fstab I run into the same issue. Did I oversee something or did I do something wrong?

Понравилась статья? Поделить с друзьями:
  • Motor storing ошибка даф 95
  • Motor starter туарег ошибка
  • Mount blade warband ошибка rgl error
  • Motor invert error перевод
  • Mount blade ii bannerlord вылетает ошибка