Phoenix Special Mount
General Methodoloy
The host runs a daemon, which monitors specific directories, waiting for commands to appear (via inotify). The host daemon could do such things as restart a VZ, access various mount points etc.
Management.
- /syscmd/scripts holds master scripts.
- /syscmd/<vzid> holds hard-links to the enabled scripts for <vzid>
- <vz-priv>/.syscmd -- monitors by daemon for messages.
- <vz-priv>/syscmd -- RO bind-mount of /syscmd/<vzid>
Sample Run
- `echo "host:/usr/portage" >> /.syscmd/caston.110
- Effect: provided the host:/usr/portage is enabled from the host, there will be a bind-mount placed from /usr/portage /<vz-private>/usr/portage
Guest Scripts
- caston -- activate all available mounts / approve all mounts.
- caston mount all available/offered mounts
- caston 104:/var/tmp permit 104 to mount over my /var/tmp
- castoff -- umount all mounts.
- castoff umount all
- castoff /var/tmp remove mount on /var/tmp
- castoff 104:/var/tmp remove mount on /var/tmp
- castblock -- block any mounts from taking place.
- castblock block anything except what's already mounted
- castblock /var/tmp prevent ANYTHING from mounting /var/tmp
- showcast -- list all 'configured mounts'
- showcast reveal active mountpoints.
- showcast -a reveal ALL available/offered mount points.
- cast -- share a folder.
- cast <dir> <vz>
- ucast -- remove a shared folder.
- ucast <dir> <vz>
Host Scripts
Host Daemon
function
- Monitors active VZ.
- inotify watch on <vz-private-path>
- Monitors root (/) on VZs w/o /.syscmd
- Monitors /.syscmd on all VZ's where present.
config
- /etc/vzcmd/vzdaemon.conf
- /etc/vzcmd/casts.ini
[104] _accepted = None /var/tmp = 103:/var/tmp,105:/_external/var/tmp [103] _accepted = 104:/var/tmp _blocked = None _offered = 105:/etc/1337 [105] _blocked = All [published] 104 = /tmp/portage, /etc/skel,/home/magicaluser host = /usr/portage(ro),/tmp/portage(ro)
Last modified
by joshua on 02/03/09 21:48:48 (3 years ago)
