Bug 4761 - replace unionfs with aufs in live image
Summary: replace unionfs with aufs in live image
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 1.4
Hardware: x86 Multiple
: Medium enhancement
Target Milestone: 1.5 M2
Assignee: Chen Qi
QA Contact:
URL:
Whiteboard:
Depends on: 1487
Blocks:
  Show dependency tree
 
Reported: 2013-06-21 10:38 UTC by Chen Qi
Modified: 2013-12-13 16:55 UTC (History)
10 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments
aufs-utils (9.59 KB, text/plain)
2013-06-26 02:28 UTC, Bruce Ashfield
no flags Details
aufs-util patch for cross compilation (3.09 KB, patch)
2013-06-26 05:48 UTC, Chen Qi
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chen Qi 2013-06-21 10:38:39 UTC
The unionfs has been disabled for more than a year in OE/Yocto, but the code is still there under recipes-core/initrdscripts.

Now that we're not using unionfs any more, I think it's reasonable to clean up the related code.

As a replacement, what about using aufs?
Comment 1 Paul Eggleton 2013-06-24 15:17:35 UTC
I looked at this late in the 1.4 cycle. I'm no expert on these matters but it seemed to me based on what I've read that aufs is in no better position as regards making it into the mainline kernel than unionfs, which would make me question why we would switch to it from unionfs. It looked like overlayfs might be coming closer to being merged but AFAICT discussion on that seems to have died out.
Comment 2 Saul Wold 2013-06-24 23:03:44 UTC
Add Bruce, since I think he had some input in the original discussion
Comment 3 Bruce Ashfield 2013-06-25 02:19:57 UTC
aufs is still a valid choice. I have a sample recipe for aufs-utils that
I can contribute. It has been updated in the past month, I have it in both
linux-yocto-3.8 and linux-yocto-dev.

overlayfs has been "knocking at the door" for years now, and is also a
valid option, but hasn't been updated since 3.4. unionfs is still dormant
and hasn't been updated for even longer, consider it completely dead.

So the choice is still pretty clear in the short term. Go with aufs, while
we wait for the overlayfs revival.
Comment 4 Bruce Ashfield 2013-06-25 13:01:49 UTC
if/when you need aufs-utils, send me an email and I'll track down my recipe.
Comment 5 Chen Qi 2013-06-26 02:13:59 UTC
(In reply to comment #4)
> if/when you need aufs-utils, send me an email and I'll track down my recipe.

Thanks. I added the following line to my local.conf and tested my patch with qemux86. 
KERNEL_FEATURES_append = " features/aufs/aufs-enable.scc"

Everything worked out fine so far. I'll do more testing before I sent out the patch.

Best Regards,
Chen Qi
Comment 6 Bruce Ashfield 2013-06-26 02:28:46 UTC
Created attachment 1290 [details]
aufs-utils
Comment 7 Bruce Ashfield 2013-06-26 02:29:18 UTC
in case you want it, I attached my aufs-utils recipe. It isn't perfect, but
did build and work for x86 at the time.
Comment 8 Chen Qi 2013-06-26 05:48:17 UTC
Created attachment 1292 [details]
aufs-util patch for cross compilation

Create attachment for the patch.
Comment 9 Chen Qi 2013-06-26 05:50:45 UTC
(In reply to comment #7)
> in case you want it, I attached my aufs-utils recipe. It isn't perfect, but
> did build and work for x86 at the time.

Thanks.
I just tried it out and made a patch to fix a cross compilation error.

The problem here is that, ver, c2sh and c2tmac are run on host, so they need to be compiled first.

I'm not familiar with aufs, so I'm not sure if I'm doing right.

Please take a look at the patch and let me know if I made some mistakes.

//Chen Qi
Comment 10 Bruce Ashfield 2013-06-26 15:54:08 UTC
On a quick scan, the native extensions look ok to me. I was only running on the
target when I tested, so I didn't run into the need.

I'm not 100% sure of the configure modification though, I thought you could do 
it via:

do_configure_append_class-native()
Comment 12 Paul Eggleton 2013-12-13 16:55:04 UTC
FYI, I've turned the attachments into a patch adding an aufs-util recipe to meta-filesystems, tweaked it a little bit and build-tested it, the results are here:

http://cgit.openembedded.org/meta-openembedded-contrib/log/?h=paule/aufs-util

I haven't tested it at runtime though.