disk field specifying which disk the web resides on.
Its value is a non-zero positive integer in decimal or a zero width string.
Those values are called disk IDs.
The disk whose ID is "" (a zero width string) is required.
When you add a disk, its ID needs to be the current largest ID plus 1.
You must not skip a number.
You can have the following disk IDs on a TWiki: a, b, and c for read-only webs.
TWiki::getDiskList() doesn't return non numeric disk IDs except the zero width string one ("").
Non numeric disk IDs may be handy for migration to a newer version of TWiki.
The new version can show as read-only and include webs not yet migrated without bothering them.
Metadata repository's webs file:
| Name | Admin | Disk |
|---|---|---|
| Eng | EngAdminGroup | 2 |
| Main | TWikiAdminGroup | |
| Sales | SalesAdminGroup | 1 |
| TWiki | TWikiAdminGroup | |
| Trash | TWikiAdminGroup | |
| Trashx1x | TWikiAdminGroup | 1 |
| Trashx2x | TWikiAdminGroup | 2 |
$TWiki::cfg{DataDir} = '/disk0/data';
$TWiki::cfg{PubDir} = '/disk0/pub';
$TWiki::cfg{DataDir1} = '/disk1/data';
$TWiki::cfg{PubDir1} = '/disk1/pub';
$TWiki::cfg{DataDir2} = '/disk2/data';
$TWiki::cfg{PubDir2} = '/disk2/pub';
| Name | DataDir | PubDir | DataDir1 | PubDir1 | DataDir2 | PubDir2 |
|---|---|---|---|---|---|---|
| am | /disk0/data | /disk0/pub | /disk1/data | /disk1/pub | /disk2/data | /disk2/pub |
| eu | /d/twiki/data | /d/twiki/pub | /d1/twiki/data | /d1/twiki/pub | /d2/twiki/data | /d2/twiki/pub |
| as | /twiki/data | /twiki/pub | /twiki1/data | /twiki1/pub | /twiki2/data | /twiki2/pub |
topic.txt and topic.txt,v are moved from DataDir/WEB to the DataDir/Trash. And the PubDir/WEB/topic directory is moved to PubDir/Trash. If PubDir/WEB is a symbolic link a different disk, then moving PubDir/WEB/topic to PubDir/Trash fails.
For consideration on symbolic link based implementation, please read TWiki:Codev/UsingMultipleDisks#Considerations_on_symbolic_link| I | Attachment | Action | Size | Date | Who | Comment |
|---|---|---|---|---|---|---|
| |
multiple-disks.png | manage | 15.1 K | 2012-09-22 - 19:03 | TWikiContributor |
|
Copyright © 1999-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Daya Bay? Send feedback Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.UsingMultipleDisks. |