Tim Daneliuk <tundra at tundraware.com> writes:
> On 08/14/2015 10:48 AM, Carl Johnson wrote:
>> Tim Daneliuk <tundra at tundraware.com> writes:
>>
>>> On 08/14/2015 08:53 AM, Patrick M. Hausen wrote:
>>>> HI!
>>>>
>>>>> Am 14.08.2015 um 15:15 schrieb Tim Daneliuk <tundra at
tundraware.com>:
>>>>>
>>>>> I just built a 10.2 machine on a cloud-based VPS (Digital
Ocean) that has
>>>>> 512M of memory and 1G of swap partition. I am seeing a ton
of errors like
>>>>> this:
>>>>>
>>>>> [...]
>>>>> So, I added this to fstab (after creating /usr/swap0):
>>>>
>>>> Did you create it with dd or just with touch? You need to
create a
>>>> file that actually occupies the disk blocks with dd.
>>>>
>>>> HTH
>>>> Patrick
>>>>
>>>
>>> The file was actually created, and space reserved.
>>
>> Try removing the md99 device with mdconfig and then run the swapon
again.
>>
>
> Now we're getting somewhere. The problem I discovered is that if I do
this:
>
> 1) Remove fstab entry for swap file and reboot
> 2) Reinstall fstab entry for swap and swapon
>
> Voila' - it works. BUT ... if I then swapoff that disk *the md device
does
> not go away and cannot be removed with mdcoswapon -a
> swapon: md99 on /usr/swap0: Device already in use
> nfig:
>
> mdconfig -d md99
> mdconfig: file can only be used with -a
>
>
> I also cannot reenable it as swap again (which is why this appeared to not
> be working:
>
> swapon -a
> swapon: md99 on /usr/swap0: Device already in use
>
>
> IOW, the system thinks the /dev/md99 is still in use even though I have
swapped it
> off and will neither automatically remove the device nor allow me to do so
manually.
I should have mentioned that I had similar problems until I added the
"late" option to the swapfile line in fstab. I suspect that it is a
general problem with swapfiles and should be in the swapfile example in
the fstab(5) manpage.
--
Carl Johnson carlj at peak.org