[systemd-devel] using native *.mount units instead of /etc/fstab - unpredictable state in case of many disks

Kay Sievers kay at vrfy.org
Sun Jun 3 11:42:52 PDT 2012


On Sun, Jun 3, 2012 at 8:18 PM, Peter Lemenkov <lemenkov at gmail.com> wrote:
> I've hit by a strange issue on a machine with 8 hard disks. if I list
> them all in /etc/fstab they mounts fine. If I provide native *.mount
> files then almost every reboot one or several disks failed to mount
> (with 32 error, e.g. "code=exited, status=32", which means that no
> hadrwae is available at the moment of mount attempt, wrong fs, etc).

> [Unit]
> Description=Random Stuff Directory
> #After=media.mount systemd-udev-settle.service dev-disk-by\x2dlabel-heap.device
>
> After=media.mount
> Before=nfs-server.service
>
> [Mount]
> #What=LABEL="heap"
> What=/dev/disk/by-label/heap
> Where=/media/heap
> Type=xfs
> Options=defaults,noatime,nodiratime
>
> ===================================================
>
> You can see - I tried to start it after systemd-udev service as well
> as after appropriate *.device but w/o success. Also I tried to mount
> using labels and using corresponding paths. No success either.

The unit media.mount does not exist anymore in the recent system version.

After=*.device would only work if the device is already there, and can
be included in the transaction, but then the After= should have no
effect.

> Could someone point me out what did I miss? I'm sure there is some
> specific *.service or *.target file I must add it as a dependency.
> Fedora 18 if it matters.

Maybe this works:
  After=local-fs-pre.target
and hook it into
  /usr/lib/systemd/system/local-fs.target.wants

Kay


More information about the systemd-devel mailing list