UNIONIMAP(8)UNIONIMAP(8)NAME
unionimap - a tool to manipulate Unionfs inode map files.
SYNOPSIS
unionimap [ -c ] FORWARDMAP
unionimap [ -a FORWARDMAP ] REVERSEMAP PATH
unionimap [ -d ] MAP
DESCRIPTION
unionimap By default, Unionfs generates a different set of inode num‐
bers each time you mount a file system. Additionally, the inode num‐
bers used for reading directories is different than those reported by
stat. This can confuse some utilities, and prevents NFS exports from
gracefully handing remounts or server restarts.
To alleviate these problems, Unionfs supports persistent inode maps.
unionimap is a utility that will generate the inode map files to be
loaded at mount time by Unionfs. An inode map consists of two main
components, a forward map which translates Unionfs inode numbers to
lower-level inode numbers and a lower-level file system, and several
reverse maps that are each associated with a single lower-level file
system. Note that the maps are associated with file systems, and not
branches. This means that if you have two branches on the same lower-
level file system, they use only a single reverse map.
OPTIONS-c create a forward map file. This option takes the filename of
the forward map to create as an argument. This file name can be
the absolute path to the file that you want to create or you can
create it in the local directory and then move it.
-a creates a reverse map file and adds it to a forward map file.
The -a flag itself takes the forward map to add the new reverse
map into. The remaining two arguments are the filename of the
reverse map and then a path to the file system you wish to cre‐
ate the map for. This will allow the map to have the appropri‐
ate fsid for the file system that you are adding to the map. If
the file system in question does not return a fsid (i.e., it
returns 0 for that value in stat), then one will be created
based on the device's major and minor numbers.
-d dump the contents of either a forward or reverse map. Specify
multiple times for more output. If -d is specified once, then
the header information for the map is printed. If -d is speci‐
fied twice, then the contents of the map are also printed. For
a forward map the contents are keys of a Unionfs inode number
and the value is a pair of file system numbers and lower inode
numbers. For the reverse map, the key is a lower-level inode
number, and the value is a Unionfs inode number.
USAGE EXAMPLE
unionimap -c /tmp/foo.forward
Create a map named foo.forward in /tmp/
unionimap -a /tmp/foo.forward /tmp/foo.reverse /tmp/
Create a map named foo.reverse in /tmp using /tmp as the direc‐
tory to build the fsid from and add it to the forward map
located in /tmp/foo.forward
unionimap -a /tmp/foo.forward /tmp/foo.reverse2 /n/other
Create a map named foo.reverse2 in /tmp using /n/other as the
directory to build the fsid from and add it to the forward map
located in /tmp/foo.forward
unionimap -d /tmp/foo.forward
Display the header contents of /tmp/foo.forward
unionimap -d -d /tmp/foo.forward
Display the header and body contents of /tmp/foo.forward
AUTHORS
Charles Wright <cwright@cs.sunysb.edu>, David Quigley <dquigley@ic.sun‐
ysb.edu>, Erez Zadok <ezk@cs.sunysb.edu>
SEE ALSOunionfs(4), http://unionfs.filesystems.org/
Linux September 2005 UNIONIMAP(8)