Re: swap space issues

2020-06-25 Thread Greg 'groggy' Lehey
On Thursday, 25 June 2020 at 19:31:34 -0700, Donald Wilde wrote:
> On 6/25/20, Greg 'groggy' Lehey  wrote:
>> On Wednesday, 24 June 2020 at 23:27:27 -0700, Kevin Oberman wrote,
>> without trimming:
>>
>>> On Wed, Jun 24, 2020 at 10:30 PM Greg 'groggy' Lehey 
>>> wrote:
>>
>>> gpart(8) works just fine on MBR drives and partitions/slices and
>>> has a much friendlier user interface. "gpart resize" is the
>>> command you want.
>>
>> Thanks.  I try to offer suggestions that I've tried, and offer an
>> example.  I haven't tried 'gpart resize', but it looks much easier.
>
> 'gpart resize' did work well,

Yes, I saw that from the gpart output you posted.

> although the man page for gpart assumes way too much. I was able to
> successfully work my way through and create ('gpart add') and mount
> not just one but two 32G swap partitions.

Yes, I saw that too.  Not quite what I was suggesting: I suspected
some overflow issue, so the partitions should really have been a
little shy of 32 GB.  And at least for the start you should only mount
one of them.  In the unlikely event that it should threaten to fill
up, you can still mount the other one without rebooting (swapon(1)).

How are things looking now?

Greg
--
Sent from my desktop computer.
Finger g...@freebsd.org for PGP public key.
See complete headers for address and phone numbers.
This message is digitally signed.  If your Microsoft mail program
reports problems, please read http://lemis.com/broken-MUA


signature.asc
Description: PGP signature


Re: swap space issues

2020-06-25 Thread Donald Wilde
On 6/25/20, Greg 'groggy' Lehey  wrote:
> On Wednesday, 24 June 2020 at 23:27:27 -0700, Kevin Oberman wrote,
> without trimming:
>
>> On Wed, Jun 24, 2020 at 10:30 PM Greg 'groggy' Lehey 
>> wrote:
>
>> gpart(8) works just fine on MBR drives and partitions/slices and has a
>> much
>> friendlier user interface. "gpart resize"  is the command you want.
>
> Thanks.  I try to offer suggestions that I've tried, and offer an
> example.  I haven't tried 'gpart resize', but it looks much easier.
>
'gpart resize' did work well, although the man page for gpart assumes
way too much. I was able to successfully work my way through and
create ('gpart add') and mount not just one but two 32G swap
partitions.
-- 
Don Wilde

* What is the Internet of Things but a system *
* of systems including humans? *

___
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 space issues

2020-06-25 Thread Greg 'groggy' Lehey
On Wednesday, 24 June 2020 at 23:27:27 -0700, Kevin Oberman wrote,
without trimming:

> On Wed, Jun 24, 2020 at 10:30 PM Greg 'groggy' Lehey 
> wrote:
>
>> On Wednesday, 24 June 2020 at 20:34:24 -0700, Donald Wilde wrote:
>>> On 6/24/20, Greg 'groggy' Lehey  wrote:
 On Wednesday, 24 June 2020 at 18:51:04 -0700, Donald Wilde wrote:
> On 6/24/20, Greg 'groggy' Lehey  wrote:
>> On Wednesday, 24 June 2020 at  9:36:23 -0700, Donald Wilde wrote:
>>> All,
...

This would be much more readable if you trimmed unrelated content.
>> That's really puzzling.  It seems that it gave you much more than you
>> asked for.
>>
>> Try this in single user mode: modify the size of the swap partition to
>> 30 GB.  I haven't used MBR partitions for years now, but I believe
>> that 'bsdlabel -e' will do the trick.  Just shorten the length of the
>> b partition.  You may need to 'mount -u /'.  If you do it right
>> (check!), this won't harm any of the other partitions: it'll just
>> leave 26 GB free between the swap partition and the next partition.
>>
> gpart(8) works just fine on MBR drives and partitions/slices and has a much
> friendlier user interface. "gpart resize"  is the command you want.

Thanks.  I try to offer suggestions that I've tried, and offer an
example.  I haven't tried 'gpart resize', but it looks much easier.

Greg
--
Sent from my desktop computer.
Finger g...@freebsd.org for PGP public key.
See complete headers for address and phone numbers.
This message is digitally signed.  If your Microsoft mail program
reports problems, please read http://lemis.com/broken-MUA


signature.asc
Description: PGP signature


Re: swap space issues

2020-06-25 Thread Greg 'groggy' Lehey
On Friday, 26 June 2020 at  1:55:29 +0700, Eugene Grosbein wrote:
> 26.06.2020 1:30, Donald Wilde wrote:
>
>> Here's 'pstat -s' on the i3 (which registers as cpu HAMMER):
>>
>> Device  1K-blocks UsedAvail Capacity
>> /dev/ada0s1b 335544320 33554432 0%
>> /dev/ada0s1d 335544320 33554432 0%
>> Total671088640 67108864 0%
>
> "pstat -s" may also be invoked as "swapinfo"

That's no shorter.

> or better "swapinfo -h".

"Better" is in the eye of the beholder.  I find -h extremely
irritating.

Greg
--
Sent from my desktop computer.
Finger g...@freebsd.org for PGP public key.
See complete headers for address and phone numbers.
This message is digitally signed.  If your Microsoft mail program
reports problems, please read http://lemis.com/broken-MUA


signature.asc
Description: PGP signature


Re: swap space issues

2020-06-25 Thread Eugene Grosbein
26.06.2020 1:30, Donald Wilde wrote:

> Here's 'pstat -s' on the i3 (which registers as cpu HAMMER):
> 
> Device  1K-blocks UsedAvail Capacity
> /dev/ada0s1b 335544320 33554432 0%
> /dev/ada0s1d 335544320 33554432 0%
> Total671088640 67108864 0%

"pstat -s" may also be invoked as "swapinfo" or better "swapinfo -h".


___
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 space issues

2020-06-25 Thread Donald Wilde
On 6/25/20, Paul Mather  wrote:
> On Jun 24, 2020, at 11:34 PM, Donald Wilde  wrote:
>
>
> I think I've missed in this thread where you said which FreeBSD arch you are
> running: is it FreeBSD/amd64 or FreeBSD/i386?  (With an "old" machine, 4 GB
> RAM, and an install still using MBR, it could potentially be FreeBSD/i386.)
>
Sorry, Paul. You're right, I didn't say. amd64. Here's 'uname -a'

FreeBSD Synergy10 12.1-STABLE FreeBSD 12.1-STABLE r362500
LIBERTYSERVER  amd64

> If it is FreeBSD/i386, there is a precedent for it having problems with
> configuring large amounts of swap.  However, it is usually related to having
> relatively little RAM, too (large amounts of swap space means the OS needs
> to use more RAM to keep track of it).
>
That's good to know, Paul. I am once again doing embedded work, which
means I will be coding 32-bit ARM M7's soon enough.

Here's 'pstat -s' on the i3 (which registers as cpu HAMMER):

Device  1K-blocks UsedAvail Capacity
/dev/ada0s1b 335544320 33554432 0%
/dev/ada0s1d 335544320 33554432 0%
Total671088640 67108864 0%





-- 
Don Wilde

* What is the Internet of Things but a system *
* of systems including humans? *

___
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 space issues

2020-06-25 Thread Paul Mather
On Jun 24, 2020, at 11:34 PM, Donald Wilde  wrote:

> Meant that I upgraded from 12.1-RELEASE to 12-STABLE. When I
> configured the -RELEASE install, I manually messed with the MBR disk
> partitions. This is nominally a half-TB HDD which showed up as a total
> of 446 G available (IIRC, gpart should show it's actual size). I did
> auto partitioning, looked at the sizes, and manually set my partitions
> to give me 40G of swap instead of the auto-generated size of 4G.
> 
> This is an old Dell i3 laptop. It's really generic, picked
> specifically as something I could use for Ubuntu or FreeBSD. Dell
> SERVICE TAG is 5K8W162, but it's a generic i3 with 4G of RAM.


I think I've missed in this thread where you said which FreeBSD arch you are 
running: is it FreeBSD/amd64 or FreeBSD/i386?  (With an "old" machine, 4 GB 
RAM, and an install still using MBR, it could potentially be FreeBSD/i386.)

If it is FreeBSD/i386, there is a precedent for it having problems with 
configuring large amounts of swap.  However, it is usually related to having 
relatively little RAM, too (large amounts of swap space means the OS needs to 
use more RAM to keep track of it).

Cheers,

Paul.

___
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 space issues

2020-06-25 Thread Eugene Grosbein
25.06.2020 18:42, Donald Wilde wrote:

> Thanks, Kevin! My laptop's BIOS is old enough that it balked when I
> tried to boot from a GPT setup of 12.1R. One Of These Days I'll fix
> that but the MBR works and I needed to move on.
> 
> We'll get there! :D

gpart is not for GPT, it is for "GEOM Partitioning".
gpart manages all kind of partitioning in FreeBSD,
including swap partitions.


___
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 space issues

2020-06-25 Thread Donald Wilde
On 6/25/20, Kevin Oberman  wrote:
> On Thu, Jun 25, 2020 at 4:42 AM Donald Wilde  wrote:
>
>> On 6/24/20, Kevin Oberman  wrote:
>> > On Wed, Jun 24, 2020 at 10:30 PM Greg 'groggy' Lehey 
>> > wrote:
>> >
>> >> On Wednesday, 24 June 2020 at 20:34:24 -0700, Donald Wilde wrote:
>> >> > On 6/24/20, Greg 'groggy' Lehey  wrote:
>> >> >> On Wednesday, 24 June 2020 at 18:51:04 -0700, Donald Wilde wrote:
>> >> >>> On 6/24/20, Greg 'groggy' Lehey  wrote:
>> >>  On Wednesday, 24 June 2020 at  9:36:23 -0700, Donald Wilde wrote:
>> >> > All,
>> >> >
>> >> > I recently upgraded my 12-STABLE system to the latest, and now
>> >> > my
>> >> > swap subsystems aren't working. I deliberately set up a 40GB
>> >> > partition for swap, and when I do 'top -t' I am only seeing
>> >> > 7906M
>> >> > total.
>> >> 
>> >>  That looks suspiciously like the difference from 32 GB.  Could it
>> be
>> >>  numeric overflow?  And if so, where?  What does pstat -s say?
>> >> >>>
>> >> >>> Well, hi Greg! LTNT2!
>> >> >>
>> >> >> Indeed.
>> >> >>
>> >> >>> pstat -shm:
>> >> >>>
>> >> >>> /dev/ada0s1b  65536 (1M blocks), Used: 1.5G, Avail: 63G, Capacity:
>> 2%
>> >> >>
>> >> >> Now that's really puzzling.  Why does it say 64 G when you said 40
>> >> >> G,
>> >> >> and the error from top tends to confirm it?  How big is the
>> >> >> partition
>> >> >> (gpart output)?
>> >> >
>> >> > Attached 'gpart list' output
>> >>
>> >> FWIW, gpart show would have done the job.  But what I see there is Yet
>> >> Another swap partition size, 66 GB.   So so far we have various parts
>> >> reporting 8 GB, 40 GB, 64 GB and 66 GB.
>> >>
>> >> > Reduced kern.maxswzone to 999. Is it decimal or unlabeled hex?
>> >>
>> >> It'll be decimal, but it refers to the number of swblk structures
>> >> assigned in memory, and after reading the code I'm still not 100% in
>> >> the clear how this relates to the size of swap, if at all.
>> >>
>> >> > 'top' now shows 4597M total swap.
>> >>
>> >> ... and 4.6 GB.  5 different sizes.
>> >>
>> >> You really shouldn't be relying on top for swap info.  It's a third
>> >> party program that demonstrably shows incorrect results (though I
>>
>> I was continuing to reference it because its 'incorrect results' might
>> flag where we need to see things working. When 'top' shows the right
>> results, we've fixed the right thing.
>>
>> >> believe that the maintainer would be very interested to know why and
>> >> to fix it).  But pstat -s (without any further options) should show
>> >> what the kernel thinks.
>>
>> Here's what I see immediately following shutdown -r and boot:
>>
>> Device  1K-blocks UsedAvail Capacity
>> /dev/ada0s1b 671088640 67108864 0%
>>
>> >>
>> >> >>> What else can I share to help diagnose this?
>> >> >>
>> >> >> Background, maybe?  You say that you upgraded your system.  Did you
>> >> >> change the swap size when you did?  What were swap and RAM sizes
>> >> >> before and after?
>> >> >
>> >> > Meant that I upgraded from 12.1-RELEASE to 12-STABLE. When I
>> >> > configured the -RELEASE install, I manually messed with the MBR disk
>> >> > partitions. This is nominally a half-TB HDD which showed up as a
>> >> > total
>> >> > of 446 G available (IIRC, gpart should show it's actual size). I did
>> >> > auto partitioning, looked at the sizes, and manually set my
>> >> > partitions
>> >> > to give me 40G of swap instead of the auto-generated size of 4G.
>> >>
>> >> That's really puzzling.  It seems that it gave you much more than you
>> >> asked for.
>> >>
>> >> Try this in single user mode: modify the size of the swap partition to
>> >> 30 GB.  I haven't used MBR partitions for years now, but I believe
>> >> that 'bsdlabel -e' will do the trick.  Just shorten the length of the
>> >> b partition.  You may need to 'mount -u /'.  If you do it right
>> >> (check!), this won't harm any of the other partitions: it'll just
>> >> leave 26 GB free between the swap partition and the next partition.
>>
>> Thanks again, Greg!
>>
>> >>
>> > gpart(8) works just fine on MBR drives and partitions/slices and has a
>> much
>> > friendlier user interface. "gpart resize"  is the command you want.
>> > --
>> > Kevin Oberman, Part time kid herder and retired Network Engineer
>>
>> Thanks, Kevin! My laptop's BIOS is old enough that it balked when I
>> tried to boot from a GPT setup of 12.1R. One Of These Days I'll fix
>> that but the MBR works and I needed to move on.
>>
>> We'll get there! :D
>>
>
> I think a lot of people miss the point that the fact that gpart was written
> primarily to provide support  GPT partitioning, it also supports MBR and
> bsdlabel is really obsolete. gpart(8) supports 7 different partitioning
> schemes including the old RAW scheme, GPT and MBR. I still have an MBR disk
> on my near decade old laptop and I use gpart on it.

I have been bouncing around between gpart and geom, seeking to
understand them better. The man page is... obtuse... but 

Re: swap space issues

2020-06-25 Thread Kevin Oberman
On Thu, Jun 25, 2020 at 4:42 AM Donald Wilde  wrote:

> On 6/24/20, Kevin Oberman  wrote:
> > On Wed, Jun 24, 2020 at 10:30 PM Greg 'groggy' Lehey 
> > wrote:
> >
> >> On Wednesday, 24 June 2020 at 20:34:24 -0700, Donald Wilde wrote:
> >> > On 6/24/20, Greg 'groggy' Lehey  wrote:
> >> >> On Wednesday, 24 June 2020 at 18:51:04 -0700, Donald Wilde wrote:
> >> >>> On 6/24/20, Greg 'groggy' Lehey  wrote:
> >>  On Wednesday, 24 June 2020 at  9:36:23 -0700, Donald Wilde wrote:
> >> > All,
> >> >
> >> > I recently upgraded my 12-STABLE system to the latest, and now my
> >> > swap subsystems aren't working. I deliberately set up a 40GB
> >> > partition for swap, and when I do 'top -t' I am only seeing 7906M
> >> > total.
> >> 
> >>  That looks suspiciously like the difference from 32 GB.  Could it
> be
> >>  numeric overflow?  And if so, where?  What does pstat -s say?
> >> >>>
> >> >>> Well, hi Greg! LTNT2!
> >> >>
> >> >> Indeed.
> >> >>
> >> >>> pstat -shm:
> >> >>>
> >> >>> /dev/ada0s1b  65536 (1M blocks), Used: 1.5G, Avail: 63G, Capacity:
> 2%
> >> >>
> >> >> Now that's really puzzling.  Why does it say 64 G when you said 40 G,
> >> >> and the error from top tends to confirm it?  How big is the partition
> >> >> (gpart output)?
> >> >
> >> > Attached 'gpart list' output
> >>
> >> FWIW, gpart show would have done the job.  But what I see there is Yet
> >> Another swap partition size, 66 GB.   So so far we have various parts
> >> reporting 8 GB, 40 GB, 64 GB and 66 GB.
> >>
> >> > Reduced kern.maxswzone to 999. Is it decimal or unlabeled hex?
> >>
> >> It'll be decimal, but it refers to the number of swblk structures
> >> assigned in memory, and after reading the code I'm still not 100% in
> >> the clear how this relates to the size of swap, if at all.
> >>
> >> > 'top' now shows 4597M total swap.
> >>
> >> ... and 4.6 GB.  5 different sizes.
> >>
> >> You really shouldn't be relying on top for swap info.  It's a third
> >> party program that demonstrably shows incorrect results (though I
>
> I was continuing to reference it because its 'incorrect results' might
> flag where we need to see things working. When 'top' shows the right
> results, we've fixed the right thing.
>
> >> believe that the maintainer would be very interested to know why and
> >> to fix it).  But pstat -s (without any further options) should show
> >> what the kernel thinks.
>
> Here's what I see immediately following shutdown -r and boot:
>
> Device  1K-blocks UsedAvail Capacity
> /dev/ada0s1b 671088640 67108864 0%
>
> >>
> >> >>> What else can I share to help diagnose this?
> >> >>
> >> >> Background, maybe?  You say that you upgraded your system.  Did you
> >> >> change the swap size when you did?  What were swap and RAM sizes
> >> >> before and after?
> >> >
> >> > Meant that I upgraded from 12.1-RELEASE to 12-STABLE. When I
> >> > configured the -RELEASE install, I manually messed with the MBR disk
> >> > partitions. This is nominally a half-TB HDD which showed up as a total
> >> > of 446 G available (IIRC, gpart should show it's actual size). I did
> >> > auto partitioning, looked at the sizes, and manually set my partitions
> >> > to give me 40G of swap instead of the auto-generated size of 4G.
> >>
> >> That's really puzzling.  It seems that it gave you much more than you
> >> asked for.
> >>
> >> Try this in single user mode: modify the size of the swap partition to
> >> 30 GB.  I haven't used MBR partitions for years now, but I believe
> >> that 'bsdlabel -e' will do the trick.  Just shorten the length of the
> >> b partition.  You may need to 'mount -u /'.  If you do it right
> >> (check!), this won't harm any of the other partitions: it'll just
> >> leave 26 GB free between the swap partition and the next partition.
>
> Thanks again, Greg!
>
> >>
> > gpart(8) works just fine on MBR drives and partitions/slices and has a
> much
> > friendlier user interface. "gpart resize"  is the command you want.
> > --
> > Kevin Oberman, Part time kid herder and retired Network Engineer
>
> Thanks, Kevin! My laptop's BIOS is old enough that it balked when I
> tried to boot from a GPT setup of 12.1R. One Of These Days I'll fix
> that but the MBR works and I needed to move on.
>
> We'll get there! :D
>

I think a lot of people miss the point that the fact that gpart was written
primarily to provide support  GPT partitioning, it also supports MBR and
bsdlabel is really obsolete. gpart(8) supports 7 different partitioning
schemes including the old RAW scheme, GPT and MBR. I still have an MBR disk
on my near decade old laptop and I use gpart on it.
--
Kevin Oberman, Part time kid herder and retired Network Engineer
E-mail: rkober...@gmail.com
PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail 

Re: suspend/resume (was: Re: HP Business PC - NMI problem)

2020-06-25 Thread Ali Abdallah
On 24.06.2020 22:22, Walter von Entferndt wrote:
> Dektop & Laptop users with UEFI may want to enable suspend/resume/hibernate 
> to 
> an "Intel Rapid Start Technology" partition with the my HOWTO on https://
> forums.freebsd.org/threads/suspend-resume-to-disk-iffs-irst-partition-intel-
> fast-flash-intel-rapid-start-technology.75860/
> 
> Please leave some kind of feedback, if it works for others it can be polished 
> and go into the FBSD wiki.

Just sharing my experience. I have the above IRST setup on my Thinkpad
x230 since last year with FreeBSD 12.0/12.1, and it works beautifully!

It is nice because I no longer have to make sure to have enough battery
when putting the laptop on S3, because after a configurable time in the
it will save everything to the irst parition and shuts down.

This is the only one thing preventing me from flashing coreboot on my
FreeBSD laptop.

> -- 
> =|o)  "Stell' Dir vor es geht und keiner kriegt's hin." (Wolfgang Neuss)
> 
> 
> ___
> 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"
> 

-- 
Ali Abdallah
GPG fingerprint: 51A0 F4A0 C8CF C98F 842E  A9A8 B945 56F8 1C85 D0D5



signature.asc
Description: PGP signature


Re: swap space issues

2020-06-25 Thread Donald Wilde
On 6/24/20, Kevin Oberman  wrote:
> On Wed, Jun 24, 2020 at 10:30 PM Greg 'groggy' Lehey 
> wrote:
>
>> On Wednesday, 24 June 2020 at 20:34:24 -0700, Donald Wilde wrote:
>> > On 6/24/20, Greg 'groggy' Lehey  wrote:
>> >> On Wednesday, 24 June 2020 at 18:51:04 -0700, Donald Wilde wrote:
>> >>> On 6/24/20, Greg 'groggy' Lehey  wrote:
>>  On Wednesday, 24 June 2020 at  9:36:23 -0700, Donald Wilde wrote:
>> > All,
>> >
>> > I recently upgraded my 12-STABLE system to the latest, and now my
>> > swap subsystems aren't working. I deliberately set up a 40GB
>> > partition for swap, and when I do 'top -t' I am only seeing 7906M
>> > total.
>> 
>>  That looks suspiciously like the difference from 32 GB.  Could it be
>>  numeric overflow?  And if so, where?  What does pstat -s say?
>> >>>
>> >>> Well, hi Greg! LTNT2!
>> >>
>> >> Indeed.
>> >>
>> >>> pstat -shm:
>> >>>
>> >>> /dev/ada0s1b  65536 (1M blocks), Used: 1.5G, Avail: 63G, Capacity: 2%
>> >>
>> >> Now that's really puzzling.  Why does it say 64 G when you said 40 G,
>> >> and the error from top tends to confirm it?  How big is the partition
>> >> (gpart output)?
>> >
>> > Attached 'gpart list' output
>>
>> FWIW, gpart show would have done the job.  But what I see there is Yet
>> Another swap partition size, 66 GB.   So so far we have various parts
>> reporting 8 GB, 40 GB, 64 GB and 66 GB.
>>
>> > Reduced kern.maxswzone to 999. Is it decimal or unlabeled hex?
>>
>> It'll be decimal, but it refers to the number of swblk structures
>> assigned in memory, and after reading the code I'm still not 100% in
>> the clear how this relates to the size of swap, if at all.
>>
>> > 'top' now shows 4597M total swap.
>>
>> ... and 4.6 GB.  5 different sizes.
>>
>> You really shouldn't be relying on top for swap info.  It's a third
>> party program that demonstrably shows incorrect results (though I

I was continuing to reference it because its 'incorrect results' might
flag where we need to see things working. When 'top' shows the right
results, we've fixed the right thing.

>> believe that the maintainer would be very interested to know why and
>> to fix it).  But pstat -s (without any further options) should show
>> what the kernel thinks.

Here's what I see immediately following shutdown -r and boot:

Device  1K-blocks UsedAvail Capacity
/dev/ada0s1b 671088640 67108864 0%

>>
>> >>> What else can I share to help diagnose this?
>> >>
>> >> Background, maybe?  You say that you upgraded your system.  Did you
>> >> change the swap size when you did?  What were swap and RAM sizes
>> >> before and after?
>> >
>> > Meant that I upgraded from 12.1-RELEASE to 12-STABLE. When I
>> > configured the -RELEASE install, I manually messed with the MBR disk
>> > partitions. This is nominally a half-TB HDD which showed up as a total
>> > of 446 G available (IIRC, gpart should show it's actual size). I did
>> > auto partitioning, looked at the sizes, and manually set my partitions
>> > to give me 40G of swap instead of the auto-generated size of 4G.
>>
>> That's really puzzling.  It seems that it gave you much more than you
>> asked for.
>>
>> Try this in single user mode: modify the size of the swap partition to
>> 30 GB.  I haven't used MBR partitions for years now, but I believe
>> that 'bsdlabel -e' will do the trick.  Just shorten the length of the
>> b partition.  You may need to 'mount -u /'.  If you do it right
>> (check!), this won't harm any of the other partitions: it'll just
>> leave 26 GB free between the swap partition and the next partition.

Thanks again, Greg!

>>
> gpart(8) works just fine on MBR drives and partitions/slices and has a much
> friendlier user interface. "gpart resize"  is the command you want.
> --
> Kevin Oberman, Part time kid herder and retired Network Engineer

Thanks, Kevin! My laptop's BIOS is old enough that it balked when I
tried to boot from a GPT setup of 12.1R. One Of These Days I'll fix
that but the MBR works and I needed to move on.

We'll get there! :D
-- 
Don Wilde

* What is the Internet of Things but a system *
* of systems including humans? *

___
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 space issues

2020-06-25 Thread Kevin Oberman
On Wed, Jun 24, 2020 at 10:30 PM Greg 'groggy' Lehey 
wrote:

> On Wednesday, 24 June 2020 at 20:34:24 -0700, Donald Wilde wrote:
> > On 6/24/20, Greg 'groggy' Lehey  wrote:
> >> On Wednesday, 24 June 2020 at 18:51:04 -0700, Donald Wilde wrote:
> >>> On 6/24/20, Greg 'groggy' Lehey  wrote:
>  On Wednesday, 24 June 2020 at  9:36:23 -0700, Donald Wilde wrote:
> > All,
> >
> > I recently upgraded my 12-STABLE system to the latest, and now my
> > swap subsystems aren't working. I deliberately set up a 40GB
> > partition for swap, and when I do 'top -t' I am only seeing 7906M
> > total.
> 
>  That looks suspiciously like the difference from 32 GB.  Could it be
>  numeric overflow?  And if so, where?  What does pstat -s say?
> >>>
> >>> Well, hi Greg! LTNT2!
> >>
> >> Indeed.
> >>
> >>> pstat -shm:
> >>>
> >>> /dev/ada0s1b  65536 (1M blocks), Used: 1.5G, Avail: 63G, Capacity: 2%
> >>
> >> Now that's really puzzling.  Why does it say 64 G when you said 40 G,
> >> and the error from top tends to confirm it?  How big is the partition
> >> (gpart output)?
> >
> > Attached 'gpart list' output
>
> FWIW, gpart show would have done the job.  But what I see there is Yet
> Another swap partition size, 66 GB.   So so far we have various parts
> reporting 8 GB, 40 GB, 64 GB and 66 GB.
>
> > Reduced kern.maxswzone to 999. Is it decimal or unlabeled hex?
>
> It'll be decimal, but it refers to the number of swblk structures
> assigned in memory, and after reading the code I'm still not 100% in
> the clear how this relates to the size of swap, if at all.
>
> > 'top' now shows 4597M total swap.
>
> ... and 4.6 GB.  5 different sizes.
>
> You really shouldn't be relying on top for swap info.  It's a third
> party program that demonstrably shows incorrect results (though I
> believe that the maintainer would be very interested to know why and
> to fix it).  But pstat -s (without any further options) should show
> what the kernel thinks.
>
> >>> What else can I share to help diagnose this?
> >>
> >> Background, maybe?  You say that you upgraded your system.  Did you
> >> change the swap size when you did?  What were swap and RAM sizes
> >> before and after?
> >
> > Meant that I upgraded from 12.1-RELEASE to 12-STABLE. When I
> > configured the -RELEASE install, I manually messed with the MBR disk
> > partitions. This is nominally a half-TB HDD which showed up as a total
> > of 446 G available (IIRC, gpart should show it's actual size). I did
> > auto partitioning, looked at the sizes, and manually set my partitions
> > to give me 40G of swap instead of the auto-generated size of 4G.
>
> That's really puzzling.  It seems that it gave you much more than you
> asked for.
>
> Try this in single user mode: modify the size of the swap partition to
> 30 GB.  I haven't used MBR partitions for years now, but I believe
> that 'bsdlabel -e' will do the trick.  Just shorten the length of the
> b partition.  You may need to 'mount -u /'.  If you do it right
> (check!), this won't harm any of the other partitions: it'll just
> leave 26 GB free between the swap partition and the next partition.
>
gpart(8) works just fine on MBR drives and partitions/slices and has a much
friendlier user interface. "gpart resize"  is the command you want.
--
Kevin Oberman, Part time kid herder and retired Network Engineer
E-mail: rkober...@gmail.com
PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683
___
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"