You are not logged in.

#1 2015-05-03 07:09:15

vinnom
Member
Registered: 2013-11-24
Posts: 59

[SOLVED]systemd-tmpfiles-setup.service failure

Hi guys,

I just reinstalled arch with the following partitions:

[root@arch_vinnom vinnom]# gdisk -l /dev/sda
GPT fdisk (gdisk) version 1.0.0

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.
Disk /dev/sda: 625142448 sectors, 298.1 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): BD3CA679-FA08-4F60-9BAD-B845DE9FF7EB
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 625142414
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048            4095   1024.0 KiB  EF02  BIOS
   2            4096        52432895   25.0 GiB    8300  ROOT
   3        52432896        53481471   512.0 MiB   8300  BOOT
   4        53481472        74452991   10.0 GiB    8300  TMP
   5        74452992        95424511   10.0 GiB    8300  VAR
   6        95424512       602935295   242.0 GiB   8300  HOME
   7       602935296       625142414   10.6 GiB    8200  SWAP

The problem is that tmpfs is mounted at '/tmp' through '/usr/lib/systemd/system/tmp.mount'

#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.

[Unit]
Description=Temporary Directory
Documentation=man:hier(7)
Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
ConditionPathIsSymbolicLink=!/tmp
DefaultDependencies=no
Conflicts=umount.target
Before=local-fs.target umount.target

[Mount]
What=tmpfs
Where=/tmp
Type=tmpfs
Options=mode=1777,strictatime

Because of this, I'm always getting:

● systemd-tmpfiles-setup.service - Create Volatile Files and Directories
   Loaded: loaded (/usr/lib/systemd/system/systemd-tmpfiles-setup.service; static; vendor preset: disabled)
   Active: failed (Result: exit-code) since Dom 2015-05-03 03:29:58 BRT; 27min ago
     Docs: man:tmpfiles.d(5)
           man:systemd-tmpfiles(8)
  Process: 278 ExecStart=/usr/bin/systemd-tmpfiles --create --remove --boot --exclude-prefix=/dev (code=exited, status=1/FAILURE)
 Main PID: 278 (code=exited, status=1/FAILURE)

Then I tried to change '/tmp' to '/run/tmpfs', folder that I created for this, using tmpfs wiki as reference.

#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.

[Unit]
Description=Temporary Directory
Documentation=man:hier(7)
Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
ConditionPathIsSymbolicLink=!/run/tmpfs
DefaultDependencies=no
Conflicts=umount.target
Before=local-fs.target umount.target

[Mount]
What=tmpfs
Where=/run/tmpfs
Type=tmpfs
Options=mode=1777,strictatime,nodev,nosuid,size=1536M

But the error persists. What I'm missing?

Last edited by vinnom (2015-05-03 16:51:38)

Offline

#2 2015-05-03 07:50:34

ooo
Member
Registered: 2013-04-10
Posts: 1,638

Re: [SOLVED]systemd-tmpfiles-setup.service failure

Couldn't you just mask the tmp.mount service? (as mentioned in the wiki page you linked)
Then your /tmp partition would be mounted according to your fstab

Offline

#3 2015-05-03 09:18:59

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: [SOLVED]systemd-tmpfiles-setup.service failure

The tmp.mount generated from your fstab should override the tmp.mount in /usr/lib/systemd/system. You say

The problem is that tmpfs is mounted at '/tmp' through '/usr/lib/systemd/system/tmp.mount'

If that is true (could you show output of mount and your fstab?) that is worth investigating.

However, your original problem seems to be that systemd-tmpfiles-setup.service fails. If something is wrong with your mounts, that could be related, but it might very well be something else. Is there any more information in the journal to indicate why the service fails (maybe even mentioning a tmpfiles.d config file that is responsible)? Did you create any config files for tmpfiles.d yourself?

Offline

#4 2015-05-03 13:24:48

foutrelis
Developer
From: Athens, Greece
Registered: 2008-07-28
Posts: 705
Website

Re: [SOLVED]systemd-tmpfiles-setup.service failure

Depending on how your /var file system is created/mounted, you might need to enable ACL on it:

https://wiki.archlinux.org/index.php/Sy … rt_at_boot

Offline

#5 2015-05-03 15:11:56

vinnom
Member
Registered: 2013-11-24
Posts: 59

Re: [SOLVED]systemd-tmpfiles-setup.service failure

ooo wrote:

Couldn't you just mask the tmp.mount service? (as mentioned in the wiki page you linked)
Then your /tmp partition would be mounted according to your fstab

Raynman wrote:

The tmp.mount generated from your fstab should override the tmp.mount in /usr/lib/systemd/system. You say

The problem is that tmpfs is mounted at '/tmp' through '/usr/lib/systemd/system/tmp.mount'

If that is true (could you show output of mount and your fstab?) that is worth investigating.

However, your original problem seems to be that systemd-tmpfiles-setup.service fails. If something is wrong with your mounts, that could be related, but it might very well be something else. Is there any more information in the journal to indicate why the service fails (maybe even mentioning a tmpfiles.d config file that is responsible)? Did you create any config files for tmpfiles.d yourself?

Sorry guys, I tried to be concise, but ended up that I didn't make myself clear.

My '/tmp' is mounting fine as it takes priority over systemd. In fact, what I wanted to say is that '/tmp' mounts fine, systemd tried to mount tmpfs at '/tmp' and fails and I want to point tmpfs to mount at '/run/tmpfs' which I created for this, but just editing '/usr/lib/systemd/system/tmp.mount' didn't solve.

As for journalctl, it repeats several times this message:

Mai 02 22:43:32 arch_vinnom systemd[1]: systemd-tmpfiles-setup.service: main process exited, code=exited, status=1/FAILURE
Mai 02 22:43:32 arch_vinnom systemd[1]: Failed to start Create Volatile Files and Directories.
Mai 02 22:43:32 arch_vinnom systemd[1]: Unit systemd-tmpfiles-setup.service entered failed state.
Mai 02 22:43:32 arch_vinnom systemd[1]: systemd-tmpfiles-setup.service failed.
foutrelis wrote:

Depending on how your '/var' file system is created/mounted, you might need to enable ACL on it:

https://wiki.archlinux.org/index.php/Sy … rt_at_boot

hmm

I created my /var during arch installation, with mkfs.reiserfs.

Using

tune2fs -l /dev/sdXY | grep "Default mount options:"

To check if acl was already enabled, I got:

[root@arch_vinnom vinnom]# tune2fs -l /dev/sda5 | grep "Default mount options:"
tune2fs: Bad magic number in super-block while trying to open /dev/sda5
Couldn't find valid filesystem superblock.

Then I searched a bit and noted that reiserfs isn't compatible with acl =/

Last edited by vinnom (2015-05-03 15:12:18)

Offline

#6 2015-05-03 16:28:33

foutrelis
Developer
From: Athens, Greece
Registered: 2008-07-28
Posts: 705
Website

Re: [SOLVED]systemd-tmpfiles-setup.service failure

vinnom wrote:

Then I searched a bit and noted that reiserfs isn't compatible with acl =/

Like most Linux file systems, ReiserFS supports ACL (assuming the kernel is built with CONFIG_REISERFS_FS_POSIX_ACL=y).

You just need to add the acl option to your /var partition in /etc/fstab.

Offline

#7 2015-05-03 16:50:51

vinnom
Member
Registered: 2013-11-24
Posts: 59

Re: [SOLVED]systemd-tmpfiles-setup.service failure

Oh! I think had found old topic about and as, for now, I'm using stock kernel, setting acl in fstab worked like a charm.

It solved, as you can see here:

systemctl status systemd-tmpfiles-setup.service
● systemd-tmpfiles-setup.service - Create Volatile Files and Directories
   Loaded: loaded (/usr/lib/systemd/system/systemd-tmpfiles-setup.service; static; vendor preset: disabled)
   Active: active (exited) since Dom 2015-05-03 13:44:45 BRT; 4min 44s ago
     Docs: man:tmpfiles.d(5)
           man:systemd-tmpfiles(8)
  Process: 283 ExecStart=/usr/bin/systemd-tmpfiles --create --remove --boot --exclude-prefix=/dev (code=exited, status=0/SUCCESS)
 Main PID: 283 (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/systemd-tmpfiles-setup.service

Mai 03 13:44:45 arch_vinnom systemd[1]: Starting Create Volatile Files and Directories...
Mai 03 13:44:45 arch_vinnom systemd[1]: Started Create Volatile Files and Directories.

Thank you guys, for your attention. I'll mark this as SOLVED.

Offline

Board footer

Powered by FluxBB