Re: Swap Questions

2015-08-18 Thread Antony Uspensky

On Mon, 17 Aug 2015, Tim Daneliuk wrote:


On 08/17/2015 12:53 PM, Antony Uspensky wrote:

On Sat, 15 Aug 2015, Tim Daneliuk wrote:


So -L does fix the problem - sort of.  The machine picks up the file as
additional swap on boot just fine.  HWOEVER, when I try to reboot or shut
down the host, I get a panic telling me some noise about not being able
to shutdown swap for some reason.


Try to swapoff (by hands) before shutdown.
Shutdown sequence, I think, unmounts carrying disk before swapping off a 
carried file. If I am right, -L should be processed on shutdown also.
Just a guess.


Yes, that did it.

But, isn't this kind of an operational bug?  Shouldn't the shutdown logic
do the swapoff before the unmount if it sees files being used for swap?


Yes. Must.


i.e. Should I enter this as a bug report?


Yes, please.


The only reason this matters - and it's a pretty big reason - is for production
servers when someone logs in remotely, becomes root, and issued reboot.  The
machine hangs at the panic and never comes back ... something you do not see
unless you are in a console of some sort ...


___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: Swap Questions

2015-08-18 Thread Tim Daneliuk
On 08/18/2015 12:29 PM, Antony Uspensky wrote:
 On Mon, 17 Aug 2015, Tim Daneliuk wrote:
 
 On 08/17/2015 12:53 PM, Antony Uspensky wrote:
 On Sat, 15 Aug 2015, Tim Daneliuk wrote:

 So -L does fix the problem - sort of.  The machine picks up the file as
 additional swap on boot just fine.  HWOEVER, when I try to reboot or shut
 down the host, I get a panic telling me some noise about not being able
 to shutdown swap for some reason.

 Try to swapoff (by hands) before shutdown.
 Shutdown sequence, I think, unmounts carrying disk before swapping off a 
 carried file. If I am right, -L should be processed on shutdown also.
 Just a guess.

 Yes, that did it.

 But, isn't this kind of an operational bug?  Shouldn't the shutdown logic
 do the swapoff before the unmount if it sees files being used for swap?
 
 Yes. Must.
 
 i.e. Should I enter this as a bug report?
 
 Yes, please.
 
 The only reason this matters - and it's a pretty big reason - is for 
 production
 servers when someone logs in remotely, becomes root, and issued reboot.  
 The
 machine hangs at the panic and never comes back ... something you do not see
 unless you are in a console of some sort ...
 

Done.  Bug report #202420
-- 

Tim Daneliuk tun...@tundraware.com
PGP Key: http://www.tundraware.com/PGP/

___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: Swap Questions

2015-08-17 Thread Antony Uspensky

On Sat, 15 Aug 2015, Tim Daneliuk wrote:


So -L does fix the problem - sort of.  The machine picks up the file as
additional swap on boot just fine.  HWOEVER, when I try to reboot or shut
down the host, I get a panic telling me some noise about not being able
to shutdown swap for some reason.


Try to swapoff (by hands) before shutdown.
Shutdown sequence, I think, unmounts carrying disk before swapping off 
a carried file. If I am right, -L should be processed on shutdown also.

Just a guess.
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: Swap Questions

2015-08-17 Thread Tim Daneliuk
On 08/17/2015 12:53 PM, Antony Uspensky wrote:
 On Sat, 15 Aug 2015, Tim Daneliuk wrote:
 
 So -L does fix the problem - sort of.  The machine picks up the file as
 additional swap on boot just fine.  HWOEVER, when I try to reboot or shut
 down the host, I get a panic telling me some noise about not being able
 to shutdown swap for some reason.
 
 Try to swapoff (by hands) before shutdown.
 Shutdown sequence, I think, unmounts carrying disk before swapping off a 
 carried file. If I am right, -L should be processed on shutdown also.
 Just a guess.

Yes, that did it.  

But, isn't this kind of an operational bug?  Shouldn't the shutdown logic
do the swapoff before the unmount if it sees files being used for swap?

i.e. Should I enter this as a bug report?

The only reason this matters - and it's a pretty big reason - is for production
servers when someone logs in remotely, becomes root, and issued reboot.  The
machine hangs at the panic and never comes back ... something you do not see
unless you are in a console of some sort ...
-- 

Tim Daneliuk tun...@tundraware.com
PGP Key: http://www.tundraware.com/PGP/

___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: Swap Questions

2015-08-16 Thread Ronald Klop
On Sat, 15 Aug 2015 21:07:55 +0200, Tim Daneliuk tun...@tundraware.com  
wrote:



On 08/14/2015 12:39 PM, Warren Block wrote:

On Fri, 14 Aug 2015, Tim Daneliuk wrote:

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:

Aug 14 00:01:22 myhost kernel: swap_pager_getswapspace(10): failed
Aug 14 00:01:22 myhost kernel: swap_pager_getswapspace(14): failed
Aug 14 00:01:22 myhost kernel: swap_pager_getswapspace(11): failed
Aug 14 00:01:22 myhost kernel: swap_pager_getswapspace(6): failed
Aug 14 00:01:22 myhost kernel: swap_pager_getswapspace(7): failed
Aug 14 00:01:22 myhost last message repeated 2 times


So, I added this to fstab (after creating /usr/swap0):

md99noneswapsw,file=/usr/swap000

And then did this:

swapon -aq


But, when I do a swapinfo, all I can see is the disk swap partition
that comes standard with the VPS:


Device  1K-blocks UsedAvail Capacity
/dev/gpt/swapfs   1048576   456572   59200444%


Add the -L (late) option to swapon.  How this works might differ  
between 10-Release, 10-Stable, and 11.


Incidentally, md99 does not have to be literal, it's just meant to get  
the md device number up out of the way of common interactive usage of  
mdconfig.



So -L does fix the problem - sort of.  The machine picks up the file as
additional swap on boot just fine.  HWOEVER, when I try to reboot or shut
down the host, I get a panic telling me some noise about not being able
to shutdown swap for some reason.


It helps if you provide the exact text of the panic. People regularly  
don't get to see these inside there crystal ball. ;-) You call it noise.  
Others might get an helpful hint from it to help you.


Regards,
Ronald.



So ... I decided to just add a second disk partition for swap and -
for some reason - it works fine interactively, but upon reboot,
the newly created swap partition no longer exists and gpart shows
the space as free again.  I tried a gpart commit, but get
operation not permitted.  So now I am trying to figure out
how to make gpart changes stick.  This may be an artifact of
the way Digital Ocean droplets are set up 

G

___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: Swap Questions

2015-08-16 Thread Ronald Klop
On Sun, 16 Aug 2015 14:51:49 +0200, Ronald Klop ronald-li...@klop.ws  
wrote:


On Sat, 15 Aug 2015 21:07:55 +0200, Tim Daneliuk tun...@tundraware.com  
wrote:



On 08/14/2015 12:39 PM, Warren Block wrote:

On Fri, 14 Aug 2015, Tim Daneliuk wrote:

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:

Aug 14 00:01:22 myhost kernel: swap_pager_getswapspace(10): failed
Aug 14 00:01:22 myhost kernel: swap_pager_getswapspace(14): failed
Aug 14 00:01:22 myhost kernel: swap_pager_getswapspace(11): failed
Aug 14 00:01:22 myhost kernel: swap_pager_getswapspace(6): failed
Aug 14 00:01:22 myhost kernel: swap_pager_getswapspace(7): failed
Aug 14 00:01:22 myhost last message repeated 2 times


So, I added this to fstab (after creating /usr/swap0):

md99noneswapsw,file=/usr/swap000

And then did this:

swapon -aq


But, when I do a swapinfo, all I can see is the disk swap partition
that comes standard with the VPS:


Device  1K-blocks UsedAvail Capacity
/dev/gpt/swapfs   1048576   456572   59200444%


Add the -L (late) option to swapon.  How this works might differ  
between 10-Release, 10-Stable, and 11.


Incidentally, md99 does not have to be literal, it's just meant to get  
the md device number up out of the way of common interactive usage of  
mdconfig.



So -L does fix the problem - sort of.  The machine picks up the file as
additional swap on boot just fine.  HWOEVER, when I try to reboot or  
shut

down the host, I get a panic telling me some noise about not being able
to shutdown swap for some reason.


It helps if you provide the exact text of the panic. People regularly  
don't get to see these inside there crystal ball. ;-) You call it noise.  
Others might get an helpful hint from it to help you.



Maybe you already knew, but adding dumpdev=AUTO in /etc/rc.conf can  
provide a kernel dump on panic which can be analyzed after reboot.


Ronald.




Regards,
Ronald.



So ... I decided to just add a second disk partition for swap and -
for some reason - it works fine interactively, but upon reboot,
the newly created swap partition no longer exists and gpart shows
the space as free again.  I tried a gpart commit, but get
operation not permitted.  So now I am trying to figure out
how to make gpart changes stick.  This may be an artifact of
the way Digital Ocean droplets are set up 

G

___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org

___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: Swap Questions

2015-08-15 Thread Tim Daneliuk
On 08/14/2015 12:39 PM, Warren Block wrote:
 On Fri, 14 Aug 2015, Tim Daneliuk wrote:
 
 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:

 Aug 14 00:01:22 myhost kernel: swap_pager_getswapspace(10): failed
 Aug 14 00:01:22 myhost kernel: swap_pager_getswapspace(14): failed
 Aug 14 00:01:22 myhost kernel: swap_pager_getswapspace(11): failed
 Aug 14 00:01:22 myhost kernel: swap_pager_getswapspace(6): failed
 Aug 14 00:01:22 myhost kernel: swap_pager_getswapspace(7): failed
 Aug 14 00:01:22 myhost last message repeated 2 times


 So, I added this to fstab (after creating /usr/swap0):

 md99noneswapsw,file=/usr/swap000

 And then did this:

 swapon -aq


 But, when I do a swapinfo, all I can see is the disk swap partition
 that comes standard with the VPS:


 Device  1K-blocks UsedAvail Capacity
 /dev/gpt/swapfs   1048576   456572   59200444%
 
 Add the -L (late) option to swapon.  How this works might differ between 
 10-Release, 10-Stable, and 11.
 
 Incidentally, md99 does not have to be literal, it's just meant to get the md 
 device number up out of the way of common interactive usage of mdconfig.


So -L does fix the problem - sort of.  The machine picks up the file as
additional swap on boot just fine.  HWOEVER, when I try to reboot or shut
down the host, I get a panic telling me some noise about not being able
to shutdown swap for some reason.

So ... I decided to just add a second disk partition for swap and -
for some reason - it works fine interactively, but upon reboot,
the newly created swap partition no longer exists and gpart shows
the space as free again.  I tried a gpart commit, but get 
operation not permitted.  So now I am trying to figure out
how to make gpart changes stick.  This may be an artifact of
the way Digital Ocean droplets are set up 

G

-- 

Tim Daneliuk tun...@tundraware.com
PGP Key: http://www.tundraware.com/PGP/

___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: Swap Questions

2015-08-14 Thread Patrick M. Hausen
HI!

 Am 14.08.2015 um 15:15 schrieb Tim Daneliuk tun...@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
-- 
punkt.de GmbH * Kaiserallee 13a * 76133 Karlsruhe
Tel. 0721 9109 0 * Fax 0721 9109 100
i...@punkt.de   http://www.punkt.de
Gf: Jürgen Egeling  AG Mannheim 108285



___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org

Re: Swap Questions

2015-08-14 Thread Ronald Klop
On Fri, 14 Aug 2015 15:15:26 +0200, Tim Daneliuk tun...@tundraware.com  
wrote:



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:

Aug 14 00:01:22 myhost kernel: swap_pager_getswapspace(10): failed
Aug 14 00:01:22 myhost kernel: swap_pager_getswapspace(14): failed
Aug 14 00:01:22 myhost kernel: swap_pager_getswapspace(11): failed
Aug 14 00:01:22 myhost kernel: swap_pager_getswapspace(6): failed
Aug 14 00:01:22 myhost kernel: swap_pager_getswapspace(7): failed
Aug 14 00:01:22 myhost last message repeated 2 times


So, I added this to fstab (after creating /usr/swap0):

md99noneswapsw,file=/usr/swap0  0   0

And then did this:

swapon -aq


But, when I do a swapinfo, all I can see is the disk swap partition
that comes standard with the VPS:


Device  1K-blocks UsedAvail Capacity
/dev/gpt/swapfs   1048576   456572   59200444%



Two questions:

1) Is this reasonable behavior from  a machine wiht 512M of memory and
   a 1G swap partition?  I am doing things like running clamscan and
   buildworld at the same time. That's why I tried to add space with
   a file.

2) Why doesn't the extra swap disk appear in the hostinfo output.



Does the /dev/md99 device exist now? Otherwise something went wrong when  
you tried adding swap. Try swapon -a without the -q.


Ronald
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: Swap Questions

2015-08-14 Thread Tim Daneliuk
On 08/14/2015 08:53 AM, Patrick M. Hausen wrote:
 HI!
 
 Am 14.08.2015 um 15:15 schrieb Tim Daneliuk tun...@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.

-- 

Tim Daneliuk tun...@tundraware.com
PGP Key: http://www.tundraware.com/PGP/

___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: Swap Questions

2015-08-14 Thread Tim Daneliuk
On 08/14/2015 08:35 AM, Ronald Klop wrote:
 Does the /dev/md99 device exist now? Otherwise something went wrong when you 
 tried adding swap. Try swapon -a without the -q.

Yes, the device exists and yes, swapon claims is is in use:

swapon -a
swapon: md99 on /usr/swap0: Device already in use

But swapinfo doesn't know about it, if it is:

swapinfo 
Device  1K-blocks UsedAvail Capacity
/dev/gpt/swapfs   1048576   500300   54827648%


I don't know whether this is just an artifact of how swapinfo reports things,
but the system acts like it's not seeing the additional swap when it is under
heavy load.

The main culprit here, BTW, is clamav which chews through memory like crazy
as best as I can determine, and this is a VM with only 512M of memory, hence
the desire to increase swap space.

-- 

Tim Daneliuk tun...@tundraware.com
PGP Key: http://www.tundraware.com/PGP/

___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: Swap Questions

2015-08-14 Thread Ronald Klop

On Fri, 14 Aug 2015 16:44:31 +0200, Tim Daneliuk tun...@tundraware.com
wrote:


On 08/14/2015 08:35 AM, Ronald Klop wrote:
Does the /dev/md99 device exist now? Otherwise something went wrong  
when you tried adding swap. Try swapon -a without the -q.


Yes, the device exists and yes, swapon claims is is in use:

swapon -a
swapon: md99 on /usr/swap0: Device already in use

But swapinfo doesn't know about it, if it is:

swapinfo
Device  1K-blocks UsedAvail Capacity
/dev/gpt/swapfs   1048576   500300   54827648%


I don't know whether this is just an artifact of how swapinfo reports  
things,
but the system acts like it's not seeing the additional swap when it is  
under

heavy load.

The main culprit here, BTW, is clamav which chews through memory like  
crazy
as best as I can determine, and this is a VM with only 512M of memory,  
hence

the desire to increase swap space.




I tested this on my 11-CURRENT/amd64 laptop and I get this:

# grep swap /etc/fstab
/dev/gpt/swap0  noneswapsw  0   0
md99noneswapsw,file=/tmp/test   0   0

# dd if=/dev/zero of=/tmp/test bs=1M count=10

# swapon -a
swapon: adding /dev/md99 as swap device

[root@sjakie /tmp]# swapinfo
Device  1K-blocks UsedAvail Capacity
/dev/gpt/swap04193280   276744  3916536 7%
/dev/md99   10240010240 0%
Total 4203520   276744  3926776 7%

Works ok for me.

Regards,
Ronald.
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: Swap Questions

2015-08-14 Thread Tim Daneliuk
On 08/14/2015 12:39 PM, Warren Block wrote:
 On Fri, 14 Aug 2015, Tim Daneliuk wrote:
 
 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:

 Aug 14 00:01:22 myhost kernel: swap_pager_getswapspace(10): failed
 Aug 14 00:01:22 myhost kernel: swap_pager_getswapspace(14): failed
 Aug 14 00:01:22 myhost kernel: swap_pager_getswapspace(11): failed
 Aug 14 00:01:22 myhost kernel: swap_pager_getswapspace(6): failed
 Aug 14 00:01:22 myhost kernel: swap_pager_getswapspace(7): failed
 Aug 14 00:01:22 myhost last message repeated 2 times


 So, I added this to fstab (after creating /usr/swap0):

 md99noneswapsw,file=/usr/swap000

 And then did this:

 swapon -aq


 But, when I do a swapinfo, all I can see is the disk swap partition
 that comes standard with the VPS:


 Device  1K-blocks UsedAvail Capacity
 /dev/gpt/swapfs   1048576   456572   59200444%
 
 Add the -L (late) option to swapon.  How this works might differ between 
 10-Release, 10-Stable, and 11.
 
 Incidentally, md99 does not have to be literal, it's just meant to get the md 
 device number up out of the way of common interactive usage of mdconfig.


I can try that, but this still does not resolve the issue of md99 (I get
that its not literal :)   is not destroyed with the swapoff nor the fact
that the swap file doesn't get put into use at all on boot.

-- 

Tim Daneliuk tun...@tundraware.com
PGP Key: http://www.tundraware.com/PGP/

___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: Swap Questions

2015-08-14 Thread Warren Block

On Fri, 14 Aug 2015, Tim Daneliuk wrote:


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:

Aug 14 00:01:22 myhost kernel: swap_pager_getswapspace(10): failed
Aug 14 00:01:22 myhost kernel: swap_pager_getswapspace(14): failed
Aug 14 00:01:22 myhost kernel: swap_pager_getswapspace(11): failed
Aug 14 00:01:22 myhost kernel: swap_pager_getswapspace(6): failed
Aug 14 00:01:22 myhost kernel: swap_pager_getswapspace(7): failed
Aug 14 00:01:22 myhost last message repeated 2 times


So, I added this to fstab (after creating /usr/swap0):

md99noneswapsw,file=/usr/swap0  0   0

And then did this:

swapon -aq


But, when I do a swapinfo, all I can see is the disk swap partition
that comes standard with the VPS:


Device  1K-blocks UsedAvail Capacity
/dev/gpt/swapfs   1048576   456572   59200444%


Add the -L (late) option to swapon.  How this works might differ between 
10-Release, 10-Stable, and 11.


Incidentally, md99 does not have to be literal, it's just meant to get 
the md device number up out of the way of common interactive usage of 
mdconfig.

___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: Swap Questions

2015-08-14 Thread Carl Johnson
Tim Daneliuk tun...@tundraware.com writes:

 On 08/14/2015 11:38 AM, Carl Johnson wrote:

 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.
 

 Would you mind posting the exact line you're using...  Thanks

md  noneswapsw,late,file=/var/swapfile  0   0

This is on a Raspberry Pi, but I don't think that should make any
difference.

-- 
Carl Johnsonca...@peak.org

___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: Swap Questions

2015-08-14 Thread Tim Daneliuk
On 08/14/2015 10:48 AM, Carl Johnson wrote:
 Tim Daneliuk tun...@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 tun...@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.


Ideas anyone?  (And that for all the help from you folks...)

Tim Daneliuk tun...@tundraware.com
PGP Key: http://www.tundraware.com/PGP/

___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: Swap Questions

2015-08-14 Thread Carl Johnson
Tim Daneliuk tun...@tundraware.com writes:

 On 08/14/2015 10:48 AM, Carl Johnson wrote:
 Tim Daneliuk tun...@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 tun...@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 Johnsonca...@peak.org

___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: Swap Questions

2015-08-14 Thread Tim Daneliuk
On 08/14/2015 11:38 AM, Carl Johnson wrote:

 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.
 

Would you mind posting the exact line you're using...  Thanks

-- 

Tim Daneliuk tun...@tundraware.com
PGP Key: http://www.tundraware.com/PGP/

___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: Swap Questions

2015-08-14 Thread Carl Johnson
Tim Daneliuk tun...@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 tun...@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.

-- 
Carl Johnsonca...@peak.org

___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org