Context
Originally I had the following partition structure
nvme0n1
├─nvme0n1p1 /boot/efi
└─nvme0n1p2
├─ubuntu--vg-root /
└─ubuntu--vg-swap_1 swap
Then I decided to remove the swap partition and use, instead, a swapfile. I created a file, called mkswap /swapfile
on it, swapoff -a
and then swapon /swapfile
. I then edited /etc/fstab
and changed the line
/dev/mapper/ubuntu--vg-swap_1 none swap sw 0 0
to
/swapfile none swap sw 0 0
Rebooting worked perfectly, so I opened gparted
and deleted the swap partition to extend root (which I did instead using lvexpand
), so my partitions look now (as for the command lsblk
)
nvme0n1
├─nvme0n1p1 /boot/efi
└─nvme0n1p2
└─ubuntu--vg-root /
The problem
I must have messed up here because now reboot takes al least 25 seconds (instead of 4) and it looks like it's pausing boot to look for swap partition, as the following message appears at least 5 times before booting normally
failed to find logical volume ubuntu-vg/swap_1
What I've tried (according to what I've found online)
- running
update-grub
(nowhere in grub.cfg
is mentioned swap_1
)
- running
update-initramfs -u
- file
/etc/initramfs-tools/conf.d/resume
doesn't exist, so nothing to change here
lsblk
and lvdisplay
only show the root partition
I'm afraid there must still be somewhere a notion of the swap partition in the LVM configuration, as I didn't use its commands to remove it, but I've found nowhere a place that lists swap_1
as a partition (except for some files in /etc/lvm/archive
, but I guess they aren't useful for me). I've even run a full disk search for the content swap_1
in any file, but only error logs contained that work in text