Project

General

Profile

Bug #6906

Issues with /tmp and /var in RAM on 2.4

Added by Jim Pingle 8 months ago. Updated 6 months ago.

Status:
Resolved
Priority:
High
Category:
Package System
Target version:
Start date:
11/09/2016
Due date:
% Done:

100%

Affected version:
2.4
Affected Architecture:

Description

I set /tmp and /var to be in RAM on a test box running 2.4 and hit a couple issues:

1. I had two packages installed before switching. After, the packages showed as broken (red text). I had to reinstall them both.

2. On every reboot, the system pauses for input at the console:

Mounting filesystems...
override rwxr-xr-x  root/wheel for /root/var/db/pkg? (y/n [n]) y
mv: rename /var/db/pkg to /root/var/db/pkg: Read-only file system
override rwxr-xr-x  root/wheel for /root/var/cache/pkg? (y/n [n]) y
mv: rename /var/cache/pkg to /root/var/cache/pkg: Read-only file system
Setting up memory disks... done.

If I answer y to both, it continues on and appears to operate OK. Packages show as installed OK.

Setting 'high' because it requires console access to make the system boot.

History

#1 Updated by Jim Pingle 8 months ago

Checking deeper, pkg info is empty after switching, which explains why the installed packages showed damaged, but also means the system is in a fairly broken state, upgrade-wise.

Additionally, at bootup this is shown:

pkg: No package(s) matching pfSense-kernel-*

#2 Updated by Jim Pingle 8 months ago

The prompt when booting appears to be due to the fact that /var was not cleaned out when switching to RAM disk, and the other issue may be related as well.

Forcing an unmount of the /var RAM disk shows there are still files in /var, including the package database. The presence of these files makes it fall into the wrong test in pfSense-rc at boot up and it's attempting to mv a directory when it should not. Specifically, this test is evaluating when it should not be: https://github.com/pfsense/pfsense/blob/master/src/etc/pfSense-rc#L120

#3 Updated by Jim Thompson 7 months ago

  • Assignee set to Renato Botelho

#4 Updated by Renato Botelho 6 months ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100

I've used wrong ticket # in commit log. Relevant commits are:

9bf6cdc135ddf108bc08f048687130c09cd09f4b and f09aede6c0f692d93603ad2b3794fe0d78a4cf36

After changes I couldn't reproduce any problems changing it to use or not MFS /var /tmp

#5 Updated by Jim Pingle 6 months ago

  • Status changed from Feedback to Assigned

On a freshly installed VM I activated the option and when it rebooted, it came up all the way but it shows no packages installed. Rebooting didn't change anything.

When disabling the RAM disk setting, the packages were found again.

#6 Updated by Renato Botelho 6 months ago

  • Status changed from Assigned to Feedback

The issue was happening on ZFS and should be fixed after b712dd529e2445fc20e983815a80a4e8ea109760

#7 Updated by Jim Pingle 6 months ago

  • Status changed from Feedback to Resolved

Works fine on two different systems here, thanks!

Also available in: Atom PDF