zat 发表于 2005-9-6 03:24

原帖由 xiaobailong 于 2005-9-2 17:53 发表
16。服务管理
虚拟区也可以和服务管理设施(Service Management Facility, smf(5))结合使用。每一个虚拟区有自己的储藏室(repository),并在虚拟区内运行自己的svc.configd(1M)和 svc.startd(1M)实例。每一个虚拟 ...

SMF好像是10新出的服务管理方式吧?
取代了以往基于inetd方式,据说有着比较强的功能,不知道有没有了解?

zat 发表于 2005-9-6 03:39

原帖由 xiaobailong 于 2005-9-2 15:18 发表
13。虚拟区的文件系统
虚拟区的文件系统有三种方式存在,可以是只读方式从大区mount上去的,也可以是安装的时候从大区复制过去的,还可以是读写方式mount上去的。

虚拟区的 ...

1。只读方式从大区mount上去 :指得就是使用inherit-pkg-dir方式
2。安装的时候从大区复制过去:指得就是类似于whole root zone的,非inherit-pkg-dir方式
3。读写方式mount上去:
                                           global# lofiadm -a ‘pwd‘/fsfile
                                           global# zonecfg -z my-zone
                                           zonecfg:my-zone> add device
                                           zonecfg:my-zone:device> set match=/dev/rlofi/1。。。。

这是我的理解,不知道有没有错?

xiaobailong 发表于 2005-9-6 16:29

原帖由 zat 于 2005-9-6 04:24 发表


SMF好像是10新出的服务管理方式吧?
取代了以往基于inetd方式,据说有着比较强的功能,不知道有没有了解?


SMF是10新出的服务管理方式,不知道SMF(Service Management Facility)的官方的翻译是什么?我把它翻译成"服务管理设施",不知道是不是准确,或者翻译成"服务管理工具"更恰当一点?总不能翻译成"服务管理服务"吧?汗。。。


我对SMF了解不多,不过我的理解是,它并没有取代inetd,而是说inetd成了SMF的一部分吧?当然从另一个角度来说,也可以讲取代了它的位置。inetd的使用方法改变了。我去man了一下inetd, 下面是它的man page的开头部分:


DESCRIPTION
   inetd is the delegated restarter for internetservicesfor
   theServiceManagement Facility (SMF). Its basic responsi-
   bilities are to manage service states in response toadmin-
   istrativerequests,system failures, and service failures;
   and, when appropriate, to listen fornetworkrequestsfor
   services.

   Services are no longer managed by editing theinetdconfi-
   gurationfile, inetd.conf(4). Instead, you use inetconv(1M)
   to convert the configuration file contentintoSMFformat
   services,thenmanage these services using inetadm(1M) and
   svcadm(1M). Once a service has been convertedbyinetconv,
   any changes to the legacy data in the inetd config file will
   not become effective. However, inetd does alert the adminis-
   trator when it notices change in the configuration file. See
   the start description under the "inetd Methods" sectionfor
   further information.

   Also note that the current inetd cannot be run fromoutside
   theSMF. This means it cannot be run from the command line,
   as was supported by the previous inetd. If you attempt to do
   this,amessageissenttostderrdisplaying mappings
   between the options supported by the previous inetdtothe
   SMF version of inetd.

大概的意思是说,现在inetd成了SMF的一部分,它不再能够脱离SMF独自运行。各种服务不再用编辑inetd.conf文件的方式来管理,而是用inetconv把配置文件的内容转换成SMF格式的服务,然后由inetadm和svcadm来管理他们。

xiaobailong 发表于 2005-9-6 17:21

原帖由 zat 于 2005-9-6 04:39 发表

1。只读方式从大区mount上去 :指得就是使用inherit-pkg-dir方式

这个很对。

2。安装的时候从大区复制过去:指得就是类似于whole root zone的,非inherit-pkg-dir方式

这个也是对的,不过还不全面。sparse root zone中有四个目录是inherit-pkg-dir方式从大区只读mount上去的,另外还有一些目录是从大区复制过去的,例如/etc和/opt。 whole root zone的所有上述六个目录都是从大区复制过去的。



3。读写方式mount上去:
                                           global# lofiadm -a ‘pwd‘/fsfile
                                           global# zonecfg -z my-zone
                                           zonecfg:my-zone> add device
                                           zonecfg:my-zone:device> set match=/dev/rlofi/1。。。。

这是我的理解,不知道有没有错?


对的。你说的这个例子是动态mount block device上去,另外还有其它好几中mount的方法。我前面帖子里也提到过一种, 是特别mount文件系统到/usr目录下的,因为缺省方式下虚拟区内/usr的所有文件和子目录都是是只读方式的。

你说的在这里:http://docs.sun.com/app/docs/doc/817-1592/6mhahuosu?a=view

这里第7步就是我说的那种:
http://docs.sun.com/app/docs/doc/817-1592/6mhahuooo?q=add+fs&a=view

xiaobailong 发表于 2005-9-6 17:24

而所有zone里面的根目录,本身就是可读可写的,所以最简单的情况下,如果想安装程序到某个子目录,mkdir就可以建立所需的子目录了。
页: 1 2 3 [4]
查看完整版本: 再说 Solaris Containers