On 08/01/2011 05:43 PM, Lennart Poettering wrote: > On Fri, 29.07.11 11:16, Steve Dickson ([email protected]) wrote: > >> I'm trying to automount /var/lib/nfs/rpc_pipefs >> for the nfs-idmap.service >> >> var-lib-nfs-rpc_pipefs.mount is: >> [Unit] >> Description=RPC Pipe File System >> DefaultDependencies=no >> >> [Mount] >> What=sunrpc >> Where=/var/lib/nfs/rpc_pipefs >> Type=rpc_pipefs > > Looks good. > >> >> var-lib-nfs-rpc_pipefs.automount is: >> [Unit] >> Description=RPC Pipe File System >> DefaultDependencies=no >> >> [Automount] >> Where=/var/lib/nfs/rpc_pipefs > > Looks good, too. But I'd recommend adding After=local-fs.target here, to > ensure your automount unit is established after /var is, if that's on a > separate partition. Added.
> >> and the nfs-idmap.service is: >> [Unit] >> Description=Name to UID/GID mapping for NFSv4. >> After=syslog.target network.target var-lib-nfs-rpc_pipefs.automount >> ConditionPathIsDirectory=/sys/module/sunrpc > > Is this really dependent on the network? If not I'd recommend to > ordering this after network.target. No, so I removed the network.target. > > Also, in F16 we will no longer support non-socket-activated syslogs (all > existing implementations have support for socket actviation upstream), > so the After=syslog.target is not necessary anymore. Ok. I remove the syslog.target so the after line is: After=var-lib-nfs-rpc_pipefs.automount > >> [Service] >> Type=forking >> EnvironmentFile=-/etc/sysconfig/nfs >> ExecStart=/usr/sbin/rpc.idmapd $RPCIDMAPDARGS >> >> [Install] >> WantedBy=multi-user.target >> >> Now I know for a fact that /var/lib/nfs/rpc_pipefs >> is being mount *after* the nfs-idmap.service >> is run, because: > > being mounted? Yes. Once the machine comes up the sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw,relatime) mount exists. But its not being mounted soon enough because for the nfs-idmap.service. > > You mean the automount point being established, not the backing mount, right? I'm not sure what you are asking me. > >> rpc.idmapd is failing because >> rpc.idmapd[819]: main: open(/var/lib/nfs/rpc_pipefs//nfs): No such file >> or >> directory >> >> and the startup message clearly show the service is being >> run before the mount: >> >> Starting Name to UID/GID mapping for NFSv4.... >> Starting OpenSSH server daemon.... >> Started OpenSSH server daemon.. >> Starting RPC bind service... >> Starting Sendmail Mail Transport Agent... >> Started LSB: Mount and unmount network filesystems.. >> [ 25.803165] RPC: Registered named UNIX socket transport module. >> [ 25.804236] RPC: Registered udp transport module. >> [ 25.805327] RPC: Registered tcp transport module. >> [ 25.806283] RPC: Registered tcp NFSv4.1 backchannel transport module. >> [ 25.889822] SELinux: initialized (dev rpc_pipefs, type rpc_pipefs), uses >> genfs_contexts >> >> So any idea what on what I'm doing wrong? Is this how autmounts are >> suppose be used? > > Yes, this looks like a good usecase. > > Hmm, does the automount point work after boot? It seems so, because if I restart nfs-idmap.service the service comes up. > > How does the output of "systemctl list-units" look like for the > automount and mount unit? > attached. steved.
dev-hugepages.automount loaded active waiting Huge Pages File System Automount Point dev-mqueue.automount loaded active waiting POSIX Message Queue File System Automount Point proc-sys...misc.automount loaded active waiting Arbitrary Executable File Formats File System Automount Point sys-kern...ebug.automount loaded active waiting Debug File System Automount Point sys-kern...rity.automount loaded active waiting Security File System Automount Point sys-devi...ock-sr0.device loaded active plugged QEMU_DVD-ROM sys-devi...et-eth0.device loaded active plugged /sys/devices/pci0000:00/0000:00:03.0/virtio0/net/eth0 sys-devi...d-card0.device loaded active plugged /sys/devices/pci0000:00/0000:00:04.0/sound/card0 sys-devi...da-vda1.device loaded active plugged /sys/devices/pci0000:00/0000:00:05.0/virtio1/block/vda/vda1 sys-devi...da-vda2.device loaded active plugged /sys/devices/pci0000:00/0000:00:05.0/virtio1/block/vda/vda2 sys-devi...ock-vda.device loaded active plugged /sys/devices/pci0000:00/0000:00:05.0/virtio1/block/vda sys-devi...y-ttyS0.device loaded active plugged /sys/devices/platform/serial8250/tty/ttyS0 sys-devi...y-ttyS1.device loaded active plugged /sys/devices/platform/serial8250/tty/ttyS1 sys-devi...y-ttyS2.device loaded active plugged /sys/devices/platform/serial8250/tty/ttyS2 sys-devi...y-ttyS3.device loaded active plugged /sys/devices/platform/serial8250/tty/ttyS3 sys-devi...dm\x2d0.device loaded active plugged /sys/devices/virtual/block/dm-0 sys-devi...dm\x2d1.device loaded active plugged /sys/devices/virtual/block/dm-1 sys-devi...dm\x2d2.device loaded active plugged /sys/devices/virtual/block/dm-2 sys-devi...dm\x2d3.device loaded active plugged /sys/devices/virtual/block/dm-3 sys-devi...dm\x2d4.device loaded active plugged /sys/devices/virtual/block/dm-4 sys-devi...ty-tty0.device loaded active plugged /sys/devices/virtual/tty/tty0 sys-devi...ty-tty1.device loaded active plugged /sys/devices/virtual/tty/tty1 sys-devi...y-tty10.device loaded active plugged /sys/devices/virtual/tty/tty10 sys-devi...y-tty11.device loaded active plugged /sys/devices/virtual/tty/tty11 sys-devi...y-tty12.device loaded active plugged /sys/devices/virtual/tty/tty12 sys-devi...ty-tty2.device loaded active plugged /sys/devices/virtual/tty/tty2 sys-devi...ty-tty3.device loaded active plugged /sys/devices/virtual/tty/tty3 sys-devi...ty-tty4.device loaded active plugged /sys/devices/virtual/tty/tty4 sys-devi...ty-tty5.device loaded active plugged /sys/devices/virtual/tty/tty5 sys-devi...ty-tty6.device loaded active plugged /sys/devices/virtual/tty/tty6 sys-devi...ty-tty7.device loaded active plugged /sys/devices/virtual/tty/tty7 sys-devi...ty-tty8.device loaded active plugged /sys/devices/virtual/tty/tty8 sys-devi...ty-tty9.device loaded active plugged /sys/devices/virtual/tty/tty9 -.mount loaded active mounted / boot.mount loaded active mounted /boot home.mount loaded active mounted /home media.mount loaded active mounted Media Directory proc-fs-nfsd.mount loaded active mounted /proc/fs/nfsd usr.mount loaded active mounted /usr var-lib-...c_pipefs.mount loaded active mounted RPC Pipe File System var-lock.mount loaded active mounted Lock Directory var-run.mount loaded active mounted Runtime Directory var.mount loaded active mounted /var systemd-...-plymouth.path loaded active waiting Forward Password Requests to Plymouth Directory Watch systemd-...word-wall.path loaded active waiting Forward Password Requests to Wall Directory Watch acpid.service loaded active running ACPI Event Daemon atd.service loaded active running Job spooling tools auditd.service loaded active running SYSV: This starts the Linux Auditing System Daemon, which collects security related events in a dedicated audit log. If this daemon is turned off, audit events will be sent to syslog. console-...daemon.service loaded active running Console Manager console-...-start.service loaded active exited Console System Startup Logging crond.service loaded active running Command Scheduler dbus.service loaded active running D-Bus System Message Bus fedora-autoswap.service loaded active exited Enable all detected swap partitions fedora-l...odules.service loaded active exited Load legacy module configuration fedora-readonly.service loaded active exited Configure read-only root support fedora-s...t-late.service loaded active exited Initialize storage subsystems (RAID, LVM, etc.) fedora-s...e-init.service loaded active exited Initialize storage subsystems (RAID, LVM, etc.) fedora-w...torage.service loaded active exited Wait for storage scan [email protected] loaded active running Getty on tty1 [email protected] loaded active running Getty on tty2 [email protected] loaded active running Getty on tty3 [email protected] loaded active running Getty on tty4 [email protected] loaded active running Getty on tty5 [email protected] loaded active running Getty on tty6 lvm2-monitor.service loaded active exited Monitoring of LVM2 mirrors, snapshots etc. using dmeventd or progress polling mcelog.service loaded active running Machine Check Exception Logging Daemon mdmonito...keover.service loaded active exited Software RAID Monitor Takeover mdmonitor.service loaded active running Software RAID monitoring and management netfs.service loaded active exited LSB: Mount and unmount network filesystems. NetworkManager.service loaded active running Network Manager nfs-idmap.service loaded failed failed Name to UID/GID mapping for NFSv4. nfs-lock.service loaded active running NFS file locking service. nfs-server.service loaded active exited NFS Protocol Daemon rc-local.service loaded active exited /etc/rc.local Compatibility remount-rootfs.service loaded active exited Remount Root FS rpcbind.service loaded active running RPC bind service rsyslog.service loaded active running System Logging Service sendmail.service loaded active running Sendmail Mail Transport Agent [email protected] loaded active running Serial Getty on ttyS0 sm-client.service loaded active running Sendmail Mail Transport Client smartd.service loaded active running Self Monitoring and Reporting Technology (SMART) Daemon sshd-keygen.service loaded active exited SSH server keys generation. sshd.service loaded active running OpenSSH server daemon. sysstat.service loaded active exited LSB: Reset the system activity logs systemd-logger.service loaded active running Stdio Syslog Bridge systemd-logind.service loaded active running Login Service systemd-...pi-vfs.service loaded active exited Remount API VFS systemd-sysctl.service loaded active exited Apply Kernel Variables systemd-...-setup.service loaded active exited Recreate Volatile Files and Directories systemd-...ssions.service loaded active exited Permit User Sessions systemd-...-setup.service loaded active exited Setup Virtual Console udev-settle.service loaded active exited udev Wait for Complete Device Initialization udev-trigger.service loaded active exited udev Coldplug all Devices udev.service loaded active running udev Kernel Device Manager dbus.socket loaded active running D-Bus System Message Bus Socket dm-event.socket loaded active listening Device-mapper event daemon FIFOs rpcbind.socket loaded active listening RPCbind Server Activation Socket syslog.socket loaded active running Syslog Socket systemd-initctl.socket loaded active listening /dev/initctl Compatibility Named Pipe systemd-logger.socket loaded active running Stdio Syslog Bridge Socket systemd-shutdownd.socket loaded active listening Delayed Shutdown Socket udev-control.socket loaded active running udev Control Socket udev-kernel.socket loaded active running udev Kernel Socket basic.target loaded active active Basic System cryptsetup.target loaded active active Encrypted Volumes getty.target loaded active active Login Prompts local-fs.target loaded active active Local File Systems multi-user.target loaded active active Multi-User network.target loaded active active Network remote-fs.target loaded active active Remote File Systems sockets.target loaded active active Sockets sound.target loaded active active Sound Card swap.target loaded active active Swap sysinit.target loaded active active System Initialization syslog.target loaded active active Syslog systemd-...es-clean.timer loaded active waiting Daily Cleanup of Temporary Directories
_______________________________________________ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
