Merged VFS#
A user can have more than one VFS. The server lays them over each other, and the user sees one tree. This is used for two things: to add items to a folder that is really somewhere else, and to keep one folder in two places at once.
A second VFS#
In the VFS editor, Add new + beside the VFS tab makes another VFS for the user and asks for its name: "Extra VFS name". Each VFS has a tab and is edited like the first.
The extra ones are stored apart from the user's own, in a connection group of their own named extra_vfs in the server's users folder. They belong to a backup of the users.
Laying items into a folder#
The user has an item home, a real folder. You want two more things to show up inside it that are stored elsewhere:
- Make a second VFS.
- In it, make a virtual folder with the same name,
home, with New Virtual Directory. - Open it and put the other items in.
When the user lists home, they see what is in the real folder and the added items together.
One folder in two places#
In the second VFS, make an item with the same name as an item of the first, pointing at another location: a folder on another disk, or on another server.
The two are then one folder for the user, kept in both places:
| The user | The server |
|---|---|
| lists the folder | lists both locations and shows them as one |
| uploads a file | writes it to both locations at the same time |
| deletes, renames, makes a folder | does it in both |
| downloads | reads from the first, and from the second if the first cannot give the file |
If a location cannot be written to, the upload fails: the user gets an error, and no location is left with a file the other does not have.
When one location is away#
With the server setting multi_journal = true in prefs.XML, the server does not fail. It writes down what it could not do in the location that is away, and plays it back when that location answers again. The first location must always work. multi_journal_timeout, 30000 milliseconds on a new server, is how long the other location is waited for.
Note
This is a simple mirror through the server: only what users do through CrushMFT reaches both places. Files that are changed directly on one location are not carried over. To keep two servers the same, see Replication.
Things to know#
- Permissions are those of the first VFS that has any for the path: see Permissions.
- Every write is as slow as the slower location.
- A linked VFS and inherited items are merged in the same way: same names become one folder.