tailieunhanh - Linux Server Hacks Volume Two phần 7

Điều này làm cho họ vui vẻ hơn và cũng làm sáng khối lượng công việc của tôi. Không phải là một sự kết hợp tồi tệ! Hack này giải thích làm thế nào để tạo ra một bản chụp của một khối lượng hiện có và gắn kết nó, và cung cấp một số ví dụ về ảnh chụp lưu giữ các tập tin ban đầu của bạn khi chúng được sửa đổi trong khối lượng mẹ. | 245 A good solution is one that allows you to mount NFS shares without using etc fstab. Ideally it could also mount shares dynamically as they are requested so that when they re not in use there aren t all of these unused directories hanging around and messing up your Is -l output. In a perfect world we could centralize the mount configuration file and allow it to be used by all machines that need the service so that when a user leaves we just delete the mount from one configuration file and go on our merry way. Happily you can do just this with the Linux autofs daemon. The autofs daemon lives in the kernel and reads its configuration from maps which can be stored in local files centralized NFS-mounted files or directory services such as NIS or LDAP. Of course there has to be a master configuration file to tell autofs where to find its mounting information. That file is almost always stored in etc . Let s have a look at a simple example configuration file .autofs file etc timeout 300 mnt file etc timeout 60 u yp homedirs timeout 300 The main purpose of this file is to let the daemon know where to create its mount points on the local system detailed in the first column of the file and then where to find the mounts that should live under each mount point detailed in the second column . The rest of each line consists of mount options. In this case the only option is a timeout in seconds. If the mount is idle for that many seconds it will be unmounted. In our example configuration starting the autofs service will create three mount points. u is one of them and that s where we re going to put our home directories. The data for that mount point comes from the homedirs map on our NIS server. Running ypcat homedirs shows us the following line hdserv vol home users The server that houses all of the home directories is called hdserv. When the automounter starts up it will read the entry in contact the NIS server ask for the .

TỪ KHÓA LIÊN QUAN