Hi,

I'm playing with mount units as a replacement of traditional fstab
declaration as I'd like to use some systemd facilities, for example
requirements between services and their underlying storage.

The systemd.mount(5) manual says:
  If the mount point is not existing at time of mounting, it
  is created.

That seems to work fine when I run manually:
  [root@localhost ~]# ls -d /foo/bar/
  ls: cannot access /foo/bar/: No such file or directory
  [root@localhost ~]# systemctl start foo-bar.mount 
  [root@localhost ~]# ls -d /foo/bar/
  /foo/bar/

However, when the unit is run at boot-time (because it has been
enabled), I get the following when the mount point doesn't exist:
  [root@localhost ~]# systemctl status foo-bar.mount
  foo-bar.mount - /foo/bar
          Loaded: loaded (/lib/systemd/system/foo-bar.mount; enabled)
          Active: failed since Thu, 05 Jan 2012 18:01:05 +0800; 3min 57s ago
           Where: /foo/bar
            What: tmpfs
         Process: 427 ExecMount=/bin/mount tmpfs /foo/bar -t tmpfs
(code=exited, status=32)
          CGroup: name=systemd:/system/foo-bar.mount
  [root@localhost ~]# dmesg | grep -F [427]
  [    9.450625] mount[427]: mount: mount point /foo/bar does not exist


Here is the content of my unit:
  [root@localhost ~]# cat /lib/systemd/system/foo-bar.mount
  [Unit]
  Description=/foo/bar
  
  [Mount]
  What=tmpfs
  Where=/foo/bar
  Type=tmpfs
  
  [Install]
  WantedBy=local-fs.target


Did I miss something?

This is on Fedora 16 with systemd-37-3.fc16.x86_64


-- 
Mathieu


_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to