9vx tutorial: running a cpu server from kfs (RFC)
来源:互联网 发布:姑苏渔歌大闸蟹 知乎 编辑:程序博客网 时间:2024/04/30 17:53
原文: http://groups.google.com/group/comp.os.plan9/browse_thread/thread/2db7a483a46f9acd
【说明】
本文是yiyus发布在9fans上的一篇教程。文中用到的9vx是yiyus维护的分支:http://bytebucket.org/yiyus/vx32/overview。根据yiyus在9fans中的说明,他的9vx分支是从ron的分支上更改的。vx32/9vx的创始人Russ Cox最近在9fans中声明他本人已经放弃了对9vx的维护,准备将所有权限转交给ron minnich(八卦一下:Russ Cox现在是Google Go语言的核心成员之一,正与Rob Pike,Ken Tompson等原plan9的元老一起维护Go……)。
9vx tutorial: running a cpu server from kfs (RFC)
This tutorial is a work in progress (it will eventually be added to the 9vx documentation and probably to the Plan 9 wiki). Please let me know if you see anything I'm doing wrong (unfortunately I don't have too much experience with real Plan 9 systems of more than one machine). In particular, I don't know why I could not use mkfs instead of dircp. The line
gave me this error:
mkfs: /sys/lib/sysconfig/proto/allproto:1: can't move tmp file to /n/kfs/dist/replica/plan9.compressed.db: wstat -- unknown type/mode
Anyway, these instructions are working here. Please, let me know if they work for you too.
By the way, this tutorial is only the first one, but I'd like to have some more. For example, to run several 9vx instances in a private network using the tap device and to run 9vx from fossil backed up by p9p's venti. Contributions are welcomed ;-)
----------------------------------------------------------------------
This is a brief tutorial on how to run a 9vx cpu server from a kfs file system. You will need 9vx, a plan9.iso and some free disk space.
First, go to the destination directory and install 9vx:
(Commands run on the host are preceded by $, commands run from inside 9vx are preceded with %)
You can check that 9vx is working running the minimal system embedded in the executable. The rcvx script should take you to a vx32% rc prompt in the current directory. Once you have played a bit with a rootless 9vx type exit to go back to your host system.
rcvx is cool but you will want a full Plan 9 tree to have real fun.
Let's boot from the iso file:
You should be in rio now, have an acme and a rio window, stats, faces... This is the live system in the iso that you probably already know. The CWD=... and nvram=... arguments are interpreted as plan9.ini lines and passed as environment variables, we will use them later.
Open a new rio window:
Those files will be our nvram and kfs partitions (check the size of your kfs file, 320Mb is not too much, but will be enough). Nvram needs to be initialized:
We can populate the file system now:
The system is now installed. You should be able to open a new 9vx instance from your new root:
You can also boot a cpu server. We will use the canopenpath option, so that only the files which begin with `pwd`/plan9 can be opened from 9vx, the -ic flags tell 9vx to pass -c to /386/init:
When you see the vx32# prompt add a key so that you can cpu as glenda:
Now you can cpu to your new server. From another 9vx instance (for example, booted from the iso):
If it worked we are done.
Now you will probably want to adjust to your needs the 9vxc script to launch cpu servers (also, think about adding a /cfg/vx32/cpurc file).
You could be interested in the options localroot, canopenpath, cpulimit and memsize. Or maybe you want to setup a virtual ethernet device (have a look at the tap script and the 9vx man page).
Have fun! (and please, report bugs)
--
- yiyus || JGL . 4l77.com
- 9vx tutorial: running a cpu server from kfs (RFC)
- A server is already running.
- A. Design Tutorial: Learn from Math
- A. Design Tutorial: Learn from Math
- 472A - Design Tutorial: Learn from Math
- 472A - Design Tutorial: Learn from Math
- The Perl Tutorial: Running a Perl Program (2)
- Implements a Java FTP client from socket and RFC
- vx
- KFS
- #EPI#Find running median from a stream of integers
- iPhone SDK Tutorial: Reading data from a SQLite Database
- codeforces 472A. Design Tutorial: Learn from Math
- codeforces-#472A. Design Tutorial: Learn from Math
- A Deep Learning Tutorial: From Perceptrons to Deep Networks
- CF 472A Design Tutorial: Learn from Math
- A Deep Learning Tutorial: From Perceptrons to Deep Networks
- codeforces 472A Design Tutorial: Learn from Math
- 无奈无奈
- 初学jsp配置tomcat的时候老是报占用端口问题
- Android培训班(36)
- 浅谈元认知理论与学会学习
- android存储本地数据大全
- 9vx tutorial: running a cpu server from kfs (RFC)
- 外键
- Can't open framebuffer device /dev/fb0 driver cannot connect 以及触摸屏的调整
- VBA 获取数据库内容
- 关于MeeGo的一点点入门知识
- C#中的Equals() 和运算符 ==
- Oracle10gR2相关下载备忘
- Coolite Toolkit 学习笔记一
- [转]关于NoSQL的思考:为什么我们要优化存储的写性能