Project

General

Profile

Bug #9182

SWAP not working after clean install

Added by Victor Preatoni 9 months ago. Updated 8 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Installer
Target version:
Start date:
12/07/2018
Due date:
% Done:

100%

Estimated time:
Affected Version:
2.4.4_1
Affected Architecture:
amd64

Description

After 2.4.4_1 clean install, I realized swap is improperly configured (and not working of course). I used the automatic partitioning method during install.

If doing a ls /dev/label , swap partition is defined as swap0

[2.4.4-RELEASE][root@firewall]/root: ls /dev/label/
swap0

But if checking into /etc/fstab file, swap partition is defined as swap1

[2.4.4-RELEASE][root@firewall]/root: cat /etc/fstab 
/dev/ufsid/5c0b0a83b67185f2     /       ufs     rw      1       1
/dev/label/swap1        none    swap    sw      0       0

Workaround is to manually edit fstab file and change swap1 to swap0.

Associated revisions

Revision d36e5a49 (diff)
Added by Jim Pingle 8 months ago

Alternate swap device location tactics. Issue #9182

Revision edd3bc47 (diff)
Added by Jim Pingle 8 months ago

Alternate swap device location tactics. Issue #9182

(cherry picked from commit d36e5a49e6104c52bca2153eba45709d5af99599)

History

#1 Updated by Jim Pingle 8 months ago

  • Assignee set to Jim Pingle
  • Target version set to 2.4.4-p2

We have confirmed it does affect the CE installer. Still checking on potential causes.

#2 Updated by Jim Pingle 8 months ago

  • Status changed from New to This Sprint

#3 Updated by Jim Pingle 8 months ago

  • % Done changed from 0 to 50

The installer still needs fixed so it doesn't generate an incorrect fstab.

I have pushed a workaround that will attempt an alternate tactic to find swap devices if fstab is pointing to a swap device that does not exist. This means users don't have to reinstall or manually edit fstab to use swap.

#4 Updated by Jim Pingle 8 months ago

Also note: This does not affect GPT installs, only ufs/MBR that I've seen thus far. GPT uses the GPT id in fstab, MBR uses device labels for swapX

#5 Updated by Jim Pingle 8 months ago

  • Status changed from This Sprint to Feedback
  • % Done changed from 50 to 100

Commit pushed to the installer to correct the install-time label generation. Should be fixed in the next new snapshots including the change.

#6 Updated by Vladimir Lind 8 months ago

On "2.4.4-RELEASE-p2 (amd64) built on Wed Dec 12 07:39:09 EST 2018 FreeBSD 11.2-RELEASE-p6:

[2.4.4-RELEASE][]/root: ls /dev/label/
swap0
[2.4.4-RELEASE][]/root: cat /etc/fstab
/dev/ufsid/5c1253b932dc7e15 / ufs rw 1 1
/dev/label/swap0 none swap sw 0 0

[2.4.4-RELEASE][]/root: swapinfo
Device 1K-blocks Used Avail Capacity
/dev/label/swap0 373756 0 373756 0%

#7 Updated by Steve Wheeler 8 months ago

  • Status changed from Feedback to Resolved

Tested against:

2.4.5-DEVELOPMENT (amd64)
built on Fri Dec 21 17:32:53 EST 2018
FreeBSD 11.2-RELEASE-p6

Looks good:

[2.4.5-DEVELOPMENT][admin@pfSense.localdomain]/root: ls /dev/label/
swap0
[2.4.5-DEVELOPMENT][admin@pfSense.localdomain]/root: cat /etc/fstab
/dev/ufsid/5c1fad99eab3e9c7    /    ufs    rw    1    1
/dev/label/swap0    none    swap    sw    0    0
[2.4.5-DEVELOPMENT][admin@pfSense.localdomain]/root: swapinfo
Device          1K-blocks     Used    Avail Capacity
/dev/label/swap0    209916        0   209916     0%
[2.4.5-DEVELOPMENT][admin@pfSense.localdomain]/root: 
Message from syslogd@pfSense at Dec 23 15:50:10 ...
pfSense php-fpm[347]: /index.php: Successful login for user 'admin' from: 172.21.16.5 (Local Database)

Also available in: Atom PDF