You are not logged in.

#1 2012-11-01 14:06:08

realdarkman
Member
Registered: 2012-04-24
Posts: 12

Migrate to systemd with some problems

Hi all,

I updated via pacman to gnome 3.6 and systemd but cups cannot be started:

cups.service - CUPS Printing Service
	  Loaded: loaded (/usr/lib/systemd/system/cups.service; enabled)
	  Active: failed (Result: exit-code) since Thu, 2012-11-01 14:57:02 CET; 2s ago
	 Process: 14083 ExecStart=/usr/sbin/cupsd -f (code=exited, status=226/NAMESPACE)
	  CGroup: name=systemd:/system/cups.service

Nov 01 14:57:02 archlinux systemd[1]: Starting CUPS Printing Service...
Nov 01 14:57:02 archlinux systemd[1]: Started CUPS Printing Service.
Nov 01 14:57:02 archlinux systemd[1]: cups.service: main process exited, code=exited, status=226/NAMESPACE
Nov 01 14:57:02 archlinux systemd[1]: Unit cups.service entered failed state

With systemctl start cups.socket it starts, but systemd and journald will push up the CPU to 100%!


With ntpd the same:

ntpd.service - Network Time Service
	  Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled)
	  Active: failed (Result: exit-code) since Thu, 2012-11-01 15:00:49 CET; 9s ago
	 Process: 14125 ExecStart=/usr/bin/ntpd -g -u ntp:ntp (code=exited, status=226/NAMESPACE)
	  CGroup: name=systemd:/system/ntpd.service

Nov 01 15:00:49 archlinux systemd[1]: Starting Network Time Service...
Nov 01 15:00:49 archlinux systemd[1]: Failed to start Network Time Service.
Nov 01 15:00:49 archlinux systemd[1]: Unit ntpd.service entered failed state

Any hints?

Thanks!
Chris

Offline

#2 2012-11-01 14:47:35

brain0
Developer
From: Aachen - Germany
Registered: 2005-01-03
Posts: 1,382

Re: Migrate to systemd with some problems

Your /var/tmp is a symlink to /tmp. This breaks systemd's PrivateTmp features.

Offline

#3 2012-11-01 14:49:43

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: Migrate to systemd with some problems

@brain0, I am curious as to how you knew that from what he provided there?  Is that what the "status=226/NAMESPACE" is referring to?

Offline

#4 2012-11-01 15:04:58

brain0
Developer
From: Aachen - Germany
Registered: 2005-01-03
Posts: 1,382

Re: Migrate to systemd with some problems

I had this problem before, and 226/NAMESPACE indicates that namespace creation fails.

Offline

#5 2012-11-01 15:06:42

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: Migrate to systemd with some problems

Okay, cool thanks brain0.

Offline

#6 2012-11-01 16:25:19

realdarkman
Member
Registered: 2012-04-24
Posts: 12

Re: Migrate to systemd with some problems

@brain0:
That's it, thank you very much for this short and effective hint! big_smile

I use a SSD for the system, /tmp is tmpfs. Is there a way to use /var/tmp with tmpfs too without symlink?

Offline

#7 2012-11-01 16:30:06

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: Migrate to systemd with some problems

I think that /var/tmp is not supposed to be on tmpfs and can cause real problems if it is.  With SSDs these days, you really need not worry about overwriting them.  It has been shown that with wear leveling algorithms and quality flash, it will in many cases outlast the hardware (ie the controllers will burn out before the flash).  Though i guess if space is an issue, trying to utilize tmpfs as much as possible makes mroe sense.  You know you can set /var/log up as a tmpfs, though this is probably not recommended, as you will have zero persistent logs after that.

Offline

#8 2012-11-01 18:36:57

realdarkman
Member
Registered: 2012-04-24
Posts: 12

Re: Migrate to systemd with some problems

WonderWoofy wrote:

I think that /var/tmp is not supposed to be on tmpfs and can cause real problems if it is.

Ok, why? What problems?

Offline

#9 2012-11-01 18:47:22

65kid
Member
From: Germany
Registered: 2011-01-26
Posts: 663

Re: Migrate to systemd with some problems

Because afaik the data in /var/tmp is supposed to survive reboots and software must be able to rely on that. Otherwise we wouldn't have both /tmp and /var/tmp.

Offline

#10 2012-11-01 19:44:31

brain0
Developer
From: Aachen - Germany
Registered: 2005-01-03
Posts: 1,382

Re: Migrate to systemd with some problems

realdarkman wrote:

I use a SSD for the system, /tmp is tmpfs. Is there a way to use /var/tmp with tmpfs too without symlink?

As was stated before, this is not recommended. Of course, you can mount a tmpfs on /var/tmp, either by adding an entry to fstab or by using a mount unit.

Offline

#11 2012-11-01 21:25:10

realdarkman
Member
Registered: 2012-04-24
Posts: 12

Re: Migrate to systemd with some problems

Ok, I added an new entry in fstab. Two tmpfs was mounted at boot time, first on /tmp and second on /var/tmp:

tmpfs		/tmp		tmpfs	nodev,nosuid		0	0
tmpfs		/var/tmp	tmpfs	nodev,nosuid		0	0

It works! Is that okay?

Offline

#12 2012-11-01 21:30:30

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,097
Website

Re: Migrate to systemd with some problems

No. Get rid of both of those. /usr/lib/systemd/system/tmp.mount covers mounting a tmpfs on /tmp, and /var/tmp is necessarily not tmpfs.

Last edited by falconindy (2012-11-01 21:31:30)

Offline

#13 2012-11-01 21:32:56

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: Migrate to systemd with some problems

@falconindy, I understand getting rid of the /var/tmp, but /tmp on a tmpfs is actually how fstab ships.  How come you say this should not be so?

Offline

#14 2012-11-01 21:51:29

headkase
Member
From: Canada
Registered: 2011-12-06
Posts: 1,579
Website

Re: Migrate to systemd with some problems

Yes, falconindy, I have:

tmpfs		/tmp	tmpfs	nodev,nosuid	0	0

In my /etc/fstab as well.  It was automatically generated by genfstab when I installed.

Edit: in my fstab I have no other tmp entries, the only other entries are for my actual partitions.

Edit2: I commented out the tmpfs line in my fstab, systemd on reboot did create a tmpfs mount at /tmp anyway.  That is the tmp.mount that falconindy was referring to I believe. wink

Last edited by headkase (2012-11-01 21:59:53)


We all make choices, but in the end, our choices make us.

Offline

#15 2012-11-01 22:17:59

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: Migrate to systemd with some problems

Okay that makes a bit more sense then.  falconindy's initial respons was simply to get rid of those.  I was unaware that it was already taken care of by systemd.

Offline

#16 2012-11-01 22:19:39

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,097
Website

Re: Migrate to systemd with some problems

headkase wrote:

Yes, falconindy, I have:

tmpfs		/tmp	tmpfs	nodev,nosuid	0	0

In my /etc/fstab as well.  It was automatically generated by genfstab when I installed.

Edit: in my fstab I have no other tmp entries, the only other entries are for my actual partitions.

Edit2: I commented out the tmpfs line in my fstab, systemd on reboot did create a tmpfs mount at /tmp anyway.  That is the tmp.mount that falconindy was referring to I believe. wink

Just to be clear, genfstab didn't create that entry. It's part of the default /etc/fstab shipped with the filesystem package:

https://projects.archlinux.org/svntogit … filesystem

It'll go away soon enough.

Offline

#17 2012-11-01 22:23:51

headkase
Member
From: Canada
Registered: 2011-12-06
Posts: 1,579
Website

Re: Migrate to systemd with some problems

Ok, thank you falconindy - that clears things up.


We all make choices, but in the end, our choices make us.

Offline

#18 2012-11-01 22:40:23

realdarkman
Member
Registered: 2012-04-24
Posts: 12

Re: Migrate to systemd with some problems

Ok, I removed both tmpfs entries from the fstab. /tmp will auto mount by systemd at boot time and /var/tmp is on SSD. Works fine!

Big thanks guys! big_smile

Offline

Board footer

Powered by FluxBB