Removing failed swap drive
- Reply: Wismos_a_proton.me: "Re: Removing failed swap drive"
 - Go to: [ bottom of page ] [ top of archives ] [ this month ]
 
Date: Fri, 01 Aug 2025 11:00:24 UTC
Here's an interesting one. If you're swapping to more than one drive (and it's not mirrored) and one of the drives fails, what do you do? Asking for a friend. Okay, you can simply reboot but you might not want to. This leaves you with a failed swap device entry: # swapctl -lh Device: Bytes Used: /dev/#C:0x65 4.0G 182M /dev/ada1p2 4.0G 180M Eh? Okay... # swapoff "/dev/#C:0x65" swapoff: /dev/#C:0x65: No such file or directory Fair enough - I'd never heard of #C:0x65 either. Try the actual partition on the failed drive: # swapoff /dev/ada0p2 swapoff: /dev/ada0p2: No such file or directory Almost fair enough, as ada0 is fubar and offline. But as the system clearly has it in its list of swap devices, how else do you reference it? I might try swapoff -a and disable all swapping, then add in the good one again but I don't know how it would react because I've never done this, and I don't want to bork it for various reasons - like it'll take me two days to get to the server and I've only so many layers of redundancy. Thanks, Frank.