Share a directory among multiple guests

From Linix VServer
Revision as of 01:33, 15 September 2007 by imported>Daniel15 (Share a directory among multiple vserver guests moved to Share a directory among multiple guests: Having "vserver" in the page title is probably redundant.)
Jump to navigationJump to search

How to share a directory, such as /home, among multiple vserver guests.

Assumptions

Suppose you have multiple vserver guests at locations such as /var/lib/vservers/<guest>/. You would like to share a directory, such as /srv/common/home, among multiple guests. Each guest will be able to write to the directory.

Command

$ for guest in /var/lib/vservers/*; do mount --bind /srv/common/home ${guest}/home; done

See also

  • $ man mount