8.3.4. LDAP를 사용하여 자동 마운터 맵 저장
LDAP에서 자동 마운터 맵을 검색하도록 구성된 모든 시스템에 LDAP 클라이언트 라이브러리가 설치되어 있어야 합니다. Red Hat Enterprise Linux에서
openldap 패키지는 Manila의 종속성으로 자동 설치되어야 합니다. LDAP 액세스를 구성하려면 /etc/openldap/ldap.conf 를 수정합니다. BASE, URI 및 스키마가 사이트에 적절히 설정되어 있는지 확인합니다.
LDAP에 자동 마운트 맵을 저장하기 위해 최근 설정된 스키마는
rfc2307bis 에 설명되어 있습니다. 이 스키마를 사용하려면 스키마 정의에서 주석 문자를 제거하여 autofs 구성(/etc/sysconfig/autofs)에서 설정해야 합니다. 예를 들어 다음과 같습니다.
예 8.4. autofs 설정
DEFAULT_MAP_OBJECT_CLASS="automountMap"
DEFAULT_ENTRY_OBJECT_CLASS="automount"
DEFAULT_MAP_ATTRIBUTE="automountMapName"
DEFAULT_ENTRY_ATTRIBUTE="automountKey"
DEFAULT_VALUE_ATTRIBUTE="automountInformation"
이러한 항목이 구성에 주석 처리되지 않은 유일한 스키마 항목인지 확인합니다. autoscaling Key 는
rfc2307bis 스키마의 cn 속성을 대체합니다. 다음은 LDAP 데이터 상호 변경 형식(LDIF) 구성의 예입니다.
예 8.5. LDF 설정
# extended LDIF
#
# LDAPv3
# base <> with scope subtree
# filter: (&(objectclass=automountMap)(automountMapName=auto.master))
# requesting: ALL
#
# auto.master, example.com
dn: automountMapName=auto.master,dc=example,dc=com
objectClass: top
objectClass: automountMap
automountMapName: auto.master
# extended LDIF
#
# LDAPv3
# base <automountMapName=auto.master,dc=example,dc=com> with scope subtree
# filter: (objectclass=automount)
# requesting: ALL
#
# /home, auto.master, example.com
dn: automountMapName=auto.master,dc=example,dc=com
objectClass: automount
cn: /home
automountKey: /home
automountInformation: auto.home
# extended LDIF
#
# LDAPv3
# base <> with scope subtree
# filter: (&(objectclass=automountMap)(automountMapName=auto.home))
# requesting: ALL
#
# auto.home, example.com
dn: automountMapName=auto.home,dc=example,dc=com
objectClass: automountMap
automountMapName: auto.home
# extended LDIF
#
# LDAPv3
# base <automountMapName=auto.home,dc=example,dc=com> with scope subtree
# filter: (objectclass=automount)
# requesting: ALL
#
# foo, auto.home, example.com
dn: automountKey=foo,automountMapName=auto.home,dc=example,dc=com
objectClass: automount
automountKey: foo
automountInformation: filer.example.com:/export/foo
# /, auto.home, example.com
dn: automountKey=/,automountMapName=auto.home,dc=example,dc=com
objectClass: automount
automountKey: /
automountInformation: filer.example.com:/export/&