Re: Removing failed swap drive

From: Frank Leonhardt <freebsd-doc_at_fjl.co.uk>
Date: Fri, 01 Aug 2025 15:37:12 UTC
On 01/08/2025 14:27, Marco Moock wrote:
> On 01.08.2025 12:52Wismos@proton.me  Wismos@proton.me  wrote:
>
>> perhaps reference the swap device by uuid or putting the new device
>> in the same slot would help?
> If there are any anonymous pages swapped out and removed from RAM, the
> systems will need to retrieve it from the space.
> If that doesn't work, all affected applications cannot continue
> running, it might also result in a system crash.
>
> You had luck that your system is still running.
>
> Dunno if it is reasonably possible to get out of that situation without
> rebooting or even hard resetting, depending on the type of lost data.


P. has also suggested off-list:

>
> I've always just commented out the appropriate line in fstab and 
> rebooted. It's happened to me more than once.

The problem is that, for various reasons I mentioned largely concerned 
with the server being had to get at, I do not wish to reboot right now. 
People keen to read my blog will just have to wait ;-)

Some processes have indeed ended up zombies as they're waiting for a 
vmopax that's never going to return, which is another problem. It's 
often said that the odd zombie process isn't a a big deal- just a wasted 
slot in the process table and 16k of RAM. Ha! Try shutting down a jail 
with a zombie process in it. I'm still trying to figure that one out. 
Otherwise it's just a matter of restarting any broken processes; the 
kernel isn't paged.

I will almost certainly reboot the server when the failed drive is 
swapped out (likely tomorrow if Amazon delivers the replacement today). 
I wouldn't be surprised if it hangs while shutting down simply because 
it can't shut down the odd jail first.

Regards, Frank.