coreos / coreos/ignition

Support creating and mounting Btrfs subvolumes

Open
#890 26 comments 15 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

jira kind/enhancement
Dominant language
Go
Stars
974
Forks
296
Avg merge
6d 14h
Merged PRs (30d)
9

Description

Feature Request

Btrfs is a supported file system for Ignition, but currently lacks support for several extended features. One of those features is subvolume support, which is used extensively on *SUSE distributions.

Desired Feature

In a first step Ignition should at least support mounting multiple existing subvolumes from the same device to be able to drop files on there during the files stage. This is currently failing because Ignition does not support using the same device name more than once.
Mounting a single subvolume per device is possible since #872 by using appropriate mount options.

In a second step it would be good if Ignition would also support creating additional subvolumes.

Other Information

This is related to and doing the opposite of #815, where multiple disks contain one Btrfs file system.

Example

Subvolume layout from an openSUSE installation:

ID 256 gen 78440 top level 5 path @
ID 258 gen 157397 top level 256 path @/var
ID 259 gen 157350 top level 256 path @/usr/local
ID 260 gen 157389 top level 256 path @/tmp
ID 261 gen 144350 top level 256 path @/srv
ID 262 gen 157352 top level 256 path @/root
ID 263 gen 156614 top level 256 path @/opt
ID 264 gen 157397 top level 256 path @/home
ID 265 gen 124813 top level 256 path @/boot/grub2/x86_64-efi
ID 266 gen 152932 top level 256 path @/boot/grub2/i386-pc
ID 267 gen 157367 top level 256 path @/.snapshots
ID 1038 gen 2151 top level 258 path @/var/lib/machines
ID 1448 gen 154571 top level 267 path @/.snapshots/283/snapshot

Currently it is not possible to mount more than one of these subvolumes besides the root file system.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. Start by tracing the existing handling of repeated device names and the mount options introduced by #872, then review the relationship to #815. Done means multiple existing Btrfs subvolumes can be mounted from one device; creating additional subvolumes is a later step described by the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, linux
Domain
operating-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.