AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • Início
  • system&network
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • Início
  • system&network
    • Recentes
    • Highest score
    • tags
  • Ubuntu
    • Recentes
    • Highest score
    • tags
  • Unix
    • Recentes
    • tags
  • DBA
    • Recentes
    • tags
  • Computer
    • Recentes
    • tags
  • Coding
    • Recentes
    • tags
Início / computer / Perguntas / 1596715
Accepted
user515655
user515655
Asked: 2020-10-24 02:14:25 +0800 CST2020-10-24 02:14:25 +0800 CST 2020-10-24 02:14:25 +0800 CST

Não é possível montar o nfs na inicialização, mas funciona manualmente "A rede está inacessível" com systemd

  • 772

A caixa Debian 10 não montará o compartilhamento NFS de /etc/fstab, no entanto, a execução mount -amonta o referido compartilhamento. Notei um tempo de inicialização mais longo.

# systemctl status home-user-weather-images.mount
● home-user-weather-images.mount - /home/user/weather/images
   Loaded: loaded (/etc/fstab; enabled-runtime; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fri 2020-10-23 05:36:34 EDT; 1min 1s ago
    Where: /home/user/weather/images
     What: 192.168.1.115:/volume1/user/Pictures/NOAA-images/
     Docs: man:fstab(5)
           man:systemd-fstab-generator(8)

 Oct 23 05:36:34 host systemd[1]: Mounting /home/user/weather/images...
 Oct 23 05:36:34 host mount[529]: mount.nfs: Network is unreachable 
 Oct 23 05:36:34 host systemd[1]: home-user-weather-images.mount: Mount
 process exited, code=exited, status=32/n/a
 Oct 23 05:36:34 host systemd[1]: home-user-weather-images.mount: Failed with result
 'exit-code'. 
 Oct 23 05:36:34 host systemd[1]: Failed to mount /home/user/weather/images.

Aqui estão as entradas do fstab que tentei:

 192.168.1.115:/volume1/user/Pictures/NOAA-images/       /home/user/weather/images nfs
 ac,user,nfsvers=3,x-systemd.requires=network-online.target,x-systemd.device-timeout=100
 0 0
 
 192.168.1.115:/volume1/user/Pictures/NOAA-images/       /home/user/weather/images nfs ac,user,nfsvers=3,_netdev 0 0

Também tentei, sem sucesso:

 systemctl reenable home-user-weather-images.mount
 systemctl daemon-reload

Aqui está a aparência do serviço da entrada fstab ao usar as opções do x-systemd:

# Automatically generated by systemd-fstab-generator

[Unit]
SourcePath=/etc/fstab
Documentation=man:fstab(5) man:systemd-fstab-generator(8)
Before=remote-fs.target
After=network-online.target
Requires=network-online.target

[Mount]
Where=/home/user/weather/images
What=192.168.1.115:/volume1/user/Pictures/NOAA-images/
Type=nfs
Options=ac,user,nfsvers=3,x-systemd.requires=network-online.target

# dmesg | grep fstab
[    5.157559] systemd-fstab-generator[260]: x-systemd.device-timeout ignored for 192.168.1.115:/volume1/user/Pictures/NOAA-images/
[  114.512926] systemd-fstab-generator[1025]: x-systemd.device-timeout ignored for 192.168.1.115:/volume1/user/Pictures/NOAA-images/
[  470.095851] systemd-fstab-generator[1162]: x-systemd.device-timeout ignored for 192.168.1.115:/volume1/user/Pictures/NOAA-images/

# dmesg | grep nfs
[no output]
linux boot
  • 2 2 respostas
  • 3395 Views

2 respostas

  • Voted
  1. Best Answer
    Reda Salih
    2020-10-24T03:25:26+08:002020-10-24T03:25:26+08:00

    Sugiro duas ações:

    1- Adicionando o seguinte às opções de montagem para atrasar a montagem por algum momento:

    [Mount]
        Options=late,nofail,x-systemd.automount,x-systemd.requires=network-online.target,x-systemd.device-timeout=10 0 0
    

    2- Na seção Instalar adicione o acima para que a montagem nfs seja montada antes de atingir o destino remote-fs .

    [Install] WantedBy=remote-fs.target
    

    Às vezes, pode ser devido à resolução do DNS, mas não estou vendo aqui.

    EDIT : Como você tem uma interface eno0 incorporada, você deve declará-la na configuração do DHCP com o nome correto, razão pela qual você não pode encontrar o dispositivo eth0 e, às vezes, habilitar / desabilitar o NetworkManager pode causar confusão na nomenclatura da NIC.

    • 0
  2. user515655
    2020-10-25T01:09:06+08:002020-10-25T01:09:06+08:00

    O arquivo /etc/network/interfaces.d/setupprecisa ser editado para refletir o dispositivo adequado de eth0 a eno1.

    networking.service também falhou (mas de alguma forma a rede consegue funcionar). Meus arquivos /etc/default/networking e /etc/dhcp/* não foram modificados. Aqui está a saída de journalctl -u networking.service:

    -- Logs begin at Fri 2020-10-23 06:57:31 EDT, end at Fri 2020-10-23 07:00:15 EDT. --
    Oct 23 06:57:32 host systemd[1]: Starting Raise network interfaces...
    Oct 23 06:57:32 host ifup[425]: Internet Systems Consortium DHCP Client 4.4.1
    Oct 23 06:57:32 host ifup[425]: Copyright 2004-2018 Internet Systems Consortium.
    Oct 23 06:57:32 host ifup[425]: All rights reserved.
    Oct 23 06:57:32 host ifup[425]: For info, please visit https://www.isc.org/software/dhcp/
    Oct 23 06:57:32 host dhclient[492]: Internet Systems Consortium DHCP Client 4.4.1
    Oct 23 06:57:32 host dhclient[492]: Copyright 2004-2018 Internet Systems Consortium.
    Oct 23 06:57:32 host dhclient[492]: All rights reserved.
    Oct 23 06:57:32 host dhclient[492]: For info, please visit https://www.isc.org/software/dhcp/
    Oct 23 06:57:32 host dhclient[492]: 
    Oct 23 06:57:32 host ifup[425]: Cannot find device "eth0"
    Oct 23 06:57:32 host dhclient[492]: Failed to get interface index: No such device
    Oct 23 06:57:32 host ifup[425]: Failed to get interface index: No such device
    Oct 23 06:57:32 host ifup[425]: If you think you have received this message due to a bug rather
    Oct 23 06:57:32 host ifup[425]: than a configuration issue please read the section on submitting
    Oct 23 06:57:32 host ifup[425]: bugs on either our web page at www.isc.org or in the README file
    Oct 23 06:57:32 host ifup[425]: before submitting a bug.  These pages explain the proper
    Oct 23 06:57:32 host ifup[425]: process and the information we find helpful for debugging.
    Oct 23 06:57:32 host ifup[425]: exiting.
    Oct 23 06:57:32 host dhclient[492]: 
    Oct 23 06:57:32 host dhclient[492]: If you think you have received this message due to a bug rather
    Oct 23 06:57:32 host dhclient[492]: than a configuration issue please read the section on submitting
    Oct 23 06:57:32 host dhclient[492]: bugs on either our web page at www.isc.org or in the README file
    Oct 23 06:57:32 host dhclient[492]: before submitting a bug.  These pages explain the proper
    Oct 23 06:57:32 host dhclient[492]: process and the information we find helpful for debugging.
    Oct 23 06:57:32 host dhclient[492]: 
    Oct 23 06:57:32 host dhclient[492]: exiting.
    

    No entanto, meu dispositivo ethernet é eno1:

    $ ip link
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
        link/ether 54:b2:03:8d:53:f6 brd ff:ff:ff:ff:ff:ff
    

    Verificando o dmesg novamente...

    # dmesg | grep -i eth
    [    3.170430] e1000e 0000:00:1f.6 eth0: (PCI Express:2.5GT/s:Width x1) 54:b2:03:8d:53:f6
    [    3.170431] e1000e 0000:00:1f.6 eth0: Intel(R) PRO/1000 Network Connection
    [    3.170489] e1000e 0000:00:1f.6 eth0: MAC: 12, PHY: 12, PBA No: FFFFFF-0FF
    [    3.171438] e1000e 0000:00:1f.6 eno1: renamed from eth0
    

    De volta ao Google, pesquisou por que o ifup não consegue encontrar a interface renomeada. Me deparei com esta resposta . Verificando meu /etc/network/interfaces.d/setup:

    auto lo
    iface lo inet loopback
    
    auto eth0
    iface eth0 inet dhcp
    

    ... parece a arma fumegante. Eu nunca editei este arquivo; esta é uma instalação de uma semana, então não sei por que esse problema se manifestou. Editado isso, reverteu o fstab para as entradas não x-systemd e uma reinicialização. Agora funciona.

    Antes de considerar responder minha própria pergunta, seria interessante se alguém pudesse explicar por que essa bagunça aconteceu em primeiro lugar, então essa poderia ser a 'melhor resposta'.

    • 0

relate perguntas

  • Como eu faria minha máquina Linux parecer que está executando o Windows?

  • Existe um equivalente a cd - para cp ou mv?

  • execute o contêiner do docker como root

  • Como ativar o sensor de impressão digital no domínio e no diretório ativo do Linux

  • Como alterar permanentemente Ctrl + C para Ctrl + K no CentOS 7?

Sidebar

Stats

  • Perguntas 205573
  • respostas 270741
  • best respostas 135370
  • utilizador 68524
  • Highest score
  • respostas
  • Marko Smith

    Como posso reduzir o consumo do processo `vmmem`?

    • 11 respostas
  • Marko Smith

    Baixar vídeo do Microsoft Stream

    • 4 respostas
  • Marko Smith

    O Google Chrome DevTools falhou ao analisar o SourceMap: chrome-extension

    • 6 respostas
  • Marko Smith

    O visualizador de fotos do Windows não pode ser executado porque não há memória suficiente?

    • 5 respostas
  • Marko Smith

    Como faço para ativar o WindowsXP agora que o suporte acabou?

    • 6 respostas
  • Marko Smith

    Área de trabalho remota congelando intermitentemente

    • 7 respostas
  • Marko Smith

    O que significa ter uma máscara de sub-rede /32?

    • 6 respostas
  • Marko Smith

    Ponteiro do mouse movendo-se nas teclas de seta pressionadas no Windows?

    • 1 respostas
  • Marko Smith

    O VirtualBox falha ao iniciar com VERR_NEM_VM_CREATE_FAILED

    • 8 respostas
  • Marko Smith

    Os aplicativos não aparecem nas configurações de privacidade da câmera e do microfone no MacBook

    • 5 respostas
  • Martin Hope
    CiaranWelsh Como posso reduzir o consumo do processo `vmmem`? 2020-06-10 02:06:58 +0800 CST
  • Martin Hope
    Jim Pesquisa do Windows 10 não está carregando, mostrando janela em branco 2020-02-06 03:28:26 +0800 CST
  • Martin Hope
    v15 Por que uma conexão de Internet gigabit/s via cabo (coaxial) não oferece velocidades simétricas como fibra? 2020-01-25 08:53:31 +0800 CST
  • Martin Hope
    fixer1234 O "HTTPS Everywhere" ainda é relevante? 2019-10-27 18:06:25 +0800 CST
  • Martin Hope
    andre_ss6 Área de trabalho remota congelando intermitentemente 2019-09-11 12:56:40 +0800 CST
  • Martin Hope
    Riley Carney Por que colocar um ponto após o URL remove as informações de login? 2019-08-06 10:59:24 +0800 CST
  • Martin Hope
    zdimension Ponteiro do mouse movendo-se nas teclas de seta pressionadas no Windows? 2019-08-04 06:39:57 +0800 CST
  • Martin Hope
    jonsca Todos os meus complementos do Firefox foram desativados repentinamente, como posso reativá-los? 2019-05-04 17:58:52 +0800 CST
  • Martin Hope
    MCK É possível criar um código QR usando texto? 2019-04-02 06:32:14 +0800 CST
  • Martin Hope
    SoniEx2 Altere o nome da ramificação padrão do git init 2019-04-01 06:16:56 +0800 CST

Hot tag

windows-10 linux windows microsoft-excel networking ubuntu worksheet-function bash command-line hard-drive

Explore

  • Início
  • Perguntas
    • Recentes
    • Highest score
  • tag
  • help

Footer

AskOverflow.Dev

About Us

  • About Us
  • Contact Us

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve