Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
unionfs 3.4 (replaced by overlayfs)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
musv
Advocate
Advocate


Joined: 01 Dec 2002
Posts: 2643
Location: de

PostPosted: Fri Jun 08, 2012 11:01 pm    Post subject: unionfs 3.4 (replaced by overlayfs) Reply with quote

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
View user's profile Send private message
Gusar
Advocate
Advocate


Joined: 09 Apr 2005
Posts: 2642
Location: Slovenia

PostPosted: Fri Jun 08, 2012 11:12 pm    Post subject: Reply with quote

People are still using unionfs? AUFS3 is where it's at now. Or overlayfs.
Back to top
View user's profile Send private message
musv
Advocate
Advocate


Joined: 01 Dec 2002
Posts: 2643
Location: de

PostPosted: Tue Jun 12, 2012 5:22 pm    Post subject: Reply with quote

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
View user's profile Send private message
Gusar
Advocate
Advocate


Joined: 09 Apr 2005
Posts: 2642
Location: Slovenia

PostPosted: Tue Jun 12, 2012 6:20 pm    Post subject: Reply with quote

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
View user's profile Send private message
musv
Advocate
Advocate


Joined: 01 Dec 2002
Posts: 2643
Location: de

PostPosted: Sat Jun 16, 2012 2:37 pm    Post subject: Reply with quote

Gusar wrote:
Neither of them are using fuse, where did you read that? They're both kernel-level filesystems.

It seems quite hard to find useful information where to get overlayfs from and how to get it working. Seems to be integrated into the Ubuntu kernel. But for Gentoo I haven't found neither a patch nor a tutorial.

Google finds: http://sourceforge.net/projects/olfs/
Quote:
Description

An FUSE filesystem module that merges content of several directories in to a single directory transparently.


Any further investigations brought me to: http://git.kernel.org/?p=linux/kernel/git/mszeredi/vfs.git;a=shortlog;h=refs/heads/overlayfs.v12

Could you be so kind to provide some more information about overlayfs:
  • Where to get the kernel patch?
  • Where to find a small tutorial to use that thing?


Same as you I want to use Overlayfs for my squash-portage.

Update:
Ok, the sources are here:
http://git.kernel.org/?p=linux/kernel/git/mszeredi/vfs.git;a=tree;f=fs/overlayfs;h=963b9b77c7ddf221a09e5a42ab29073f9bc3fffb;hb=refs/heads/overlayfs.v12

Good question how to get that stuff now into the kernel. I've never done it.


Last edited by musv on Sat Jun 16, 2012 3:01 pm; edited 1 time in total
Back to top
View user's profile Send private message
Gusar
Advocate
Advocate


Joined: 09 Apr 2005
Posts: 2642
Location: Slovenia

PostPosted: Sat Jun 16, 2012 2:50 pm    Post subject: Reply with quote

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
View user's profile Send private message
musv
Advocate
Advocate


Joined: 01 Dec 2002
Posts: 2643
Location: de

PostPosted: Sun Jun 24, 2012 7:34 pm    Post subject: Reply with quote

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
View user's profile Send private message
Gusar
Advocate
Advocate


Joined: 09 Apr 2005
Posts: 2642
Location: Slovenia

PostPosted: Sun Jun 24, 2012 8:11 pm    Post subject: Reply with quote

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
View user's profile Send private message
musv
Advocate
Advocate


Joined: 01 Dec 2002
Posts: 2643
Location: de

PostPosted: Mon Jun 25, 2012 9:54 pm    Post subject: Reply with quote

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
View user's profile Send private message
Gusar
Advocate
Advocate


Joined: 09 Apr 2005
Posts: 2642
Location: Slovenia

PostPosted: Mon Jun 25, 2012 10:25 pm    Post subject: Reply with quote

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
View user's profile Send private message
musv
Advocate
Advocate


Joined: 01 Dec 2002
Posts: 2643
Location: de

PostPosted: Tue Jun 26, 2012 6:14 pm    Post subject: Reply with quote

Thanks, that's it. It works now. :)
Back to top
View user's profile Send private message
nnsk30
n00b
n00b


Joined: 15 Mar 2013
Posts: 1

PostPosted: Fri Mar 15, 2013 8:05 am    Post subject: Exporting Unionfs over NFS Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum