OES Linux での ndsrepair よく使うコマンドオプション

Novell eDirectory 8.6/8.7 UNIX NDSREPAIR GuideおよびWiki LDAPNdsrepairより抜粋、意訳です。


ローカルデータベースの修復

# ndsrepair -R

※一番よく使います。

標準修復(無人修復) unattended repair

# ndsrepair -U

※ unattended と言え、あまり不在状態では使いません。データベースをロックするため完全修復する際に使います。

[サンプル]
oes11x1:~ # ndsrepair -U

[1] Instance at /etc/opt/novell/eDirectory/conf/nds.conf: oes11x1.OU=system.OU=tokyo.O=ace.ACE-TREE
Repair utility for Novell eDirectory 8.8 - 8.8 SP6 v20604.10
DS Version 20605.00 Tree name: ACE-TREE
Server name: .oes11x1.system.tokyo.ace

Size of /var/opt/novell/eDirectory/log/ndsrepair.log = 40032 bytes.

Preparing Log File "/var/opt/novell/eDirectory/log/ndsrepair.log"
Please Wait...
Repairing Directory On Server oes11x1
Start: Friday, October 05, 2012 10:58:03 Local Time
** All disk amounts are approximations **
Disk space currently available: 7618 MB
->DSRepair may need to use: 32 MB
->Disk space remaining after operation: 7618 MB

Current transaction ID is 380537 (0x5ce79). Allowed limit of transaction is 4294959104 (0xffffe000)
Waiting for Directory Services to release the local database files
Please Wait...
DS Files Are Locked
Repairing Directory On Server
Action
Physical Check
Repairing Directory On Server
Action
Creating Temporary Files
Repairing Directory On Server
Action
Repair Trees - Scan Values
Repair Trees - Scanning Values (0)
Repair Trees - Scanning Values (12)
Repair Trees - Scanning Values (34)
Repair Trees - Scanning Values (187)
Repair Trees - Scanning Values (202)
Repair Trees - Scanning Values (225)
Repair Trees - Scanning Values (235)
Repair Trees - Scanning Values (735)
Repair Trees - Scanning Values (1235)
Repair Trees - Scanning Values (1660)
Repair Trees - Scanning Values (1813)
Repair Trees - Scanning Values (1834)
Repair Trees - Scanning Values (1861)
Repair Trees - Scanning Values (1906)
Repair Trees - Scanning Values (1908)
Repair Trees - Scanning Values (1911)
Repair Trees - Scanning Values (1914)
Repair Trees - Scanning Values (2414)
Repair Trees - Scanning Values (2506)
Repair Trees - Scanning Values (3006)
Repair Trees - Scanning Values (3122)
Repair Trees - Scanning Values (3128)
Repair Trees - Scanning Values (3129)
Repair Trees - Scanning Values (3130)
Action
Repair Trees - Sorting Values
Action
Repair Trees - Scan Entries
Repair Trees - Scanning Entries (0)
Repair Trees - Scanning Entries (999)
Action
Repair Trees - Sorting Entries
Action
Repair Trees - Check Values
Repair Trees - Check Entries
Total Objects in Database: 2799
Total Objects in Schema : 1370
Total External References: 1
Total Objects in Replicas: 1425
Repairing Directory On Server
Action
Schema Check
Repairing objects in a replica
Start: Friday, October 05, 2012 10:58:07 Local Time

Total objects in partition - T=ACE-TREE : 1425
Repairing objects - done(1000)
Repairing objects - done(1425)

Total Objects = 1425, UNKNOWN class objects = 0, Total Values = 20714
[Pseudo Server]

Total Objects = 1, UNKNOWN class objects = 0, Total Values = 62
Repairing Directory On Server
Action
Temporary DIB set replacing NDS working DIB set.
Unlocking local database files
Please Wait...
Checking stream syntax files
Repair process completed, total errors found = 0
Repairing Server Network Addresses
Start: Friday, October 05, 2012 10:58:29 Local Time
****************************************************************
This operation searches IPX, SLP, and DNS tables, if
available, to validate network address attributes of
NCP_SERVERS, and the referrals on replica objects.
If the information on DNS/DHCP tables or the /etc/hosts file is
incorrect, then we can neither guarantee proper validation of network
addresses, nor replica referral updates. This is particularly true
if the system uses unregistered DHCP addresses or the information
in the HOSTS file is incorrect or outdated
****************************************************************


Checking server: .oes11sp1x1.system.tokyo.ace
ERROR: Adding a Network Address Property :
Address Type = TCP, data[6] = 192.168.1.227:524
Address Type = UDP, data[6] = 192.168.1.227:524
Checking server address in Replica ID : 4, .[Root].
Address Type = TCP, data[6] = 192.168.1.229:524
Address Type = UDP, data[6] = 192.168.1.229:524
The Replica Property for this server has been updated
ERROR: Could not connect. Error : -626

Checking server: .oes11x2.system.tokyo.ace
Address Type = TCP, data[6] = 192.168.1.228:524
Address Type = UDP, data[6] = 192.168.1.228:524
Checking server address in Replica ID : 2, .[Root].

Checking server: .oes11x1.system.tokyo.ace
Checking server address in Replica ID : 1, .[Root].
Repairing replica ring
Start: Friday, October 05, 2012 10:58:50 Local Time

Replica Ring for replica: .[Root].
Remote server's local ID: 0000805c
Remote server's replica root ID: 00008058
Remote server name is: .oes11x1.system.tokyo.ace
OK - Authenticated to server
Remote server's local ID: 00008081
Remote server's replica root ID: 00008040
Remote server name is: .oes11x2.system.tokyo.ace
OK - Authenticated to server
Remote server's local ID: 000085fc
Remote server's replica root ID: 0000805c
Remote server name is: .oes11sp1x1.system.tokyo.ace
ERROR: Could not connect to server by name, Error: -626
The server's object is in local replica: T=ACE-TREE
Finish: Friday, October 05, 2012 10:58:56 Local Time
Total repair time: 0:00:53
Total errors: 3
NDSRepair process completed.
oes11x1:~ #


パーティションの修復
# ndsrepair -P

オプション

1. Repair all replicas
2. Repair selected replica
3. Schedule immediate synchronization
4. Cancel partition operation
5. Designate this server as the new master replica
6. Report Synchronization status of all servers
7. Synchronize the replica on all servers
8. Repair Ring, all replicas
9. Repair Ring, selected replica
10. View Replica Ring
11. View entire partition name
12. Return to Replica List


[サンプル]
oes11x1:~ # ndsrepair -P

[1] Instance at /etc/opt/novell/eDirectory/conf/nds.conf: oes11x1.OU=system.OU=tokyo.O=ace.ACE-TREE
Repair utility for Novell eDirectory 8.8 - 8.8 SP6 v20604.10
DS Version 20605.00 Tree name: ACE-TREE
Server name: .oes11x1.system.tokyo.ace

Size of /var/opt/novell/eDirectory/log/ndsrepair.log = 40032 bytes.

This list shows information for each replica stored on this server. Select a replica to display an options menu.
Finding all replicas on this server
Please Wait...
Total number of replicas = 1

PARTITION NAME REPLICA TYPE REPLICA STATE
(1).[Root]. Master On

Enter 'q' to escape the operation.
Enter a replica number(1-1)?1 <--- パーティションの選択

REPLICA OPTIONS
1. Repair all replicas
2. Repair selected replica
3. Schedule immediate synchronization
4. Cancel partition operation
5. Designate this server as the new master replica
6. Report Synchronization status of all servers
7. Synchronize the replica on all servers
8. Repair Ring, all replicas
9. Repair Ring, selected replica
10. View Replica Ring
11. View entire partition name
12. Return to Replica List


Enter 'q' to escape the operation.
Enter a replica option(1-12)?q <--- オプションを選ぶか quit

Total errors: 0
NDSRepair process completed.
oes11x1:~ #


共通する ndsrepair のスイッチ

-R -ローカル・データベースを修理する
-A no ndsrepair.logファイルリセットする
-l yes ndsrepair 中 eDirectoryデータベースをロックする。
-d 全データベースを再構築する。
-t ツリー構造チェックを行なう。
-i eDirectoryデータベース構造およびインデックスをチェックする。
-r 全てのローカルレプリカを修復する
-v ストリーム・ファイルを確認する
-c ローカル参照をチェックする

オビチュアリ(Obituaries)をチェックする

ndsrepairを使用して、NDSオビチュアリステータスを調べることができます:
ndsrepair -C -Ad -A

注)オビチュアリ(Obituaries)とは直訳すると「死亡広告」、つまり「削除されたオブジェクト通知」の意味です。

[サンプル]
oes11x1:~ # ndsrepair -C -Ad -A

[1] Instance at /etc/opt/novell/eDirectory/conf/nds.conf: oes11x1.OU=system.OU=tokyo.O=ace.ACE-TREE
Repair utility for Novell eDirectory 8.8 - 8.8 SP6 v20604.10
DS Version 20605.00 Tree name: ACE-TREE
Server name: .oes11x1.system.tokyo.ace

Size of /var/opt/novell/eDirectory/log/ndsrepair.log = 38202 bytes.

Preparing Log File "/var/opt/novell/eDirectory/log/ndsrepair.log"
Please Wait...
External Reference Check
External Reference Check
Start: Friday, October 05, 2012 09:52:46 Local Time

Checked 0 external references
Found: 0 total obituaries in this DIB,
0 Unprocessed obits, 0 Purgeable obits,
0 OK_To_Purge obits, 0 Notified obits
Total errors: 0
NDSRepair process completed.
oes11x1:~ #


同期状態とVersionsのチェック
# ndsrepair -E

[サンプル]

oes11x1:~ # ndsrepair -E

[1] Instance at /etc/opt/novell/eDirectory/conf/nds.conf: oes11x1.OU=system.OU=tokyo.O=ace.ACE-TREE
Repair utility for Novell eDirectory 8.8 - 8.8 SP6 v20604.10
DS Version 20605.00 Tree name: ACE-TREE
Server name: .oes11x1.system.tokyo.ace

Size of /var/opt/novell/eDirectory/log/ndsrepair.log = 38590 bytes.

Preparing Log File "/var/opt/novell/eDirectory/log/ndsrepair.log"
Please Wait...
Collecting replica synchronization status
Start: Friday, October 05, 2012 10:15:48 Local Time
Retrieve replica status

Partition: .[Root].
Replica on server: .oes11sp1x1.system.tokyo.ace
Replica: .oes11sp1x1.system.tokyo.ace 10-05-2012 10:06:50
Replica on server: .oes11x2.system.tokyo.ace
Replica: .oes11x2.system.tokyo.ace 10-05-2012 10:06:21
Replica on server: .oes11x1.system.tokyo.ace
Replica: .oes11x1.system.tokyo.ace 10-05-2012 10:06:20
All servers synchronized up to time: 10-05-2012 10:06:20
Finish: Friday, October 05, 2012 10:15:48 Local Time

Total errors: 0
NDSRepair process completed.
oes11x1:~ #


時刻同期およびすべてのサーバーバージョンのチェック

# ndsrepair -T

[サンプル]
oes11x1:~ # ndsrepair -T

[1] Instance at /etc/opt/novell/eDirectory/conf/nds.conf: oes11x1.OU=system.OU=tokyo.O=ace.ACE-TREE
Repair utility for Novell eDirectory 8.8 - 8.8 SP6 v20604.10
DS Version 20605.00 Tree name: ACE-TREE
Server name: .oes11x1.system.tokyo.ace

Size of /var/opt/novell/eDirectory/log/ndsrepair.log = 39154 bytes.

Building server list
Please Wait...
Preparing Log File "/var/opt/novell/eDirectory/log/ndsrepair.log"
Please Wait...
Collecting time synchronization and server status
Time synchronization and server status information
Start: Friday, October 05, 2012 10:17:19 Local Time

---------------------------+---------+---------+-----------+--------+-------
DS Replica Time Time is Time
Server name Version Depth Source in sync +/-
---------------------------+---------+---------+-----------+--------+-------
Processing server: .oes11sp1x1.system.tokyo.ace
.oes11sp1x1.system.tok... 20702.02 0 Non-NetWare Yes 0
Processing server: .oes11x2.system.tokyo.ace
.oes11x2.system.tokyo.ace 20605.00 0 Non-NetWare Yes 0
Processing server: .oes11x1.system.tokyo.ace
.oes11x1.system.tokyo.ace 20605.00 0 Non-NetWare Yes 0
---------------------------+---------+---------+-----------+--------+-------
Total errors: 0
NDSRepair process completed.
oes11x1:~ #



単一オブジェクトの修復

# ndsrepair -J[entry_id]

他のスイッチ

-R -Ad -Xk3 目的:サーバーから外部参照(External Reference)をすべて取り除きます。
-R -Ad -Xk2 サーバーからのすべてのレプリカの削除 - 要注意
-R -Ad -OT -タイムスタンプにしたがって、オビチュアリの再削除
-S -Ad いくつかの拡張オプションがあります。操作には[root]権限のIDとパスワードが必要です。

1. Request schema from Master Server(スキーマがコピーされない場合、マスタからスキーマを取得します)
2. Reset local schema
3. Post Netware 5 Schema Update
4. Optional Schema Enchancements
5. Import schema from Tree (他のツリーからのスキーマのインポート)
6. Declare a new epoch (エポックの宣言 - 時刻同期に失敗したときに使用します)


[サンプル]

oes11x1:~ # ndsrepair -S -Ad

[1] Instance at /etc/opt/novell/eDirectory/conf/nds.conf: oes11x1.OU=system.OU=tokyo.O=ace.ACE-TREE
Repair utility for Novell eDirectory 8.8 - 8.8 SP6 v20604.10
DS Version 20605.00 Tree name: ACE-TREE
Server name: .oes11x1.system.tokyo.ace

Size of /var/opt/novell/eDirectory/log/ndsrepair.log = 40032 bytes.

Administrator name: .admin.ace
Password:******
Logging In To Server
Please Wait...

GLOBAL SCHEMA OPERATIONS
1. Request schema from Master Server
2. Reset local schema
3. Post Netware 5 Schema Update
4. Optional Schema Enchancements
5. Import schema from Tree
6. Declare a new epoch


Enter 'q' to escape the operation.
Enter a schema option(1-6)?q <--- 数字を選ぶかquit

Total errors: 0
NDSRepair process completed.
oes11x1:~ #


-Keyword-

Novell Open Enterprise Server OES Linux eDirectry ndsrepair dsrepair

islandcenter.jp
by islandcenter | 2012-10-05 11:06 | OES Linux | Comments(0)