2

Recently, I performed a dist-upgrade from Debian Wheezy to Jessie. The upgrade was performed without any error but after the upgrade the swap partition was no longer mounted/activated. The mentioned system is a KVM (qemu-kvm, centos7).

During the start up of the system, systemd tries to mount the swap partition but fails due to timeout with the message "Dependency failed for..."

What I tried so far:

  • performing "swapon /dev/sda2" manually works without any problem
  • recreated the swap partition with "mkswap /dev/sda2"
  • double check fstab entry and used UUID
  • removed the fstab entry so that systemd detects it automatically
  • different option parameter (fstab)
  • asked the german debian community -but no helpful response: https://debianforum.de/forum/viewtopic.php?f=32&t=159902&p=1084179#p1084179
  • manually mounting with systemd (systemctl start dev-disk...) fails with the same error but after perfoming "swapon" and "swapoff" it works.

What I found so far:

Additional information:

journalctl -r | grep "dev-disk"

Mar 07 22:31:37 hostname systemd[1]: Dependency failed for /dev/disk/by-uuid/062c87ce-135e-45fc-b430-7336a9ab164a.
Mar 07 22:31:37 hostname systemd[1]: Timed out waiting for device dev-disk-by\x2duuid-062c87ce\x2d135e\x2d45fc\x2db430\x2d7336a9ab164a.device.
Mar 07 22:31:37 hostname systemd[1]: Job dev-disk-by\x2duuid-062c87ce\x2d135e\x2d45fc\x2db430\x2d7336a9ab164a.device/start timed out.

cat /etc/fstab

UUID=5443f0ed-f437-4804-8fa0-45a039413b9a               /       ext4            errors=remount-ro       0 1
UUID=062c87ce-135e-45fc-b430-7336a9ab164a               none    swap            sw                      0 0

uname -a

Linux hostname 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt20-1+deb8u4 (2016-02-29) x86_64 GNU/Linux

blkid

/dev/sda1: UUID="5443f0ed-f437-4804-8fa0-45a039413b9a" TYPE="ext4" PARTUUID="0006f6b9-01"
/dev/sda2: UUID="062c87ce-135e-45fc-b430-7336a9ab164a" TYPE="swap" PARTUUID="0006f6b9-02"

parted /dev/sda - print

(parted) print
Model: ATA QEMU HARDDISK (scsi)
Disk /dev/sda: 10.7GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number  Start   End     Size    Type     File system     Flags
 1      1049kB  10.2GB  10.2GB  primary  ext4            boot
 2      10.2GB  10.7GB  491MB   primary  linux-swap(v1)

dpkg -l systemd

ii  systemd                                               215-17+deb8u3                   amd64                           system and service manager

ls -l /dev/disk/by-uuid

lrwxrwxrwx 1 root root 10 Mar 24 23:01 062c87ce-135e-45fc-b430-7336a9ab164a -> ../../sda2
lrwxrwxrwx 1 root root 10 Mar 20 18:44 5443f0ed-f437-4804-8fa0-45a039413b9a -> ../../sda1
  • What happens if you hard code /dev/sda2 in fstab? – Tollef Fog Heen May 21 '17 at 6:53
  • I tried that but same result. – YuTendo Feb 8 '18 at 5:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.