RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1875567 - Fix handling of separate /var
Summary: Fix handling of separate /var
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: ostree
Version: 8.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: Colin Walters
QA Contact: Micah Abbott
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-09-03 19:11 UTC by Colin Walters
Modified: 2021-09-03 15:21 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-04 03:10:21 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2020:4706 0 None None None 2020-11-04 03:10:31 UTC

Description Colin Walters 2020-09-03 19:11:32 UTC
We need to backport https://github.com/ostreedev/ostree/pull/2186 to fix having /var as a mountpoint for RHCOS 4.6.

Comment 8 Micah Abbott 2020-09-24 15:44:35 UTC
Booted an RHCOS image with the following Ignition snippet for configuring /var as a mount point:

```
$ jq . < varmount.json 
{
  "ignition": {
    "version": "3.1.0"
  },
  "passwd": {
    "users": [
      {
        "name": "core",
        "passwordHash": "$1$6O...",
        "sshAuthorizedKeys": [
          "ssh-rsa AAAAB3NzaC1yc..."
        ]
      }
    ]
  },
  "storage": {
    "disks": [
      {
        "device": "/dev/vda",
        "partitions": [
          {
            "label": "var",
            "sizeMiB": 0,
            "startMiB": 5000
          }
        ],
        "wipeTable": false
      }
    ],
    "filesystems": [
      {
        "device": "/dev/disk/by-partlabel/var",
        "format": "xfs",
        "path": "/var"
      }
    ]
  },
  "systemd": {
    "units": [
      {
        "contents": "[Unit]\nBefore=local-fs.target\nRequires=systemd-fsck@/dev/disk/by-partlabel/var\nAfter=systemd-fsck@/dev/disk/by-partlabel/var\n\n[Mount]\nWhere=/var\nWhat=/dev/disk/by-partlabel/var\nType=xfs\n\n[Install]\nRequiredBy=local-fs.target",
        "enabled": true,
        "name": "var.mount"
      }
    ]
  }
}
```

Mount point was created successfully and system booted up fine:


```
$ rpm-ostree status
State: idle
Deployments:
* ostree://5d65bddfb072101a84501cd87b8abc650beb8dc0aa2bfeff022fc750cde52f1d
                   Version: 46.82.202009222340-0 (2020-09-22T23:44:32Z)
[core@ibm-p8-kvm-03-guest-02 ~]$ rpm -q ostree
ostree-2020.5-4.el8.x86_64
$ lsblk
NAME                         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sr0                           11:0    1 1024M  0 rom  
vda                          252:0    0   16G  0 disk 
|-vda1                       252:1    0  384M  0 part /boot
|-vda2                       252:2    0  127M  0 part /boot/efi
|-vda3                       252:3    0    1M  0 part 
|-vda4                       252:4    0  4.4G  0 part 
| `-coreos-luks-root-nocrypt 253:0    0  4.4G  0 dm   /sysroot
`-vda5                       252:5    0 11.1G  0 part /var
[core@ibm-p8-kvm-03-guest-02 ~]$ findmnt -nvr /var -o SOURCE
/dev/vda5
[core@ibm-p8-kvm-03-guest-02 ~]$ realpath /dev/vda5
/dev/vda5
[core@ibm-p8-kvm-03-guest-02 ~]$ realpath /dev/disk/by-partlabel/var
/dev/vda5
[core@ibm-p8-kvm-03-guest-02 ~]$ findmnt -nvr /var -o FSTYPE
xfs
```

Comment 11 errata-xmlrpc 2020-11-04 03:10:21 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (ostree bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2020:4706


Note You need to log in before you can comment on or make changes to this bug.