You are not logged in.

#1 2024-04-15 05:51:57

tzhuang
Member
Registered: 2017-05-23
Posts: 41

[Solved] Xorg start up scripts depend on network device

I have a bunch of xorg startup script that depend on the path /media (cmus, ranger, feh, etc.). This used to be a local path, but I've since moved it to a media server and would like to run everything as is by just mounting the nfs export to /media. I can mount the export fine manually, but when I mount it with fstab, I see that there are multiple mounts to that path:

$ mount | rg media
systemd-1 on /media type autofs (rw,relatime,fd=58,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=6546)
192.168.0.100:/srv/nfs on /media type nfs (rw,relatime,vers=3,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.0.100,mountvers=3,mountport=20048,mountproto=udp,local_lock=none,addr=192.168.0.100,_netdev,x-systemd.automount,x-systemd.mount-timeout=30)

Inside journalctl, I see that there were requests to mount to /media before my fstab:

Apr 15 01:48:17 jupiter systemd[1]: media.automount: Got automount request for /media, triggered by 1381 (ranger)
Apr 15 01:48:17 jupiter systemd[1]: Mounting /media...
Apr 15 01:48:17 jupiter kernel: netfs: FS-Cache loaded
Apr 15 01:48:17 jupiter kernel: Key type dns_resolver registered
Apr 15 01:48:17 jupiter kernel: NFS: Registering the id_resolver key type
Apr 15 01:48:17 jupiter kernel: Key type id_resolver registered
Apr 15 01:48:17 jupiter kernel: Key type id_legacy registered
Apr 15 01:48:17 jupiter rpc.mountd[637]: authenticated mount request from 192.168.0.100:824 for /srv/nfs (/srv/nfs)
Apr 15 01:48:17 jupiter nfsrahead[1653]: setting /media readahead to 128
Apr 15 01:48:17 jupiter systemd[1]: Mounted /media.

I'm not too sure what the correct way to set this up, but I guess I'm trying to have X start after the nfs mount is complete, possibly with a timeout, so X can still start if the NFS is not available. TIA!

EDIT: I'm just an idiot. Assigned the same static IP to two different machines. Nothing related to mounting at all.

Last edited by tzhuang (2024-04-15 06:13:40)

Offline

Board footer

Powered by FluxBB