Swap + Systemd 217

Всем привет!

После вчерашнего обновления Systemd до 217, перестал монтироваться swap.
До этого всё было хорошо. Вот что в имеем:
$ ~ gdisk -l /dev/sda | grep -i swap
   2          739328        34293759   16.0 GiB    8200  Linux swap

$ ~ dmesg | grep swap
[    8.120123] systemd[1]: dev-disk-by\x2duuid-da08bb2e\x2d69dc\x2d4a28\x2db994\x2d2f3183d2950b.swap swap process exited, code=exited status=255
[    8.120495] systemd[1]: Failed to activate swap /dev/disk/by-uuid/da08bb2e-69dc-4a28-b994-2f3183d2950b.
[    8.120639] Adding 16777212k swap on /dev/sda2.  Priority:-1 extents:1 across:16777212k FS
[    8.120661] systemd[1]: Unit dev-disk-by\x2duuid-da08bb2e\x2d69dc\x2d4a28\x2db994\x2d2f3183d2950b.swap entered failed state.

$ ~ journalctl -b | grep swap
Nov 12 08:26:26 edge systemd[1]: dev-disk-by\x2duuid-da08bb2e\x2d69dc\x2d4a28\x2db994\x2d2f3183d2950b.swap swap process exited, code=exited status=255
Nov 12 08:26:26 edge systemd[1]: Failed to activate swap /dev/disk/by-uuid/da08bb2e-69dc-4a28-b994-2f3183d2950b.
Nov 12 08:26:26 edge kernel: Adding 16777212k swap on /dev/sda2.  Priority:-1 extents:1 across:16777212k FS
Nov 12 08:26:26 edge systemd[1]: Unit dev-disk-by\x2duuid-da08bb2e\x2d69dc\x2d4a28\x2db994\x2d2f3183d2950b.swap entered failed state.
Nov 12 08:26:26 edge swapon[272]: swapon: /dev/disk/by-uuid/da08bb2e-69dc-4a28-b994-2f3183d2950b: swapon failed: Device or resource busy


$ ~ cat /etc/fstab | grep swap
# /dev/sda2 LABEL=swap
UUID=da08bb2e-69dc-4a28-b994-2f3183d2950b	none      	swap      	defaults  	0 0

$ ~ blkid | grep swap
/dev/sda2: LABEL="swap" UUID="da08bb2e-69dc-4a28-b994-2f3183d2950b" TYPE="swap" PARTLABEL="Linux swap" PARTUUID="02399d76-1160-42f3-898d-5306769965d3"


$ ~ cat /etc/default/grub
GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="Arch"
GRUB_CMDLINE_LINUX_DEFAULT="resume=/dev/disk/by-uuid/698e4f98-a2b5-4294-9b6d-a53aaf8bc64b quiet acpi_osi=Linux LOGLEVEL=2"
GRUB_CMDLINE_LINUX=""

# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"

# Uncomment to enable Hidden Menu, and optionally hide the timeout count
#GRUB_HIDDEN_TIMEOUT=5
#GRUB_HIDDEN_TIMEOUT_QUIET=true

# Uncomment to use basic console
GRUB_TERMINAL_INPUT=console

# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE=1920x1080x32

# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX=keep

# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
# GRUB_DISABLE_RECOVERY=true

# Uncomment and set to the desired menu colors.  Used by normal and wallpaper
# modes only.  Entries specified as foreground/background.
#GRUB_COLOR_NORMAL="light-blue/black"
#GRUB_COLOR_HIGHLIGHT="light-cyan/blue"

# Uncomment one of them for the gfx desired, a image background or a gfxtheme
#GRUB_BACKGROUND="/path/to/wallpaper"
#GRUB_THEME="/path/to/gfxtheme"
#GRUB_THEME="/boot/grub/themes/Archlinux/theme.txt"
GRUB_THEME="/boot/grub/themes/Archxion-widescreen/theme.txt"

# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"

#GRUB_SAVEDEFAULT="true"
Но с другой стороны....

$ ~ mount | grep swap
$ ~ # пусто

$ ~ sudo swapon /dev/sda2
[sudo] password for klay:
swapon: /dev/sda2: swapon failed: Device or resource busy

$ ~ swapon -s
Filename				Type		Size	Used	Priority
/dev/sda2                              	partition	16777212	0	-1


$ ~ free -h
             total       used       free     shared    buffers     cached
Mem:           15G       1.1G        14G        95M        34M       374M
-/+ buffers/cache:       761M        14G
Swap:          15G         0B        15G


$ ~ systemctl status dev-disk-by\\x2duuid-da08bb2e\\x2d69dc\\x2d4a28\\x2db994\\x2d2f3183d2950b.swap
● dev-disk-by\x2duuid-da08bb2e\x2d69dc\x2d4a28\x2db994\x2d2f3183d2950b.swap - /dev/disk/by-uuid/da08bb2e-69dc-4a28-b994-2f3183d2950b
   Loaded: loaded (/etc/fstab)
   Active: active (Result: exit-code) since Wed 2014-11-12 08:26:25 EET; 20min ago
     What: /dev/disk/by-uuid/da08bb2e-69dc-4a28-b994-2f3183d2950b
     Docs: man:fstab(5)
           man:systemd-fstab-generator(8)
  Process: 272 ExecActivate=/sbin/swapon /dev/disk/by-uuid/da08bb2e-69dc-4a28-b994-2f3183d2950b (code=exited, status=255)

Nov 12 08:26:26 edge swapon[272]: swapon: /dev/disk/by-uuid/da08bb2e-69dc-4a28-b994-2f3183d2950b: swapon failed: Device or resource busy

$ ~ systemctl status dev-sda2.swap
● dev-sda2.swap - Swap Partition
   Loaded: loaded (/run/systemd/generator.late/dev-sda2.swap)
   Active: active since Wed 2014-11-12 08:26:25 EET; 2h 3min ago
     What: /dev/sda2
     Docs: man:systemd-gpt-auto-generator(8)
  Process: 271 ExecActivate=/sbin/swapon /dev/sda2 (code=exited, status=0/SUCCESS)

Не совсем понял, в чём прикол :)
Systemd теперь на себя берёт обязанности по монтированию swap? Из fstab удалить?
Вот что в комьюнити Fedora пишут:

link to this item - Bugzilla: #1017509
Error messages about swap activation if swap is on a plain partition on a GPT disk

If your swap device is a plain partition (not LVM-backed) on a GPT-labelled disk, it appears that systemd has some trouble activating this, and you will notice errors in your system log at each boot, related to swap activation. However, testing indicates that the swap device is ultimately activated successfully. This issue is unlikely to cause any real problems, we note it purely to explain why you may see these errors in the system log. You can run the command swapon without any parameters if you wish to check that the partition has been successfully activated.
После комментирования в fstab строки с swap разделом и перезагрузки:

$ ~ dmesg | grep swap
[    7.709753] Adding 16777212k swap on /dev/sda2.  Priority:-1 extents:1 across:16777212k FS

$ ~ journalctl -b | grep swap
Nov 12 10:39:56 edge kernel: Adding 16777212k swap on /dev/sda2.  Priority:-1 extents:1 across:16777212k FS

$ ~ systemctl status dev-sda2.swap
● dev-sda2.swap - Swap Partition
   Loaded: loaded (/run/systemd/generator.late/dev-sda2.swap)
   Active: active since Wed 2014-11-12 10:39:54 EET; 11min ago
     What: /dev/sda2
     Docs: man:systemd-gpt-auto-generator(8)
  Process: 280 ExecActivate=/sbin/swapon /dev/sda2 (code=exited, status=0/SUCCESS)

$ ~ swapon -s
Filename				Type		Size	Used	Priority
/dev/sda2                              	partition	16777212	0	-1

$ ~ free -h
              total        used        free      shared  buff/cache   available
Mem:            15G        300M         15G         42M        248M         15G
Swap:           15G          0B         15G

Ну и дела..
Хм, а у меня вроде всё ок:

$ yaourt -Qi systemd
Название              : systemd
Версия                : 217-6
Описание              : system and service manager
Архитектура           : x86_64
URL                   : http://www.freedesktop.org/wiki/Software/systemd
Лицензии              : GPL2  LGPL2.1  MIT
...

$ cat /etc/fstab
#
# /etc/fstab: static file system information
#
# <file system>	<dir>	<type>	<options>	<dump>	<pass>
tmpfs		/tmp	tmpfs	nodev,nosuid	0	0
/dev/sda1 / ext4 defaults 0 1
/dev/sda2 /home ext4 defaults 0 1
/dev/sda3 swap swap defaults 0 0

$ swapon -s
Filename				Type		Size	Used	Priority
/dev/sda3                              	partition	3978632	144	-1
Так systemd же идет в сторону поглощения fstab. И да, у меня все работает, как и работало.
У меня тоже всё работает. Просто после комментирования swap в fstab перестало ругаться в логах.

genues
Хм, а у меня вроде всё ок:

А после перезагрузки с таким конфигом, ничего вот тут странного нет?
journalctl -b | grep swap
 
Зарегистрироваться или войдите чтобы оставить сообщение.