close

 

1. 安裝好 Zentyal 在設定網域前 裝 drbd 及 ocfs 請參考

http://echochio.pixnet.net/blog/post/44399143

2. 第一台加入網域或獨立網域

3. 第一台在 /usr/share/perl5/EBox/Util/Init.pm 的 內面加 mount /cluster

   ............

    EBox::info("Start modules finished");
        EBox::Sudo::root("mount -t ocfs2 /dev/drbd1 /cluster");
    EBox::info("mount cluster finished");

  ..............


4. 第一台防火牆設定 OCFS_DRBD  Service Service 為  7777 & 7789 PORT
   將依照對方的 Source IP(第二台的IP) 加入許可通過


5.  第一台重開 OS 後 .... 觀看 DRBD 是否正常 (drbd-overview) ...不正常搞到正常 ....

    root@linux-ad1:~# drbd-overview
   1:r0/0  Connected Primary/ DUnknown UpToDate/ DUnknown   C r----- /cluster ocfs2 50G 2.1G 48G 5%

6. 至第一台建立Smaba 連結...搬移
    root@linux-ad1:~# chmod 777 /cluster
    root@linux-ad1:~# cd /var/lib/samba/sysvol
    root@linux-ad1:~# tar cvf - . |(cd /cluster;tar xf -)
    root@linux-ad1:~# rm -rf /var/lib/samba/sysvol
    root@linux-ad1:~# ln -s /cluster /var/lib/samba/sysvol

   root@linux-ad1:~# ls -l /var/lib/samba/sysvol
   lrwxrwxrwx 1 root root 8 Nov 20 22:52 /var/lib/samba/sysvol -> /cluster
   root@linux-ad1:~# ls -l /var/lib/samba/sysvol/TW2.AD/
   total 0
   drwxrwx---+ 5 administrator adm     3896 Nov 19 05:10 DfsrPrivate
   drwxrwx---+ 5 administrator 3000010 3896 Nov 20 19:13 Policies
   drwxrwx---+ 2 administrator 3000010 3896 Nov 20 19:21 scripts
   root@linux-ad1:~#
 

7. 至 windows 查看 sysvol 是否正常

 

8.   第二台加入第一台網域

9.   第二台在 /usr/share/perl5/EBox/Util/Init.pm 的 內面加 mount /cluster

   ............

    EBox::info("Start modules finished");
        EBox::Sudo::root("mount -t ocfs2 /dev/drbd1 /cluster");
    EBox::info("mount cluster finished");

  ..............
 

10. 第二台防火牆設定 OCFS_DRBD  Service Service 為  7777 & 7789 PORT
   將依照對方的 Source IP(第一台的IP)  加入許可通過

11. 第二台重開 OS 後 .... 觀看 DRBD 是否正常 (drbd-overview) ...不正常搞到正常

root@linux-ad2:~# drbd-overview
  1:r0/0  Connected Primary/Primary UpToDate/UpToDate C r----- /cluster ocfs2 50G 2.1G 48G 5%
 

12.  至第一台建立Smaba 連結...
    root@linux-ad2:~# chmod 777 /cluster
    root@linux-ad2:~# cd /var/lib/samba
    root@linux-ad2:~# rm -rf /var/lib/samba/sysvol
    root@linux-ad2:~# ln -s /cluster /var/lib/samba/sysvol

   root@linux-ad2:~# ls -l /var/lib/samba/sysvol
   lrwxrwxrwx 1 root root 8 Nov 20 23:18 /var/lib/samba/sysvol -> /cluster
   root@linux-ad2:~# ls -l /var/lib/samba/sysvol/TW2.AD/
   total 0
   drwxrwx---+ 5 administrator adm     3896 Nov 19 05:10 DfsrPrivate
   drwxrwx---+ 5 administrator 3000010 3896 Nov 20 19:13 Policies
   drwxrwx---+ 2 administrator 3000010 3896 Nov 20 19:21 scripts
   root@linux-ad2:~#

13. 至 windows 查看 sysvol 是否正常

   

 

14. 至 windows 複寫測試

  

15. LDAP 檢查 

 

16. DNS 檢查

17. 帳號檢查 新增user ... chio 看看有沒有複寫到兩台 ....看 zentyal.log 知道是在第二台新增 ....看 samba.log ...知道有寫到第一台

root@linux-ad2:~# tail -f /var/log/zentyal/zentyal.log | grep chio
2016/11/21 10:05:55 INFO> SetUidGidNumbers.pm:106 EBox::Samba::SetUidGidNumbers::checkUsers - Set user 'CN=chio,CN=Users,DC=TW2,DC=AD' uidNumber '2504'
2016/11/21 10:05:55 INFO> SetUidGidNumbers.pm:115 EBox::Samba::SetUidGidNumbers::checkUsers - Set user 'CN=chio,CN=Users,DC=TW2,DC=AD' gidNumber '2513'

root@linux-ad1:~# cat /var/log/samba/samba.log |grep chio
  TW2\Administrator (S-1-5-21-2402317723-1685012225-74364176-500) is changing password of chio@TW2.AD
  Discarding older DRS attribute update to sn on CN=chiochou\0ADEL:04cd8f9d-e8b6-4048-93e9-6dd0bc1f397c,CN=Deleted Objects,DC=TW2,DC=AD from 833b7e43-2ed2-4ed3-a258-19dc75dccebb
  Discarding older DRS attribute update to givenName on CN=chiochou\0ADEL:04cd8f9d-e8b6-4048-93e9-6dd0bc1f397c,CN=Deleted Objects,DC=TW2,DC=AD from 833b7e43-2ed2-4ed3-a258-19dc75dccebb
  Discarding older DRS attribute update to displayName on CN=chiochou\0ADEL:04cd8f9d-e8b6-4048-93e9-6dd0bc1f397c,CN=Deleted Objects,DC=TW2,DC=AD from 833b7e43-2ed2-4ed3-a258-19dc75dccebb
  Discarding older DRS attribute update to isDeleted on CN=chiochou\0ADEL:04cd8f9d-e8b6-4048-93e9-6dd0bc1f397c,CN=Deleted Objects,DC=TW2,DC=AD from 833b7e43-2ed2-4ed3-a258-19dc75dccebb
  Discarding older DRS attribute update to name on CN=chiochou\0ADEL:04cd8f9d-e8b6-4048-93e9-6dd0bc1f397c,CN=Deleted Objects,DC=TW2,DC=AD from 833b7e43-2ed2-4ed3-a258-19dc75dccebb
  Discarding older DRS attribute update to codePage on CN=chiochou\0ADEL:04cd8f9d-e8b6-4048-93e9-6dd0bc1f397c,CN=Deleted Objects,DC=TW2,DC=AD from 833b7e43-2ed2-4ed3-a258-19dc75dccebb
  Discarding older DRS attribute update to countryCode on CN=chiochou\0ADEL:04cd8f9d-e8b6-4048-93e9-6dd0bc1f397c,CN=Deleted Objects,DC=TW2,DC=AD from 833b7e43-2ed2-4ed3-a258-19dc75dccebb
  Discarding older DRS attribute update to unicodePwd on CN=chiochou\0ADEL:04cd8f9d-e8b6-4048-93e9-6dd0bc1f397c,CN=Deleted Objects,DC=TW2,DC=AD from 833b7e43-2ed2-4ed3-a258-19dc75dccebb
  Discarding older DRS attribute update to ntPwdHistory on CN=chiochou\0ADEL:04cd8f9d-e8b6-4048-93e9-6dd0bc1f397c,CN=Deleted Objects,DC=TW2,DC=AD from 833b7e43-2ed2-4ed3-a258-19dc75dccebb
  Discarding older DRS attribute update to pwdLastSet on CN=chiochou\0ADEL:04cd8f9d-e8b6-4048-93e9-6dd0bc1f397c,CN=Deleted Objects,DC=TW2,DC=AD from 833b7e43-2ed2-4ed3-a258-19dc75dccebb
  Discarding older DRS attribute update to primaryGroupID on CN=chiochou\0ADEL:04cd8f9d-e8b6-4048-93e9-6dd0bc1f397c,CN=Deleted Objects,DC=TW2,DC=AD from 833b7e43-2ed2-4ed3-a258-19dc75dccebb
  Discarding older DRS attribute update to supplementalCredentials on CN=chiochou\0ADEL:04cd8f9d-e8b6-4048-93e9-6dd0bc1f397c,CN=Deleted Objects,DC=TW2,DC=AD from 833b7e43-2ed2-4ed3-a258-19dc75dccebb
  Discarding older DRS attribute update to accountExpires on CN=chiochou\0ADEL:04cd8f9d-e8b6-4048-93e9-6dd0bc1f397c,CN=Deleted Objects,DC=TW2,DC=AD from 833b7e43-2ed2-4ed3-a258-19dc75dccebb
  Discarding older DRS attribute update to sAMAccountType on CN=chiochou\0ADEL:04cd8f9d-e8b6-4048-93e9-6dd0bc1f397c,CN=Deleted Objects,DC=TW2,DC=AD from 833b7e43-2ed2-4ed3-a258-19dc75dccebb
  Discarding older DRS attribute update to userPrincipalName on CN=chiochou\0ADEL:04cd8f9d-e8b6-4048-93e9-6dd0bc1f397c,CN=Deleted Objects,DC=TW2,DC=AD from 833b7e43-2ed2-4ed3-a258-19dc75dccebb
  Discarding older DRS attribute update to lastKnownParent on CN=chiochou\0ADEL:04cd8f9d-e8b6-4048-93e9-6dd0bc1f397c,CN=Deleted Objects,DC=TW2,DC=AD from 833b7e43-2ed2-4ed3-a258-19dc75dccebb
  Discarding older DRS attribute update to objectCategory on CN=chiochou\0ADEL:04cd8f9d-e8b6-4048-93e9-6dd0bc1f397c,CN=Deleted Objects,DC=TW2,DC=AD from 833b7e43-2ed2-4ed3-a258-19dc75dccebb
  Discarding older DRS attribute update to lastLogonTimestamp on CN=chiochou\0ADEL:04cd8f9d-e8b6-4048-93e9-6dd0bc1f397c,CN=Deleted Objects,DC=TW2,DC=AD from 833b7e43-2ed2-4ed3-a258-19dc75dccebb
  Discarding older DRS attribute update to isRecycled on CN=chiochou\0ADEL:04cd8f9d-e8b6-4048-93e9-6dd0bc1f397c,CN=Deleted Objects,DC=TW2,DC=AD from 833b7e43-2ed2-4ed3-a258-19dc75dccebb
  Discarding older DRS attribute update to uidNumber on CN=chiochou\0ADEL:04cd8f9d-e8b6-4048-93e9-6dd0bc1f397c,CN=Deleted Objects,DC=TW2,DC=AD from 833b7e43-2ed2-4ed3-a258-19dc75dccebb
  Discarding older DRS attribute update to gidNumber on CN=chiochou\0ADEL:04cd8f9d-e8b6-4048-93e9-6dd0bc1f397c,CN=Deleted Objects,DC=TW2,DC=AD from 833b7e43-2ed2-4ed3-a258-19dc75dccebb
  Discarding older DRS attribute update to cn on CN=chiochou\0ADEL:04cd8f9d-e8b6-4048-93e9-6dd0bc1f397c,CN=Deleted Objects,DC=TW2,DC=AD from 833b7e43-2ed2-4ed3-a258-19dc75dccebb
  Discarding older DRS attribute update to objectClass on CN=chio,CN=Users,DC=TW2,DC=AD from 833b7e43-2ed2-4ed3-a258-19dc75dccebb
  Discarding older DRS attribute update to sn on CN=chio,CN=Users,DC=TW2,DC=AD from 833b7e43-2ed2-4ed3-a258-19dc75dccebb
  Discarding older DRS attribute update to whenCreated on CN=chio,CN=Users,DC=TW2,DC=AD from 833b7e43-2ed2-4ed3-a258-19dc75dccebb
  Discarding older DRS attribute update to displayName on CN=chio,CN=Users,DC=TW2,DC=AD from 833b7e43-2ed2-4ed3-a258-19dc75dccebb
  Discarding older DRS attribute update to nTSecurityDescriptor on CN=chio,CN=Users,DC=TW2,DC=AD from 833b7e43-2ed2-4ed3-a258-19dc75dccebb
  Discarding older DRS attribute update to name on CN=chio,CN=Users,DC=TW2,DC=AD from 833b7e43-2ed2-4ed3-a258-19dc75dccebb
  Discarding older DRS attribute update to userAccountControl on CN=chio,CN=Users,DC=TW2,DC=AD from 833b7e43-2ed2-4ed3-a258-19dc75dccebb
  Discarding older DRS attribute update to codePage on CN=chio,CN=Users,DC=TW2,DC=AD from 833b7e43-2ed2-4ed3-a258-19dc75dccebb
  Discarding older DRS attribute update to countryCode on CN=chio,CN=Users,DC=TW2,DC=AD from 833b7e43-2ed2-4ed3-a258-19dc75dccebb
  Discarding older DRS attribute update to unicodePwd on CN=chio,CN=Users,DC=TW2,DC=AD from 833b7e43-2ed2-4ed3-a258-19dc75dccebb
  Discarding older DRS attribute update to ntPwdHistory on CN=chio,CN=Users,DC=TW2,DC=AD from 833b7e43-2ed2-4ed3-a258-19dc75dccebb
  Discarding older DRS attribute update to pwdLastSet on CN=chio,CN=Users,DC=TW2,DC=AD from 833b7e43-2ed2-4ed3-a258-19dc75dccebb
  Discarding older DRS attribute update to primaryGroupID on CN=chio,CN=Users,DC=TW2,DC=AD from 833b7e43-2ed2-4ed3-a258-19dc75dccebb
  Discarding older DRS attribute update to supplementalCredentials on CN=chio,CN=Users,DC=TW2,DC=AD from 833b7e43-2ed2-4ed3-a258-19dc75dccebb
  Discarding older DRS attribute update to objectSid on CN=chio,CN=Users,DC=TW2,DC=AD from 833b7e43-2ed2-4ed3-a258-19dc75dccebb
  Discarding older DRS attribute update to accountExpires on CN=chio,CN=Users,DC=TW2,DC=AD from 833b7e43-2ed2-4ed3-a258-19dc75dccebb
  Discarding older DRS attribute update to sAMAccountName on CN=chio,CN=Users,DC=TW2,DC=AD from 833b7e43-2ed2-4ed3-a258-19dc75dccebb
  Discarding older DRS attribute update to sAMAccountType on CN=chio,CN=Users,DC=TW2,DC=AD from 833b7e43-2ed2-4ed3-a258-19dc75dccebb
  Discarding older DRS attribute update to userPrincipalName on CN=chio,CN=Users,DC=TW2,DC=AD from 833b7e43-2ed2-4ed3-a258-19dc75dccebb
  Discarding older DRS attribute update to objectCategory on CN=chio,CN=Users,DC=TW2,DC=AD from 833b7e43-2ed2-4ed3-a258-19dc75dccebb
  Discarding older DRS attribute update to cn on CN=chio,CN=Users,DC=TW2,DC=AD from 833b7e43-2ed2-4ed3-a258-19dc75dccebb
 

18. 新增加 DNS  ... 第一台增加反向 ...看看第二台有沒有馬上有資料

 

19.  加個 GPO 看看 ....

 

 

 

 

 

 

 

 

 

 

arrow
arrow
    創作者介紹
    創作者 echochio 的頭像
    echochio

    echochio

    echochio 發表在 痞客邦 留言(0) 人氣()