RSS구독하기:SUBSCRIBE TO RSS FEED
즐겨찾기추가:ADD FAVORITE
글쓰기:POST
관리자:ADMINISTRATOR

출처 : 대전국제IT교육센터 정성재 강사

 

1. AutoFS란?
Autofs는 자동 마운트 데몬(amd)의 작동을 제어하는 프로그램이다 자동마운트 데몬은 자동으로 파일
시스템을 마운트하며 파일 시스템이 사용되지 않고 일정 시간이 흐르면 자동으로 언마운트 한다. 네
트워크 파일 시스템, CD-ROM, 플로피 등을 마운트하는데 사용된다.


2. autofs 설치하기
리눅스 설치시에 전체선택을 하거나 사용자설치(Custom)모드에서 autofs rpm패키지를 선택하면 auto
fs가 설치되어 있을 것이다. 아니면 rpm 패키지를 찾아 설치하도록 한다. 설치방법은 생략한다.
(참고) autofs의 설치 확인
      rpm -qi autofs

3. autofs 설정하기
(1) 개요: /etc 디렉토리에 auto.master 라는 파일과 auto.misc라 불리우는 파일이 있는데 이 두개의
          파일이 환경설정 파일이다. 주 설정파일은 /etc/auto.master이다.
(2) /etc/auto.master
   1) 설명: automounter의 주된 설정파일이다. 이 파일은 3개의 필드로 구성되어 있다. 첫번째 필드
           는 마운트 포인트를 나타내고, 두번째 필드는 마운트포인트를 위한 맵파일이다. 세번째
           필드는 추가적인 옵션을 지정하는 부분이다.
   2) 파일의 예
     [root@www root]# cat /etc/auto.master
     # $Id: auto.master,v 1.2 1997/10/06 21:52:03 hpa Exp $
     # Sample auto.master file
     # Format of this file:
     # mountpoint map options
     # For details of the format look at autofs(8).
     /misc /etc/auto.misc  --timeout=60
      => /misc 라는 디렉토리를 /etc/auto.misc 파일의 설정을 가지고 사용하겠다는 뜻이다.
(3) /etc/auto.misc
   1) 설명: 실제 자동으로 마운트할 내용을 적는 파일이다. 이 파일명 이외에 다른 파일명으로
           /etc/auto.master라는 파일에 기록하면 여러 파일도 사용가능하다. 이 파일도 3개의 필드
           로 구성되어 있다. 첫번째 필드는 Key로 마운트 위치를 나타낸다. 두번째 필드는 옵션이
           고, 세번째 필드는 파일시스템의 특정한 위치를 나타낸다.
   2) 파일의 예
     [root@www root]# cat /etc/auto.misc
     # $Id: auto.misc,v 1.2 1997/10/06 21:52:04 hpa Exp $
     # This is an automounter map and it has the following format
     # key [ -mount-options-separated-by-comma ] location
     # Details may be found in the autofs(5) manpage

     cd              -fstype=iso9660,ro,nosuid,nodev :/dev/cdrom

     # the following entries are samples to pique your imagination
     #linux          -ro,soft,intr           ftp.example.org:/pub/linux
     #boot           -fstype=ext2            :/dev/hda1
     #floppy         -fstype=auto            :/dev/fd0
     #floppy         -fstype=ext2            :/dev/fd0
     #e2floppy       -fstype=ext2            :/dev/fd0
     #jaz            -fstype=ext2            :/dev/sdc1
     #removable      -fstype=ext2            :/dev/hdd
      => 현재 설정은 cd 라는 키에 /dev/cdrom을 옵션설정대로 연결시키라는 설정이다.

3. autofs 사용하기
(1) 데몬가동하기
    /etc/rc.d/init.d/autofs start  하거나
    service autofs start
(2) 사용하기
   1) CD-ROM에 디스크를 삽입한다.
   2) ls /misc/cd 명령을 내리면 디스크의 내용을 확인할 수 있다.

(참고) NFS와 연계해서 사용하면 편리하다.

Trackback
Reply
우주곰:지구곰이 아닙니다.
지구곰이 아닙니다.
Categories (190)
Information (5)
About uzoogom (5)
My Advanced Linux (73)
Learning Linux (96)
OperatingSystem (5)
Databases (4)
OpenSource (1)
Tips! (1)
«   2024/04   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30