Manpages

NAME

Unionfs − a unification file system for Linux

SYNOPSIS

unionctl UNION ACTION [ OPTIONS ]

unionctl UNION --add [ --before BRANCH | --after BRANCH ] [ --mode (rw|ro|nfsro) ] DIRECTORY

unionctl UNION --remove BRANCH

unionctl UNION --mode BRANCH (rw|ro|nfsro)

unionctl UNION --list

DESCRIPTION

unionctl is used to control a unionfs file system. The first argument is a union, which is the mount point of unionfs, or any file within unionfs. The second argument is an action. Currently unionctl supports file actions: --add, --remove, --mode, --list and --query. Further arguments are action dependent.

When a branch is required as an argument, it can be specified in two ways. The easiest way is to specify the path to the branch. If the path is used multiple times in the union, the highest priority branch will be used. A branch can also be specified as an index starting from zero.

ACTIONS

--add

add a branch into a union. By default a read-write branch will be added as the first component of the union.

The order of branches can be modified with --before and --after. Each of these takes a single branch as an argument. If --before is specified the new branch will be added before the specified branch; and if --after is specified the new branch will be added after the specified branch.

Finally, --mode will set the permissions on the new branch. --mode requires one argument, which is "rw" for a read-write branch, "ro" for a read-only branch and "nfsro" for read-only access on NFS shares (see unionfs(4) for further information).

Note: The directory to add must be the last argument.

--remove

removes a branch from a union. Branches with open files can not be removed.

--query option.

To remove a branch, unionctl performs an ioctl that operates on a file descriptor. If the root directory is opened, then the branch will necessarily be busy.

--mode

sets the permissions of a branch. --mode requires two arguments, the first is the branch to operate on; and the second is what mode to set. The allowed modes are "rw" for read-write access, "ro" for read-only access and "nfsro" for read-only access on NFS shares (see unionfs(4) for further information).

--list

list branches within the union (and also their permissions).

--query

lists the branches where a given file exists. --query requires one argument : the name of the file to be examined. The output is a list of branches where the file exists and the permissions of the branches.

AUTHORS

Charles Wright <cwright [AT] cs.edu>, Mohammad Zubair <mzubair [AT] ic.edu>, Erez Zadok <ezk [AT] cs.edu>

SEE ALSO

unionfs(4), uniondbg(8), http://unionfs.filesystems.org/