Giter VIP home page Giter VIP logo

overlayfs-tools's People

Contributors

amir73il avatar bschaer avatar kmxz avatar mstormi avatar musicinmybrain avatar uvv-gh avatar zhangyi089 avatar

Stargazers

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

Watchers

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

overlayfs-tools's Issues

Action aborted due to fatal error.

When run command: overlay -v -l /media/root-ro -u /media/root-rw/overlay -f diff

I have got an error: "Action aborted due to fatal error." that points "File %s can not be read for content." (for example /etc/ssh/sshd_config file)

System Description:
debian buster
selinux enabled & permissive mode
relabelling service active

license?

Hi @kmxz. Would it be possible to add a license file into this repo? I plan to create an APK package for your software. Thanks.

Compile on debian buster fails

[22:24:56] root@devpi:/tmp/zr/overlayfs-tools# make
gcc -Wall -std=c99 -c main.c
In file included from main.c:16:
/usr/include/linux/stat.h:56:8: error: redefinition of ‘struct statx_timestamp’
struct statx_timestamp {
^~~~~~~~~~~~~~~
In file included from /usr/include/arm-linux-gnueabihf/sys/stat.h:446,
from main.c:14:
/usr/include/arm-linux-gnueabihf/bits/statx.h:25:8: note: originally defined here
struct statx_timestamp
^~~~~~~~~~~~~~~
In file included from main.c:16:
/usr/include/linux/stat.h:99:8: error: redefinition of ‘struct statx’
struct statx {
^~~~~
In file included from /usr/include/arm-linux-gnueabihf/sys/stat.h:446,
from main.c:14:
/usr/include/arm-linux-gnueabihf/bits/statx.h:36:8: note: originally defined here
struct statx
^~~~~
make: *** [makefile:11: main.o] Fehler 1

Replacing nftw

According to the standard,

The nftw() function need not be reentrant.

Also, using nftw, too many global variables need to be maintained.

Moreover, it seemed not efficient enough for the use here, as links are never followed.

Misleading error message on ENOENT

When a given directory does not exist, the tool currently says it was not specified

strace overlay diff --lowerdir=/sysroot
...
readlink("/sysroot", 0x7ffdfc3f36c0, 1023) = -1 ENOENT (No such file or directory)
write(2, "Lower directory not specified.\n", 31Lower directory not specified.
) = 31

Would be nice to print that the directory does not exist instead.

Also, adding a --version flag and tagging releases would be a good idea. This tool is packaged for fedora, but it is impossible to say at what code state.

Whiteout files and opaque directories should not be copied to the lower filesystem?

Maybe this is by design...
Say you have a lower filesystem, "/lower" containing a directory "/lower/d" and a file "lower/f".
Then you mount an overlay, "/overlay" using an empty upper filesystem, "/upper".
Then rm -rf /overlay/d /overlay/f.
Using overlay merge -l /lower -u /upper command, in the generated shell script you get

rm -rf '/lower/d'
mv -T '/upper/d' '/lower/d'
rm -rf '/lower/f'
mv -T '/upper/f' '/lower/f'

The whiteout file and opaque directory from /upper are moved in after deleting the existing file.
I guess its a simple find 1-liner to find these files and delete them from "/lower" if you don't want them but I wonder if overlayfs-tools should either not copy these files in the first place or provide an option not to copy them.

Looking for rebuild function / option

Hi,

I'm looking for a rebuild function that rebuild a combined dir ready to use with a high dir (with updated files and dirs) with low dir and a script.
typically i want to backup a low and high dir and i want to restore a ready to use combined dir with special char device file regenerated.

redirect_dir=on

kmxz using your merge tool with a single lower in https://github.com/StuartIanNaylor/zram-config.
Firstly many thanks as even though OverlayFS is now a mainline module there seems to be a total lack of any tools apart from yours.

I am terribly new to OverlayFS but when it comes to renaming folders and redirect_dir do you plan to add support?

Merge, upperdir deleted, not left empty.

Hi,
So, the script generated on a "merge" command ... basically performs a delete of "upperdir" which does not match what the behaviour stated in help file should be. There it states that the "upperdir" is left empty. When experimenting with merge when mounted ... this is problematic since the "upperdir" mountpoint goes missing and overlayfs looses track of everything at that point. Was wondering if this can be fixed to perform the behaviour indicated that it should be doing.
Heres a snippet from script generated:

rm -rf '/opt/zram/log.bind/daemon.log'
mv -T '/opt/zram/zram2/upper/daemon.log' '/opt/zram/log.bind/daemon.log'
rm -rf '/opt/zram/log.bind/messages'
mv -T '/opt/zram/zram2/upper/messages' '/opt/zram/log.bind/messages'
rm -rf '/opt/zram/log.bind/auth.log'
mv -T '/opt/zram/zram2/upper/auth.log' '/opt/zram/log.bind/auth.log'
rm -rf '/opt/zram/log.bind/syslog'
mv -T '/opt/zram/zram2/upper/syslog' '/opt/zram/log.bind/syslog'
rmdir '/opt/zram/zram2/upper'

Missing errno.h include in main.c

gcc -Wall -std=c99 -c main.c
main.c: In function ‘directory_create’:
main.c:99:35: error: ‘errno’ undeclared (first use in this function)
   99 |     if (mkdir(path, 0755) == 0 || errno == EEXIST) { return true; }
      |                                   ^~~~~
main.c:21:1: note: ‘errno’ is defined in header ‘<errno.h>’; did you forget to ‘#include <errno.h>’?
   20 | #include "sh.h"
  +++ |+#include <errno.h>
   21 | 
main.c:99:35: note: each undeclared identifier is reported only once for each function it appears in
   99 |     if (mkdir(path, 0755) == 0 || errno == EEXIST) { return true; }
      |                                   ^~~~~
main.c:99:44: error: ‘EEXIST’ undeclared (first use in this function)
   99 |     if (mkdir(path, 0755) == 0 || errno == EEXIST) { return true; }
      |                                            ^~~~~~
make: *** [makefile:11: main.o] Error 1

Trivial PR to follow.

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.