knowledge/technology/bsd/gunion.md

901 B

obj rev
filesystem 2024-02-08

gunion

The gunion utility is used to track changes to a read-only disk on a writable disk on FreeBSD. Logically, a writable disk is placed over a read-only disk. Write requests are intercepted and stored on the writable disk. Read requests are first checked to see if they have been written on the top (writable disk) and if found are returned. If they have not been written on the top disk, then they are read from the lower disk.

Usage

Create a union disk:

gunion create [-v] [-o offset] [-s size] [-S secsize] [-Z gunionname] upperdev lowerdev

Destroy union disk:

gunion destroy [-fv] prov ...

Revert changes made:

gunion revert [-v] prov ...

Commit changes made to lower disk:

gunion commit [-frv] prov ...

See status:

gunion list
gunion status