<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
<font size="+1"><tt>Hi CLUEbies,<br>
<br>
In a test of my sysadmin mojo I changed out all of the SATA hard drives
in a server without downing the server or any of the VMs it was
running.&nbsp; I used Linux software RAID1 to move the data around to
whatever drives were swapped in and that all worked perfectly fine.<br>
<br>
One thing I forgot to do, though, was release the swap space on
/dev/sdb before pulling the drive.&nbsp; The OS was not using any swap space
before I pulled the drive, and it is still not using much/any swap
space now.&nbsp; However, the /dev/sdb device is not freed and can't be
re-used, and swapoff -a doesn't work, and now I see these sorts of
messages in the system log:<br>
<br>
scsi 1:0:0:0: rejecting I/O to dead device<br>
Write-error on swap-device (8:16:1000)<br>
scsi 1:0:0:0: rejecting I/O to dead device<br>
Write-error on swap-device (8:16:392)<br>
Write-error on swap-device (8:16:400)<br>
Write-error on swap-device (8:16:408)<br>
scsi 1:0:0:0: rejecting I/O to dead device<br>
Write-error on swap-device (8:16:520)<br>
<br>
I guess /dev/sdb is 8,16.<br>
<br>
There is swap space available on /dev/sda now (I remembered to release
that swap space before pulling the drive and replacing it), but it's
just that there seems to be now way to get the kernel to release its
swap usage on /dev/sdb, which doesn't exist any more as a device in the
system.<br>
<br>
swapoff -a doesn't do it, nor does any other arguments to swapoff (like
swapoff /dev/sdb2).<br>
eject /dev/sdb doesn't do it.<br>
echo "- - -" &gt; /sys/class/scsi_host/host1/scan to force a SATA
rescan also doesn't do it.<br>
The drive I put in the 2nd slot showed up as sde, so now I have in
order: sda, sde, sdc, sdd.<br>
<br>
Any ideas for how I can force the kernel to release its swap space on
the nonexistent drive, without a reboot of the host OS (which will also
occasion a reboot of all the VMs?&nbsp; Yes I know I should have done it
BEFORE pulling the drive but I forgot, OK?<br>
<br>
Thanks,<br>
Jim<br>
</tt></font>
<pre class="moz-signature" cols="72">-- 
Jim Ockers, P.Eng. (<a class="moz-txt-link-abbreviated" href="mailto:ockers@ockers.net">ockers@ockers.net</a>)
Contact info: <a class="moz-txt-link-freetext" href="http://www.ockers.net/msi.html">http://www.ockers.net/msi.html</a>

</pre>
</body>
</html>