You are not logged in.

#1 2013-09-18 23:32:41

ksolsim
Member
Registered: 2012-06-26
Posts: 27

[Solved] - Systemd 207 upgrade - swap service failed

Hi, since upgrading Systemd to 207 when I restart my system i get

[FAILED] Failed to activate swap dev/disk/byuuid/ea3f1e0c-3457-49f4-9d8d-d1e298dec0a5

after login to my system I get:

[root@arch ksolsim]# systemctl status dev-sda7.swap
dev-sda7.swap - /dev/sda7
   Loaded: loaded (/run/systemd/generator.late/dev-sda7.swap)
   Active: failed (Result: exit-code) since gio 2013-09-19 01:03:46 CEST; 10min ago
     What: /dev/sda7
  Process: 244 ExecActivate=/sbin/swapon /dev/sda7 (code=exited, status=255)

set 19 01:03:46 arch systemd[1]: dev-sda7.swap swap process exited, code=exited status=255
set 19 01:03:46 arch systemd[1]: Failed to activate swap /dev/sda7.
set 19 01:03:46 arch systemd[1]: Unit dev-sda7.swap entered failed state.

but swap partition is on.

swapon -s
[ksolsim@arch ~]$ swapon -s
Filename                                Type            Size    Used    Priority
/dev/sda7                               partition       2154492 0       -1

this is my fstab.

# 
# /etc/fstab: static file system information
#
# <file system>	<dir>	<type>	<options>	<dump>	<pass>
tmpfs		/tmp	tmpfs	nodev,nosuid	0	0
# /dev/sda6
UUID=fc1e1197-7bcb-4c81-8877-7dac8e8332bc	/         	ext4      	rw,relatime	0 1
UUID=ea3f1e0c-3457-49f4-9d8d-d1e298dec0a5	 swap 	swap 	defaults 0 0

ad if i restart my boot time is slow:

Startup finished in 15.583s (kernel) + 11.684s (userspace) = 27.267s

here you can find journalctl -xn output

http://paste.kde.org/pc8928ffc/

if I downgrade to systemd 204 everything is ok, and boot time is about 14 sec

Last edited by ksolsim (2013-09-19 07:21:04)

Offline

#2 2013-09-18 23:44:33

karol
Archivist
Registered: 2009-05-06
Posts: 25,433

Re: [Solved] - Systemd 207 upgrade - swap service failed

Offline

#3 2013-09-18 23:54:09

ksolsim
Member
Registered: 2012-06-26
Posts: 27

Re: [Solved] - Systemd 207 upgrade - swap service failed

swap: fix reverse dependencies

so it's worth to downgrage to versione 204...perhaps

Offline

#4 2013-09-18 23:55:34

progandy
Member
Registered: 2012-05-17
Posts: 2,151

Re: [Solved] - Systemd 207 upgrade - swap service failed

You might want to try the git package. systemd-git is in the AUR and a precompiled package is available in the unofficial repository of gtmanfred

[gtmanfred]
SigLevel=Required
# This repo contains git/svn/hg versions of a lot of my packages
Server = http://code.gtmanfred.com/$repo/$arch

https://wiki.archlinux.org/index.php/Un … positories
Edit: The patch should be in there, the compiled version currently contains everything up to "Add YouCompleteMe configuration" in the git tree.
Edit2: The patch has been backported in our official arch systemd package (since 207-2)

Last edited by progandy (2013-09-19 00:10:20)

Offline

#5 2013-09-19 00:40:17

karol
Archivist
Registered: 2009-05-06
Posts: 25,433

Re: [Solved] - Systemd 207 upgrade - swap service failed

207-3 is now in [core] so things should be OK after the system update.

Edit: ksolsim, what is the exact version of the systemd package you're using?

$ pacman -Q systemd
systemd 207-3

Last edited by karol (2013-09-19 00:42:17)

Offline

#6 2013-09-19 02:45:20

philip
Member
Registered: 2011-09-14
Posts: 2

Re: [Solved] - Systemd 207 upgrade - swap service failed

I had the same problem when I upgraded systemd to 207-3. In my case I had two systemd-swap units created by (I think) the generators systemd-fstab-generator and systemd-gpt-auto-generator. At least I had two .swap-files, one located in /run/systemd/generator/ and the other in /run/systemd/generator.late/. One of these units always succeeded, whereas the other one always failed. The error message was "device busy" (see line 130 in your journalctl-output), as the other unit already activated swap. My solution was to comment the line containing the swap-definition in /etc/fstab. Now it works (for me).

This nevertheless seems to be a bug, as man systemd-gpt-auto-generator states that there should not be a unit created if the device is listed in /etc/fstab:

Note that this generator will execute no operation on non-GPT systems, on systems where the units are explicitly configured (for example, listed in fstab(5)) or where the mount point is non-empty.

Offline

#7 2013-09-19 02:54:04

karol
Archivist
Registered: 2009-05-06
Posts: 25,433

Re: [Solved] - Systemd 207 upgrade - swap service failed

systemd 207 makes fstab optional: https://bbs.archlinux.org/viewtopic.php?id=169738
http://lists.freedesktop.org/archives/s … 13189.html

A logic to automatically discover and enable home and swap partitions on GPT disks has been added. With this in place /etc/fstab becomes optional for many setups (...)


BTW, is this question a few days old or is it from e.g. 2012?
http://unix.stackexchange.com/questions … emd-system

Last edited by karol (2013-09-19 02:56:00)

Offline

#8 2013-09-19 03:02:06

jasonwryan
Forum & Wiki Admin
From: .nz
Registered: 2009-05-09
Posts: 19,381
Website

Re: [Solved] - Systemd 207 upgrade - swap service failed

karol wrote:

BTW, is this question a few days old or is it from e.g. 2012?
http://unix.stackexchange.com/questions … emd-system

Last week.


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Offline

#9 2013-09-19 07:12:24

ksolsim
Member
Registered: 2012-06-26
Posts: 27

Re: [Solved] - Systemd 207 upgrade - swap service failed

karol wrote:

207-3 is now in [core] so things should be OK after the system update.

Edit: ksolsim, what is the exact version of the systemd package you're using?

[ksolsim@arch ~]$ pacman -Q systemd
systemd 207-3 

my system use GPT.

edit:

as suggested by philip, the solution is to comment the line containing the swap-definition in /etc/fstab. Now it works for me too. thanks.

Last edited by ksolsim (2013-09-19 07:20:38)

Offline

#10 2013-09-19 19:01:53

Vi0L0
Member
From: Poland
Registered: 2009-06-24
Posts: 1,320
Website

Re: [Solved] - Systemd 207 upgrade - swap service failed

hah, funny thing with this 207 release and it's "magic"...

I was once using swap partition but decided to leave it after i bought more ram, so I commented it in fstab, disabled swap, but not removed partition... hell, i even removed swap support from my kernel, everything was fine, the sun was shining.
Until today, of course.
Today systemd was unable to start my system from my own kernel, it tried to mount swap because, well, it was there!
"It is here! I must to mount it! Let me mount it!" - like a dog when you are showing him a stick or a ball - but kernel said "No" and makes systemd very sad...


I fixed it by removing swap partition but... c'mon... does it really need to be smarter than me?

Offline

#11 2013-09-19 19:42:14

progandy
Member
Registered: 2012-05-17
Posts: 2,151

Re: [Solved] - Systemd 207 upgrade - swap service failed

Vi0L0 wrote:

I fixed it by removing swap partition but... c'mon... does it really need to be smarter than me?

Yes. systemd is smarter than you. If you don't like it, you have to tell systemd where it is wrong. (mask units) Systemd also misses an optionto disable a generator completely. (you could delete the generator and use pacman.conf to exclude it from extraction, but come on that is not clean)

Offline

#12 2013-09-21 06:38:34

eigengrau
Member
Registered: 2013-09-19
Posts: 41

Re: [Solved] - Systemd 207 upgrade - swap service failed

I'm also still getting this on a GPT system. So, should this still be considered a bug worth taking upstream? Or is it considered mandatory that GPT swap partitions must not appear in fstab?

Offline

#13 2013-09-21 18:25:42

-MacNuke-
Member
Registered: 2013-01-29
Posts: 11

Re: [Solved] - Systemd 207 upgrade - swap service failed

Same problem here with 207-5. And even if systemd punshes me in the face "delete your damn fstab".... actually I don't want that.

But if I surrender and delete my fstab... how do I set mount options?

Last edited by -MacNuke- (2013-09-21 18:25:59)

Offline

#14 2013-09-21 19:05:01

agumonkey
Member
Registered: 2013-09-20
Posts: 25

Re: [Solved] - Systemd 207 upgrade - swap service failed

I think I've read somewhere that you'd write systemd units instead of lines in your fstab. I can't tell more because I need to RTFM first.

Offline

#15 2013-09-21 19:13:03

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

Re: [Solved] - Systemd 207 upgrade - swap service failed

@-MacNuke-, there is no systemd push to "delete your damn fstab" and I'm not sure where you are getting the idea that having an fstab is illegitimate.  There is the option to use native systemd units or to use the special GUIDs for certain partition types, but by no means is this required. 

The systemd-fstab-generator is still there and still does its thing.  When you boot, it takes the information from the fstab and generates native systemd units that reside in /run/systemd/generators and uses those to do the mounting logic.  If you are a regular home user with a simple setup, then using the fstab like normal is probably the way to go. 

I actually converted my system to use native systemd units a while back, and while it worked perfectly fine and allowed for the same functionality and options as the fstab, I found it to be kind of a PITA to maintain.  Having all the mounting stuff in one plain place just seemed easier to me. 

So in other words, just because there are new features available doesn't mean that it is being forced upon you!

Edit: typo

Last edited by WonderWoofy (2013-09-21 19:13:29)

Offline

#16 2013-09-21 20:39:13

-MacNuke-
Member
Registered: 2013-01-29
Posts: 11

Re: [Solved] - Systemd 207 upgrade - swap service failed

WonderWoofy wrote:

So in other words, just because there are new features available doesn't mean that it is being forced upon you!

Well than... why the big red "FAILED" while booting?

agumonkey wrote:

I think I've read somewhere that you'd write systemd units instead of lines in your fstab. I can't tell more because I need to RTFM first.

KISS seems to be dead now xD

Last edited by -MacNuke- (2013-09-21 20:48:44)

Offline

#17 2013-09-21 22:30:38

agumonkey
Member
Registered: 2013-09-20
Posts: 25

Re: [Solved] - Systemd 207 upgrade - swap service failed

-MacNuke- wrote:

...

KISS seems to be dead now xD

A line in a file or a file for that line, not that different to me. I wonder how to gather/query data about mounts though. So, in a way you're right, not UNIX KISS.

Offline

#18 2013-09-21 22:54:53

karol
Archivist
Registered: 2009-05-06
Posts: 25,433

Re: [Solved] - Systemd 207 upgrade - swap service failed

What data you want? 'mount'? 'findmnt'?

Offline

#19 2013-09-21 22:59:01

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

Re: [Solved] - Systemd 207 upgrade - swap service failed

agumonkey wrote:
-MacNuke- wrote:

...

KISS seems to be dead now xD

A line in a file or a file for that line, not that different to me. I wonder how to gather/query data about mounts though. So, in a way you're right, not UNIX KISS.

Good thing you aren't using unix, then.

Offline

#20 2013-09-22 00:13:05

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

Re: [Solved] - Systemd 207 upgrade - swap service failed

-MacNuke- wrote:
WonderWoofy wrote:

So in other words, just because there are new features available doesn't mean that it is being forced upon you!

Well than... why the big red "FAILED" while booting?

A service failing does not imply that something new is being forced upon you… again, your logic seems a bit off here.

Offline

#21 2013-09-22 07:19:54

-MacNuke-
Member
Registered: 2013-01-29
Posts: 11

Re: [Solved] - Systemd 207 upgrade - swap service failed

WonderWoofy wrote:

A service failing does not imply that something new is being forced upon you… again, your logic seems a bit off here.

Tell me than, how do I get rid of it, without removing the line from the fstab (or the whole fstab) or deleting arbitrary files from systemd for every update of systemd.

Last edited by -MacNuke- (2013-09-22 07:20:26)

Offline

#22 2013-09-22 14:05:54

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

Re: [Solved] - Systemd 207 upgrade - swap service failed

progandy wrote:

Systemd also misses an optionto disable a generator completely. (you could delete the generator and use pacman.conf to exclude it from extraction, but come on that is not clean)

This response is a bit late, but if you check out the systemd-fstab-generator(8) man page, it indicates that there is a kernel command line parameter that you can use to have the systemd-fstab-generator ignore the fstab.  If you use fstab=no, then it will ignore in both the initramfs and the main system, while rd.fstab=no will ignore in just the initramfs.  You can also indicate "yes" apparently, but that is pretty worthless since this is the default.

What I find interesting is that the man page doesn't seem to indicate that the generator is actually stopped from running, but rather is set to ignore the fstab.  If it is a generator that works from information from the fstab… what is it doing after it is set to ignore the one file it relies on?


-MacNuke- wrote:

Tell me than, how do I get rid of it, without removing the line from the fstab (or the whole fstab) or deleting arbitrary files from systemd for every update of systemd.

I don't know… you haven't given even a shred of information about your situation other than the fact that this is failing.  So go figure it out yourself.  If you want help around here, ask in a sane way with as much information as you can, and without spouting FUD.

Offline

#23 2013-09-22 21:35:08

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,675

Re: [Solved] - Systemd 207 upgrade - swap service failed

Unless this is a new issue with systemd 207-5, I don't get a failure even though I have a GPT disk and specify swap in fstab. I do seem to get an additional log line setting swap up which specifies what to use for swap differently (but equivalently). But that's all.

(The reason I say about 207-5 is because I haven't rebooted since that upgrade so I wouldn't have seen any failure it introduced.)

This could be because I'm using lvm-on-luks but I am not in a position to tell that one way or another.


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#24 2013-09-22 22:00:24

progandy
Member
Registered: 2012-05-17
Posts: 2,151

Re: [Solved] - Systemd 207 upgrade - swap service failed

WonderWoofy wrote:
progandy wrote:

Systemd also misses an optionto disable a generator completely. (you could delete the generator and use pacman.conf to exclude it from extraction, but come on that is not clean)

This response is a bit late, but if you check out the systemd-fstab-generator(8) man page, it indicates that there is a kernel command line parameter that you can use to have the systemd-fstab-generator ignore the fstab.  If you use fstab=no, then it will ignore in both the initramfs and the main system, while rd.fstab=no will ignore in just the initramfs.  You can also indicate "yes" apparently, but that is pretty worthless since this is the default.

There is no option to disable the GPT automount of swap partitions. So yo'll get one unit generated from fstab and another from GPT and as a result one of them always fails if you do not remove the swap partition from your fstab.

What I find interesting is that the man page doesn't seem to indicate that the generator is actually stopped from running, but rather is set to ignore the fstab.  If it is a generator that works from information from the fstab… what is it doing after it is set to ignore the one file it relies on?

If I am not mistaken, the fstab generator also reads some kernel parameters like root= and creates units for them (this behaviour is used if you base your initramfs on systemd)

Offline

#25 2013-09-22 23:24:26

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

Re: [Solved] - Systemd 207 upgrade - swap service failed

progandy wrote:

There is no option to disable the GPT automount of swap partitions. So yo'll get one unit generated from fstab and another from GPT and as a result one of them always fails if you do not remove the swap partition from your fstab.

Ooohh, I see what you're saying. I've never tried this.  Is the systemd GUID for swap the same as the regular GUID Linux swap as applied by gdisk's  8200?  I see in gdisk there is a "Freedisktop $BOOT" now, but  I see no reference to any $HOME or anything.

Offline

Board footer

Powered by FluxBB