Share a directory among multiple guests
From Linux-VServer
Revision as of 00:24, 16 December 2008 by 82.23.123.51 (Talk)
How to share a directory, such as /home
, among multiple vserver guests.
Contents |
Comprehensive Work, I liked It, Thanks
Command
The following command will mount this directory for all guests:
$ for guest in /var/lib/vservers/*; do mount --bind /srv/common/home ${guest}/home; done
Note that you might have to (re)start your vserver AFTER the mount for the shared path to be visible under it.
fstab
Alternatively, you may add an entry similar to the below one in /etc/vservers/<guest>/fstab
:
/srv/common/home /home none bind 0 0
See also
-
$ man mount