systemd searching for deleted swap on systemd.fsck

Hello all,

Today, after removing one of my swap devices (logical volume and fstab) i needed to rebooted my server.
However, the server didnt restart as expected, hanging on systemd.fsck after boot.

After time’ing out to dracut, i was able to see that it was looking for the deleted swap device although it was not defined on fstab (seen on journalctl).
Is there a way around this? Or to clear the information for the old swap device from systemd?

Thanks for your Help.
Nuno

Try recreating the initrd with “sudo mkinitrd”.
Maybe this still contains a reference to the deleted swap.

But I’m not sure.

Can you see it in; systemctl | grep -i swap

You could disable swap.target and the .swap. However systemd should probe the system for partitions marked type 82 (swap) automatically.

On 2015-01-14 22:26, xupetas wrote:

> After time’ing out to dracut, i was able to see that it was looking for
> the deleted swap device although it was not defined on fstab (seen on
> journalctl).

But it may still be in initrd, so you need to run mkinitrd.
Another possibility is the kernel line, the section that defines where
to store the hibernation image (swap).


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

Check “/boot/grub2/grub.cfg”. See if there is a “resume=” parameter specifying this device. If so, remove that from grub.cfg.

You will also have to fix that in “/etc/default/grub”. But fixing it in “grub.cfg” might be enough to get you booted, and that makes it easier to work on the problem.

On 2015-01-14 22:36, Miuku wrote:
> However systemd should
> probe the system for partitions marked type 82 (swap) automatically.

Are you sure it does that?
IMO, it should not do that, the partition might be off-limits for some
reason.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

Well, for systemd? It has no limits :slight_smile: