Project

General

Profile

Actions

Bug #9182

closed

SWAP not working after clean install

Added by Victor Preatoni almost 6 years ago. Updated almost 6 years ago.

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

100%

Estimated time:
Plus Target Version:
Release Notes:
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.

Actions #1

Updated by Jim Pingle almost 6 years 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.

Actions #2

Updated by Jim Pingle almost 6 years ago

  • Status changed from New to 13
Actions #3

Updated by Jim Pingle almost 6 years 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.

Actions #4

Updated by Jim Pingle almost 6 years 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

Actions #5

Updated by Jim Pingle almost 6 years ago

  • Status changed from 13 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.

Actions #6

Updated by Vladimir Lind almost 6 years 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%

Actions #7

Updated by Steve Wheeler almost 6 years 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)

Actions

Also available in: Atom PDF