Code Monkey home page Code Monkey logo

overlayroot's Introduction

Dracut module to permit root fs overlay

Mount virtual root fs with rw-fs pointing to one filesystem on top or ro-fs from another filesystem.

Usages examples:

  • EC2 ephemeral storage as RW on top of EBS volumus as a RO. (probably same performance from instances storage).
  • Get instance storage IOPS performance on EBS root volumes.
  • If the root EBS volume fails, should improve the graceful degradation.
  • Protect root filesystem from modifications.
  • The root device volume for an I3 instance must be an Amazon EBS volume. So this allow you to use all nvme drivers performance on the root file system. Allowing you to use ephemeral volumes as I3 root filesystem.

Latest version:

Known problems

  • Only support one filesystem per system (Only rootfs)

Using

  • Spin up an Amazon Linux instance with root EBS volume and with ephemeral storage
  • Update to latest version
  • Install the overlayroot package
  • Recreate initramfs
  • Reboot
yum install kernel-4.9.20-10.30.amzn1.x86_64 -y 
rpm -ivh https://s3.amazonaws.com/gfleury/dracut-modules-overlayroot-0.1-beta.amzn1.noarch.rpm
echo "overlayrootdevice=/dev/xvdb" >> /etc/overlayroot.conf
dracut -f /boot/initramfs-4.9.20-10.30.amzn1.x86_64.img 4.9.20-10.30.amzn1.x86_64
reboot

** this example the ephemeral device is /dev/xvdb

[1] https://www.kernel.org/doc/Documentation/filesystems/overlayfs.txt

overlayroot's People

Contributors

gfleury avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

overlayroot's Issues

centos 8

Hello,

We once applied this overlay-rootfs solution with centos 7 and it worked perfectly :)
But for some reasons, there was a decision to start the project with centos 8 instead of centos 7....

Trying to apply this project/solution with a fresh install of centos 8, results in a a cursor scrolling in left-up screen, and nothing else happens.

I am still trying to figure out why... if I have a solution by myself I will post it.

Thanks for any idea,
Ran

Issues with centOS

Hi,

I tried to install it on centOS 7.
I made:

make 
make install

(didn't make the rpm)

and than do the following:

dracut -f

in /etc/overlayroot.conf I see my rootfs partition:

overlayrootdevice=/dev/mmcblk1p2

I see that new initramfs was created for my kernel, but on testing it, I see that files are non-volatile (as if no overlay at all).

This is what I tried:

  1. I rechecked that kernel (4.14.87) support overlay (overlay_fs=y).
  2. I then tried to figure out if initramfs shows any error or printing , but I am not sure how to do that , is there a way to see if initramfs runs ?

I see that even if I delete the line from grub with initrd16 /initramfs-4.14.87-rt49.img linux boot correctly (which is quite surprising...) !

Thanks for the help!

not working with virtio disks under qemu

I have a VM with two virtio disks vda and vdb
The VM has historically mounted root from vda

I have installed the RPM
edited /etc/overlayroot.conf setting overlayrootdevice=/dev/vdb
dracut -f for each of the kernel versions installed
rebooted, and I never get login prompt on console.

Any assistance would be greatly appreciated

overlayrootdevice point to LVM?

Hello,

I'm trying to use your package on a minimal centos7 install

after installing package, edited /etc/overlayroot.conf
rebuild my initramfs

I see this in boot.log
Starting dracut pre-pivot and cleanup hook...
[ 4.536607] dracut-pre-pivot[463]: mount: special device /dev/dm-2 does not exist
[ 4.538347] dracut-pre-pivot[463]: /dev/dm-2: No such file or directory
[ 4.538603] dracut-pre-pivot[463]: Usage: mkfs.xfs

centos_dev1-overlay -> ../dm-2

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.