GithubHelp home page GithubHelp logo

shiftfs-dkms's Introduction

shiftfs-dkms

Content


About

This repo provides scripts to install the (Linux) kernel module shiftfs via dkms.

About shiftfs

shiftfs is a kernel filesystem for the Linux kernel.
It provides easier uid/gid-shifting for containers and can be used for example with LXD (see also: Usecases).

shiftfs was made by:
See Credits

Important News

The official successor of shiftfs is available, see details below.

The original shiftfs (the version used in this repo) will still be available for:

  • Newer kernel versions until approximately 5.16 (maybe longer), the following are available now: 5.16, 5.15, 5.14 and 5.13 (Source).
  • Longterm kernel versions: 5.10 and 5.4, with support until approximately April 2022 (Source).

See Overview of Branches/Versions below for more information on each available version in this repo.

Details about the successor for shiftfs

The new approach called "idmapped mounts" is natively included in recent Linux kernels (since kernel version 5.12) - so no need for dkms-modules.
Support for the new approach is implemented since LXD version 4.16, and the transition is seamless, so LXD will automatically switch to the new approach, if available and all commands/options stay the same.
Note: For now there are some limitations though, as only ext4, xfs, vfat and btrfs (since kernel version 5.15) are supported as underlying filesystems for containers and volumes. ZFS and cephfs are planned to be supported in future kernels or seperately.
So if you use unsupported filesystems, I recommend to use the original shiftfs for now, until support for them is included in the new approach.

Also see:

Overview of Branches/Versions

There are different versions of shiftfs.c for different kernel versions, so I cover a few of them:

Branch/Version: For Kernel(version): Further Notes:
k5.16 5.16.x and 5.15.x -
k5.13 5.15.x, 5.14.x and 5.13.x -
k5.10 5.10.x (longterm version) and 5.8.x -
k5.4 5.4 (longterm version) -
Arch Linux Packages in AUR for packages linux (5.16) and linux-lts (5.15) -

What about other kernel versions?

Other kernel versions that are newer than 5.x might work, but there is no guarantee and I will not provide that. You have the best chances if you search inside the Ubuntu kernel repos and might find a version that matches your kernel version (e.g. hirsute kernel repo - master next for 5.11).

shiftfs will most likely not work on kernels older than version 5.x. Thus the only recent and active branch newer than 5 is 5.4. See also kernel.org.

Limitations

  • Regarding Overlayfs inside container:
    shiftfs can prevent the use of overlayfs inside a container.
    A usecase for this is running Docker with the overlayfs-storage driver inside a lxd container.
    A Kernelpatch that solves this is available, but it's not included in the mainline kernel (yet).
    To my knowledge only Ubuntu included it (see solved bug report).

    For workarounds and more information see:
    Issue 2 of this repo

  • More Issues may be found in the Ubuntu Kernel Bug Tracker.

Status

my Project/Repo: Upstream development:
active active

If you want to post a testreport, take a look at: Testreports Issue on Github.

Usecases

Reporting bugs

Report bugs here: https://github.com/toby63/shiftfs-dkms/issues

Credits

  • shiftfs was made by:

    (recent info is in the shiftfs.c file (See: footer -> tag: MODULE_AUTHOR))

  • Some files are based on the Debian package repo of bbswitch (https://salsa.debian.org/nvidia-team/bbswitch), including:

    • dkms.conf
    • Makefile
    • Makefile.dkms
  • Special thanks to:

    • Stéphane Graber @stgraber
    • Christian Brauner @brauner

    for the helpful advice.

Copyright/License

General Public License, Version 2

See: LICENSE

shiftfs-dkms's People

Contributors

toby63 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.