Re: Removing failed swap drive
- Reply: Marco Moock : "Re: Removing failed swap drive"
- In reply to: Frank Leonhardt : "Removing failed swap drive"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 01 Aug 2025 12:52:07 UTC
perhaps reference the swap device by uuid or putting the new device in the same slot would help? -------- Original Message -------- On 01/08/25 4:32 pm, Frank Leonhardt <freebsd-doc@fjl.co.uk> wrote: > 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. > > > >