Solaris下/home目录不可乱用

比如,如果将zone建立在/home下,则会出现如下的错误:

bash-3.00# zoneadm -z myzones install

Preparing to install zone <myzones>.

Checking <ufs> file system on device </dev/rdsk/c1t0d0s7> to be mounted at </ho>

ERROR: file system check </usr/lib/fs/ufs/fsck> of </dev/rdsk/c1t0d0s7> failed:d

ERROR: cannot setup zone <myzones> inherited and configured file systems

ERROR: cannot setup zone <myzones> file systems inherited and configured from te

ERROR: cannot create zone boot environment <myzones>

zoneadm: zone 'myzones': '/usr/lib/lu/lucreatezone' failed with exit code 74.

 

bash-3.00# zonecfg -z myzones info

zonepath: /home/zones

autoboot: true

pool:

inherit-pkg-dir:

        dir: /lib

inherit-pkg-dir:

        dir: /platform

inherit-pkg-dir:

        dir: /sbin

inherit-pkg-dir:

        dir: /usr

fs:

        dir: /mnt

        special: /dev/dsk/c1t0d0s7

        raw: /dev/rdsk/c1t0d0s7

        type: ufs

        options: []

net:

        address: 172.16.35.47

        physical: eri0

 

Notes:

1. One may not use /home for anything other than the AutoMounter facility, especially under Solaris.

2. Introducing the Fundamentals of AutoFS

AutoFS is a file system mechanism that provides automatic mounting using the NFS protocol. AutoFS is a client-side service. The AutoFS file system is initialized by the /lib/svc/ automount script, which runs automatically when a system is booted. This script runs the automount command, which reads the AutoFS configuration files and also starts the automount daemon automountd. The automountd daemon runs continuously, mounting and unmounting remote directories on an as-needed basis.

Whenever a user on a client computer running the automountd daemon tries to access a remote file or directory, the daemon mounts the remote file system to which that file or directory belongs. This remote file system remains mounted for as long as it is needed. If the remote file system is not accessed for a defined period of time, the automountd daemon automatically unmounts the file system.

The AutoFS service mounts and unmounts file systems as required without any user intervention. The user does not need to use the mount and umount commands and does not need to know the superuser password.

The AutoFS file system enables you to do the following:

Mount file systems on demand

Unmount file systems automatically

Centralize the administration of AutoFS mounts through the use of a name service, which can dramatically reduce administration overhead time

Create multiple mount resources for read/write or read-only file systems

The automount facility contains three components, as shown in the image:

The AutoFS file system

The automountd daemon

The automount command

An AutoFS file system’s mount points are defined in the automount maps on the client system. After the AutoFS mount points are set up, activity under the mount points can trigger file systems to be mounted under the mount points. If the automount maps are configured, the AutoFS kernel module monitors mount requests made on the client. If a mount request is made for an AutoFS resource not currently mounted, the AutoFS service calls the automountd daemon, which mounts the requested resource.

The /lib/svc/method/svc-autofs script starts the automountd daemon. The automountd daemon mounts file systems on demand and unmounts idle mount points.

Note: The automountd daemon is completely independent from the automount command. Because of this separation, you can add, delete, or change map information without having to stop and start the automountd daemon process.

The automount command, called at system startup time, reads the master map to create the initial set of AutoFS mounts. These AutoFS mounts are not automatically mounted at startup time, they are the points under which file systems are mounted on demand.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值