If you have a USB to SATA adapter, reconnect the old /dev/sdb and then try swapoff.<div><br></div><div>Did you try swapoff /dev/sdb ?</div><div><br></div><div>Is there currently another /dev/sdb?<br clear="all"><br><br>Shawn T Perry<br>

Red Mop Computing Services<br>email: <a href="mailto:shawn@redmop.com" target="_blank">shawn@redmop.com</a><br>office: 720-319-7627<br>cell: 303-881-2623<br>web: <a href="http://www.redmop.com/" target="_blank">http://www.redmop.com</a><br>


facebook: <a href="http://www.facebook.com/pages/Red-Mop-Computing-Services/114352628589778" target="_blank">http://www.facebook.com/pages/Red-Mop-Computing-Services/114352628589778</a><br>linkedin: <a href="http://www.linkedin.com/in/shawnperry" target="_blank">http://www.linkedin.com/in/shawnperry</a><br>


<br><br><div class="gmail_quote">On Thu, Jul 28, 2011 at 11:20 AM, Jim Ockers <span dir="ltr">&lt;<a href="mailto:ockers@ockers.net">ockers@ockers.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<u></u>



<div 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.  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.  The OS was not using any swap space
before I pulled the drive, and it is still not using much/any swap
space now.  However, the /dev/sdb device is not freed and can&#39;t be
re-used, and swapoff -a doesn&#39;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&#39;s
just that there seems to be now way to get the kernel to release its
swap usage on /dev/sdb, which doesn&#39;t exist any more as a device in the
system.<br>
<br>
swapoff -a doesn&#39;t do it, nor does any other arguments to swapoff (like
swapoff /dev/sdb2).<br>
eject /dev/sdb doesn&#39;t do it.<br>
echo &quot;- - -&quot; &gt; /sys/class/scsi_host/host1/scan to force a SATA
rescan also doesn&#39;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?  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 cols="72">-- 
Jim Ockers, P.Eng. (<a href="mailto:ockers@ockers.net" target="_blank">ockers@ockers.net</a>)
Contact info: <a href="http://www.ockers.net/msi.html" target="_blank">http://www.ockers.net/msi.html</a>

</pre>
</div>

<br>_______________________________________________<br>
clue mailing list: <a href="mailto:clue@cluedenver.org">clue@cluedenver.org</a><br>
For information, account preferences, or to unsubscribe see:<br>
<a href="http://cluedenver.org/mailman/listinfo/clue" target="_blank">http://cluedenver.org/mailman/listinfo/clue</a><br></blockquote></div><br></div>