Share a directory among multiple guests: Difference between revisions

From Linix VServer
Jump to navigationJump to search
imported>Mstrobert
(Initial page)
 
imported>Mstrobert
(added sections Assumptions, Command, See also)
Line 1: Line 1:
How to share a directory, such as /home, among multiple vserver guests.
How to share a directory, such as <code>/home</code>, among multiple vserver guests.
__TOC__
__TOC__
==Assumptions==
Suppose you have multiple vserver guests at locations such as <code>/var/lib/vservers/<guest>/</code>.
You would like to share a directory, such as <code>/srv/common/home</code>, 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==
* <code>$ man mount</code>

Revision as of 23:09, 14 September 2007

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