<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Shawn,<br>
<br>
As soon as I realized the error of my ways, I tried reconnecting the
original /dev/sdb to the exact same SATA port, but then it was
recognized as /dev/sdf.&nbsp; It seems that the /dev/sdb device name is
allocated by the kernel, and can't be freed, and can't be re-used or
re-allocated to any new device.&nbsp; Even putting the exact same drive back
in the exact same slot doesn't work, because the drive is allocated an
"available" name, and sdb is not "available" it seems.<br>
<br>
There is not currently any sdb but the kernel still apparently holds on
to /dev/sdb2 (cf the log messages with write errors to 8:16) until I
can somehow force it to release that swap space, which is what I can't
seem to get it to do.<br>
<br>
Jim<br>
-- <br>
Jim Ockers, P.Eng. (<a class="moz-txt-link-abbreviated" href="mailto:ockers@ockers.net">ockers@ockers.net</a>)<br>
Contact info: <a class="moz-txt-link-freetext" href="http://www.ockers.net/msi.html">http://www.ockers.net/msi.html</a><br>
<br>
<br>
Shawn Perry wrote:
<blockquote
 cite="mid:CAMZe2Etpnp9ko+9LahUKPgQew6-iQaPV8Tt3Y1HKuYfFU1=b4g@mail.gmail.com"
 type="cite">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 moz-do-not-send="true" href="mailto:shawn@redmop.com"
 target="_blank">shawn@redmop.com</a><br>
office: 720-319-7627<br>
cell: 303-881-2623<br>
web: <a moz-do-not-send="true" href="http://www.redmop.com/"
 target="_blank">http://www.redmop.com</a><br>
facebook: <a moz-do-not-send="true"
 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 moz-do-not-send="true"
 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 moz-do-not-send="true"
 href="mailto:ockers@ockers.net">ockers@ockers.net</a>&gt;</span> wrote:<br>
  <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
    <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.&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 cols="72">-- 
Jim Ockers, P.Eng. (<a moz-do-not-send="true"
 href="mailto:ockers@ockers.net" target="_blank">ockers@ockers.net</a>)
Contact info: <a moz-do-not-send="true"
 href="http://www.ockers.net/msi.html" target="_blank">http://www.ockers.net/msi.html</a>

    </pre>
    </div>
    <br>
_______________________________________________<br>
clue mailing list: <a moz-do-not-send="true"
 href="mailto:clue@cluedenver.org">clue@cluedenver.org</a><br>
For information, account preferences, or to unsubscribe see:<br>
    <a moz-do-not-send="true"
 href="http://cluedenver.org/mailman/listinfo/clue" target="_blank">http://cluedenver.org/mailman/listinfo/clue</a><br>
  </blockquote>
  </div>
  <br>
  </div>
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
clue mailing list: <a class="moz-txt-link-abbreviated" href="mailto:clue@cluedenver.org">clue@cluedenver.org</a>
For information, account preferences, or to unsubscribe see:
<a class="moz-txt-link-freetext" href="http://cluedenver.org/mailman/listinfo/clue">http://cluedenver.org/mailman/listinfo/clue</a></pre>
</blockquote>
<br>
</body>
</html>