From nobody Wed May 24 16:24:23 2023 X-Original-To: questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QRGjc625lz4TF6p for ; Wed, 24 May 2023 16:24:36 +0000 (UTC) (envelope-from freebsd@qeng-ho.org) Received: from mailout.qeng-ho.org (mailout.qeng-ho.org [217.155.128.244]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4QRGjc2Rq7z45hj for ; Wed, 24 May 2023 16:24:36 +0000 (UTC) (envelope-from freebsd@qeng-ho.org) Authentication-Results: mx1.freebsd.org; none Received: from [IPV6:2a02:8010:64c9:1::2] (unknown [IPv6:2a02:8010:64c9:1::2]) by mailout.qeng-ho.org (Postfix) with ESMTP id 9C3D7100175; Wed, 24 May 2023 17:24:28 +0100 (BST) Message-ID: Date: Wed, 24 May 2023 16:24:23 +0000 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: zfs-on-root, missing swap (fixed subject) Content-Language: en-GB To: Steven Friedrich , questions@freebsd.org References: <646cc38a-ab59-1bf2-d7c6-d25371159810@FreeBSD.org> From: Arthur Chance In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4QRGjc2Rq7z45hj X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:13037, ipnet:217.155.0.0/16, country:GB] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 24/05/2023 15:54, Steven Friedrich wrote: > On 5/24/23 10:54 AM, Matthew Seaman wrote: >> On 24/05/2023 14:20, Steven Friedrich wrote: >>> On 5/24/23 8:59 AM, Steven Friedrich wrote: >>>> Just this morning, I installed 13.2 on a USB 500 GB SSD  I changed >>>> swap size from 2GB to 128GB. >>>> >>>> Running synth to install kde5, noticed several build fails and synth >>>> claims swap is n/a. >>>> >>>> Checked both df and mount, no swap shown.  Also swapinfo shows no swap. >>>> >>>> Where did it go? >> >> What's the result of `gpart show /dev/ada0` ?  (Assuming ada0 is the >> correct device name for your SSD device.) >> >> You should see something like this: >> >> ``` >> # gpart show /dev/ada0 >> =>       34  976773101  ada0  GPT  (466G) >>          34          6        - free -  (3.0K) >>          40        984     1  freebsd-boot  (492K) >>        1024   16776352     2  freebsd-swap  (8.0G) <<<-----**** >>    16777376  959995752     3  freebsd-zfs  (458G) >>   976773128          7        - free -  (3.5K) >> ``` >> >> which tells you the allocated swap area is /dev/ada0p2.  You should >> then be able to add a line in /etc/fstab like so: >> >> /dev/ada0p2 none swap sw 0 0 >> >> and then run: >> >> `service swap start` >> >> More complicated setups are possible, like swapping to a gmirror >> across partitions on two physical drives, or using glabel to name the >> partition -- useful if you have removable drives that can upset the >> device numbering. >> >> It's not advisable to swap to a ZFS or to a file held on ZFS: >> performance will be bad and you run the risk of system lockups where >> ZFS will demand more swap before it can provide access to the swap area. >> >> 128GB is (I think) the absolute maximum configurable swap size in >> FreeBSD 13.2 -- generally it's advisable to limit swap to about the >> same as RAM on systems with more than 4GB RAM.  See tuning(7). >> >>     Cheers, >> >>     Matthew > > Thanks for the response.  I already discovered the problem.  I was > installing from a USB stick, whuch was assigned da0.  When I rebooted, I > pulled that and the SSD became da0, instead of da1. > > All I had to do was edit /etc/fstab and change da1p3 to da0p3. 8o) It makes a lot of sense to use GPT labels to avoid that sort of problem. They remain the same even if disk numbering changes. > I also re-installed because it was complaining about swap size. I > re-installed with only 64GB swap. > -- We build our computer systems the way we build our cities; over time, without a plan, on top of ruins. — Ellen Ullman