View previous topic :: View next topic |
Author |
Message |
musv Advocate
Joined: 01 Dec 2002 Posts: 3337 Location: de
|
Posted: Fri Jun 08, 2012 11:01 pm Post subject: unionfs 3.4 (replaced by overlayfs) |
|
|
Hi there,
I always downloaded the kernel patch from http://download.filesystems.org/unionfs/unionfs-2.x-latest/. But there isn't a patch available for kernel-3.4.x. And unionfs-2.5.11_for_3.3.0-rc3.diff.gz gave me some problems when I tried to apply the patch.
Does anyone knows if there will be a patch available in the next days?
Last edited by musv on Sun Jun 24, 2012 7:36 pm; edited 1 time in total |
|
Back to top |
|
|
Gusar Advocate
Joined: 09 Apr 2005 Posts: 2665 Location: Slovenia
|
Posted: Fri Jun 08, 2012 11:12 pm Post subject: |
|
|
People are still using unionfs? AUFS3 is where it's at now. Or overlayfs. |
|
Back to top |
|
|
musv Advocate
Joined: 01 Dec 2002 Posts: 3337 Location: de
|
Posted: Tue Jun 12, 2012 5:22 pm Post subject: |
|
|
Ok, I'll try aufs.
unionfs was the easiest way for me. I had just to patch the kernel and everything needed worked.
If I understood well, then both aufs and overlayfs are using fuse. That's not really an improvement.
Thanks so far. |
|
Back to top |
|
|
Gusar Advocate
Joined: 09 Apr 2005 Posts: 2665 Location: Slovenia
|
Posted: Tue Jun 12, 2012 6:20 pm Post subject: |
|
|
musv wrote: | If I understood well, then both aufs and overlayfs are using fuse. |
Neither of them are using fuse, where did you read that? They're both kernel-level filesystems.
AUFS is a huge beast, comparable in features to unionfs, but better implemented. Overlayfs is much, much simpler - it's a tenth of the size of AUFS. I use overlayfs for my own little LiveUSB, tmpfs over squashfs, it's perfect for that. |
|
Back to top |
|
|
musv Advocate
Joined: 01 Dec 2002 Posts: 3337 Location: de
|
|
Back to top |
|
|
Gusar Advocate
Joined: 09 Apr 2005 Posts: 2665 Location: Slovenia
|
Posted: Sat Jun 16, 2012 2:50 pm Post subject: |
|
|
What I gave is the link to the source. Just grab the top 13 commitdiffs (those above Linux 3.4-rc7) and apply them to the kernel source. Documentation on how to use it is part of those commitdiffs. In essence: Code: | mount -t overlayfs -o lowerdir=/lowerdir,upperdir=/upperdir overlayfs /some_dir |
You mount the squashfs image to /lowerdir and a tmpfs (or other writable fs) on /upperdir. You can of course use different directory names, that's just an example.
That olfs you found, different thing not related to overlayfs. |
|
Back to top |
|
|
musv Advocate
Joined: 01 Dec 2002 Posts: 3337 Location: de
|
Posted: Sun Jun 24, 2012 7:34 pm Post subject: |
|
|
OK, I tried it. I took the snapshot, copied the overlay directory to my kernel source, edited Kconfig and got the following error:
Code: | make[1]: Nothing to be done for `all'.
make[1]: Nothing to be done for `relocs'.
CHK include/linux/version.h
CHK include/generated/utsrelease.h
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
CHK kernel/config_data.h
CC [M] fs/overlayfs/super.o
fs/overlayfs/super.c: In function ‘ovl_fill_super’:
fs/overlayfs/super.c:554:4: error: ‘struct super_block’ has no member named ‘s_stack_depth’
fs/overlayfs/super.c:554:22: error: ‘struct super_block’ has no member named ‘s_stack_depth’
fs/overlayfs/super.c:554:22: error: ‘struct super_block’ has no member named ‘s_stack_depth’
fs/overlayfs/super.c:554:22: error: ‘struct super_block’ has no member named ‘s_stack_depth’
fs/overlayfs/super.c:554:22: error: ‘struct super_block’ has no member named ‘s_stack_depth’
fs/overlayfs/super.c:558:8: error: ‘struct super_block’ has no member named ‘s_stack_depth’
fs/overlayfs/super.c:558:26: error: ‘FILESYSTEM_MAX_STACK_DEPTH’ undeclared (first use in this function)
fs/overlayfs/super.c:558:26: note: each undeclared identifier is reported only once for each function it appears in
fs/overlayfs/super.c:564:2: error: implicit declaration of function ‘clone_private_mount’ [-Werror=implicit-function-declaration]
fs/overlayfs/super.c:564:17: warning: assignment makes pointer from integer without a cast [enabled by default]
fs/overlayfs/super.c:571:17: warning: assignment makes pointer from integer without a cast [enabled by default]
cc1: some warnings being treated as errors
make[2]: *** [fs/overlayfs/super.o] Error 1
make[1]: *** [fs/overlayfs] Error 2
make: *** [fs] Error 2 |
Kernel Source: gentoo-sources-3.4.0
Snapshot V13 from 14-05-2012 |
|
Back to top |
|
|
Gusar Advocate
Joined: 09 Apr 2005 Posts: 2665 Location: Slovenia
|
Posted: Sun Jun 24, 2012 8:11 pm Post subject: |
|
|
musv wrote: | OK, I tried it. I took the snapshot, copied the overlay directory to my kernel source, edited Kconfig |
That's not what I said. I said apply the top 13 commitdiffs. There's more in them than just the overlayfs dir. |
|
Back to top |
|
|
musv Advocate
Joined: 01 Dec 2002 Posts: 3337 Location: de
|
Posted: Mon Jun 25, 2012 9:54 pm Post subject: |
|
|
Ok, I got it working so far. Thanks for you patience. One problem is left.
Code: |
mount -rt squashfs /var/portage/portage.sqfs /mnt/portage-ro
mount -t overlayfs -o nodev,noexec,upperdir=/dev/shm/.portage-rw,lowerdir=/mnt/portage-ro overlayfs /usr/portage |
/usr/portage is the merged view on which the operations should bei executed.
/mnt/portage-ro is the mount point of the readonly portage image
/dev/shm/.portage-rw is a writeable directory (chown portage:portage, chmod 750)
When I try to delete something I'll stumble into some trouble:
Code: | cd /usr/portage
rm -rf x11-wm
rm: cannot remove 'x11-wm/wm2/wm2-4.ebuild': Operation not supported
rm: cannot remove 'x11-wm/wmii/ChangeLog': Operation not supported
rm: cannot remove 'x11-wm/wmii/Manifest': Operation not supported
rm: cannot remove 'x11-wm/wmii/files/wmii.desktop': Operation not supported
rm: cannot remove 'x11-wm/wmii/metadata.xml': Operation not supported
rm: cannot remove 'x11-wm/wmii/wmii-3.9.2-r2.ebuild': Operation not supported
rm: cannot remove 'x11-wm/wmii/wmii-3.9.2-r3.ebuild': Operation not supported
rm: cannot remove 'x11-wm/xmonad/ChangeLog': Operation not supported
rm: cannot remove 'x11-wm/xmonad/Manifest': Operation not supported
rm: cannot remove 'x11-wm/xmonad/files/xmonad-0.9.2-unbreak-haddock.patch': Operation not supported
rm: cannot remove 'x11-wm/xmonad/files/xmonad.desktop': Operation not supported
rm: cannot remove 'x11-wm/xmonad/metadata.xml': Operation not supported
rm: cannot remove 'x11-wm/xmonad/xmonad-0.10.ebuild': Operation not supported
rm: cannot remove 'x11-wm/xmonad/xmonad-0.9.2.ebuild': Operation not supported
rm: cannot remove 'x11-wm/xmonad/xmonad-0.9.ebuild': Operation not supported
rm: cannot remove 'x11-wm/xmonad-contrib/ChangeLog': Operation not supported
rm: cannot remove 'x11-wm/xmonad-contrib/Manifest': Operation not supported
... |
The deleted directory is still visible in /usr/portage. But it is also available in the upperdir:
Code: | la /dev/shm/.portage-rw
drwxr-x--- 3 portage portage 60 Jun 25 23:40 .
drwxrwxrwt 3 root root 60 Jun 25 23:33 ..
drwxr-xr-x 59 portage portage 1180 Jun 25 23:41 x11-wm |
and it includes the "deleted" subdirectories.
What did I do wrong? |
|
Back to top |
|
|
Gusar Advocate
Joined: 09 Apr 2005 Posts: 2665 Location: Slovenia
|
Posted: Mon Jun 25, 2012 10:25 pm Post subject: |
|
|
Hmm, this is just a guess - the writable upper fs needs XATTR support, so make sure you have that in your kernel. For example, on my LiveUSB thingy the upper fs is a tmpfs, so I need CONFIG_TMPFS_XATTR=y in the kernel. |
|
Back to top |
|
|
musv Advocate
Joined: 01 Dec 2002 Posts: 3337 Location: de
|
Posted: Tue Jun 26, 2012 6:14 pm Post subject: |
|
|
Thanks, that's it. It works now. |
|
Back to top |
|
|
nnsk30 n00b
Joined: 15 Mar 2013 Posts: 1
|
Posted: Fri Mar 15, 2013 8:05 am Post subject: Exporting Unionfs over NFS |
|
|
Hi all,
Why the new versions of unionfs is not supporting NFS.
Which are the versions which support NFS and the corresponding Linux kernel version?
Thanks |
|
Back to top |
|
|
|