You are not logged in.

#1 2015-02-27 19:51:33

polomi
Member
Registered: 2015-02-25
Posts: 12

[SOLVED] systemd swap related service in failed state

Hi. When I ran systemctl to check my services, there was a failed one related to swap.

Output of systemctl --failed:

  UNIT                                                               LOAD   ACTIVE SUB    DESCRIPTION
● dev-disk-by\x2duuid-7a53052d\x2df673\x2d40c9\x2d8b21\x2d1d5d87127479.swap loaded failed failed /dev/disk/by-uuid/7a53052d-f673-40c9-8b21-1d5d87127479

Output of systemctl status dev-disk-by\x2duuid-7a53052d\x2df673\x2d40c9\x2d8b21\x2d1d5d87127479.swap:

● dev-disk-byx2duuid-7a53052dx2df673x2d40c9x2d8b21x2d1d5d87127479.swap - /dev/disk/byx2duuid/7a53052dx2df673x2d40c9x2d8b21x2d1d5d87127479
   Loaded: loaded
   Active: inactive (dead)
     What: /dev/disk/byx2duuid/7a53052dx2df673x2d40c9x2d8b21x2d1d5d87127479

However, in the systemctl output there was another service which was active:

dev-sda6.swap                                                    loaded active active    Swap Partition

And this is basically the same partition. In the output of blkid:

/dev/sda6: UUID="7a53052d-f673-40c9-8b21-1d5d87127479" TYPE="swap" PARTUUID="00c618fd-9807-4fef-89dd-28e0a79192a9"

As you can see the UUID of /dev/sda6 matches the one of the failing service. Here is the /etc/fstab entry for this partition:

UUID=7a53052d-f673-40c9-8b21-1d5d87127479       none            swap            defaults        0 0

So there are two services related to this partition, one that is active and one that is failed. I don't understand why and I don't know how to fix this. Any explanations and help will be greatly appreciated! smile

Last edited by polomi (2015-02-27 20:19:32)

Offline

#2 2015-02-27 20:00:45

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: [SOLVED] systemd swap related service in failed state

I had this in my Debian sid system -- try removing your swap entry from /etc/fstab

Offline

#3 2015-02-27 20:09:34

polomi
Member
Registered: 2015-02-25
Posts: 12

Re: [SOLVED] systemd swap related service in failed state

I commented the swap line in /etc/fstab, and now I don't have the failed service. I also still have the dev-sda6.swap service active. So it looks good?

However, when booting, I saw a line looking like this:

Expecting device 7a53052d\x2df673\x2d40c9\x2d8b21\x2d1d5d87127479

(It's maybe not exactly written like that, the boot is too fast for me to catch the text accurately.)

It seems like it's partly fixed in any case. Thanks.

Last edited by polomi (2015-02-27 20:26:56)

Offline

#4 2015-02-27 20:16:28

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: [SOLVED] systemd swap related service in failed state

I don't bother with fstab entries for swap any more as my main distributions use systemd (thank $DEITY).

Every mainstream distribution will reformat the swap partition when installing and will render the fstab entry useless if you are using UUIDs.

You can check the swap is still activated with:

free -h

Offline

#5 2015-02-27 20:19:01

polomi
Member
Registered: 2015-02-25
Posts: 12

Re: [SOLVED] systemd swap related service in failed state

free -h displays the swap properly. Well I will mark the issue as solved then! Thanks a lot, that was quick.

EDIT: Also checked with swapon -s, no problem here either. And the swap entry in the wiki says that having the swap in /etc/fstab is optional with systemd indeed.

Last edited by polomi (2015-02-27 20:25:56)

Offline

Board footer

Powered by FluxBB