Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deletion of files in RO dirs #1358

Closed
JensKapitza opened this issue Sep 24, 2024 · 1 comment
Closed

Deletion of files in RO dirs #1358

JensKapitza opened this issue Sep 24, 2024 · 1 comment

Comments

@JensKapitza
Copy link

Is there a plan to support
sudo mount -t overlay overlay -o lowerdir=/mnt/lowerdir,upperdir=/mnt/upperdir,workdir=/mnt/workdir /mnt/merged

overlayfs behavior on delete.

the file 'tt' example is not deleted on lowerdir it ist masked in upperdir (this can be another mergerfs dir with DEL as flag (this makes it nice to avoid trash in datadir)

c--------- 2 root root 0, 0 Sep 24 14:06 tt

root@ThinkPad-P50:/mnt# stat upperdir/tt
Datei: upperdir/tt
Größe: 0 Blöcke: 0 EA Block: 4096 Zeichenorientierte Spezialdatei
Gerät: fc00h/64512d Inode: 41943050 Verknüpfungen: 2 Gerätetyp: 0,0
Zugriff: (0000/c---------) Uid: ( 0/ root) Gid: ( 0/ root)
Zugriff: 2024-09-24 14:06:49.231081134 +0200
Modifiziert: 2024-09-24 14:06:49.231081134 +0200
Geändert: 2024-09-24 14:06:49.231081134 +0200
Geburt: 2024-09-24 14:06:49.231081134 +0200

My Target,

I ve 12 Disks, some mdadm raid1 and some with ext4 and some ntfs drives. i'll overlay my OSes but avoid writes to the native OS files. (i will not see the Windows dir in my mergerfs overlay) if i mark the mount point (c:) as RO, an error occurs this is fine for me, overlayfs marks this item as dead file in upperdir.

if i reboot and remount this dir (i'll see the 'deletet files*' not again in my mount)

is there an option?

my current version has an overlayfs on the RO dirs and then an mergerfs on upperdirs, would be easyer to maintain if i can reduce one layer.

@trapexit
Copy link
Owner

No, as mentioned in the documentation mergerfs is not and not intended to be an overlay filesystem. There are already good solutions for that that are kernel based like overlayfs. I see no good reason to duplicate that work.

@trapexit trapexit closed this as completed Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants