Re: Cannot get systemd to forget about swap space on a failed disk
Bob McGowan wrote:
> Please see thread with subject "Be careful when editing /etc/fstab" for
> a bit of background.
> My computer had two swap partitions, on two different disks, when one of
> them started to generate CRC errors, seek errors, etc.
> Once I determined which of the two it was, I commented out the
> /etc/fstab entry for it, halted the system, removed the faulty disk and
> rebooted. I got dumped into the "emergency rescue" single user mode,
> after waiting several minutes for various "start jobs" to time out.
> Given the above referenced email, and the info in the links it
> references, I would have thought that rebooting, with the modified fstab
> file, should have worked just fine.
> However, as noted, it did not, so I must assume systemd has a unit (is
> this the right term?) defining my original swap setup.
> I did find in man pages, that if both fstab and a systemd unit define
> the same thing, systemd wins.
> That just reinforces the idea that somewhere, systemd knows the swap
> disk devices.
> But I cannot figure out where this might be, or even if this is the
> correct interpretation.
> Any suggestions on next steps greatly appreciated.
If you are using LVM - check LVM. If you keep the disk in the machine -
remove the swap partition. Repeat the test.
# find /lib/systemd/ | grep swap
# grep -i swap -r /lib/systemd/
Binary file /lib/systemd/systemd-udevd matches
/lib/systemd/system/systemd-journald-dev-log.socket:# Mount and swap units
need this. If this socket unit is removed by an
/lib/systemd/system/systemd-journald-dev-log.socket:# isolate request the
mount and swap units would be removed too,
/lib/systemd/system/systemd-journald.socket:# Mount and swap units need
this. If this socket unit is removed by an
/lib/systemd/system/systemd-journald.socket:# isolate request the mount and
swap units would be removed too,