Writing to read-only devices with aufs2

Invisible Ink

© Raoul Fesquet, Fotolia

© Raoul Fesquet, Fotolia

Article from Issue 104/2009
Author(s):

Add temporary write capability to a read-only device with the stacked filesystem aufs.

Aufs [1] is a stacked filesystem similar to UnionFS [2]. One very common use for aufs is adding "temporary writing" capability to a filesystem residing on read-only media. I use aufs in Knoppix to join read-only data from the compressed Knoppix file (usually located on a CD or DVD) with a read-write filesystem on ramdisk or a USB flash drive. A stacked filesystem creates a stack of existing directories that are "transparent" to the user: Each access to a file is tried for each directory of the stack until it succeeds or the end of the stack is reached.

Even if you aren't building your own Live system, you still might have a practical use for aufs as a means of adding virtual read-write access to files stored on a read-only device. In this article, I describe how to add temporary write capability to a read-only device using aufs.

Gitting Aufs2

Aufs2 comes in two forms: a complete Git-based kernel with aufs2 included and a "standalone" version that contains only the changes that have to be patched into the kernel source.

[...]

Use Express-Checkout link below to read the full article (PDF).

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • AuFS

    AuFS offers a painless filesystem for a thin client, and FS-Cache provides a persistent cache.

  • Firejail

    Firejail enhances security by isolating programs and processes in separate jails and thus regulating access to the filesystem.

  • Build your own Distro Intro

    Tools such as Linux From Scratch, NimbleX Live CD Generator, Kiwi image system, and the Ubuntu Customization Kit can help you create your own custom Linux system.

  • Network Block Devices

    You don’t need Samba or NFS to support a diskless client. A remote block device can help improve performance and efficiency. We'll show your how.

  • Command Line: mount & fstab

    This month we look at tools for mounting and unmounting storage media.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News