Re: bin/60521: dump(8): mystery of Hanoi
Taylor R Campbell <[email protected]> Thu, 30 Jul 2026 21:53:13 +0000
| Newsgroups | gmane.os.netbsd.bugs |
|---|---|
| Message-ID | <[email protected]> |
Some further digging into TUHS archives reveals that the text was previously substantially different in 2.9BSD (and essentially the same there as in V7 Unix), explaining the binary counting algorithm that various other sources (like Wikipedia and its references) use -- it also more clearly distinguishes which tapes are used for which dumps at which levels when: > Now a short suggestion on how to > perform dumps. > Start with a full level 0 dump: > .PP > \fIdump 0u\fP > .PP > Next, > periodic level 9 dumps should be made on an > exponential progression of tapes. > (Sometimes called Tower of Hanoi \- 1 2 1 3 1 2 1 4 ... > tape 1 used every other time, > tape 2 used every fourth, > tape 3 used every eighth, etc.): > .PP > \fIdump 9u\fP > .PP > When the level 9 incremental approaches a full > tape (about 78000 512-byte blocks at 1600 BPI blocked 20, > or 39000 1-kilobyte blocks), > a level 1 dump should be made: > .PP > \fIdump 1u\fP > .PP > After this, > the exponential series should progress as uninterrupted. > These level 9 dumps are based on the level 1 dump which > is based on the level 0 full dump. > This progression of levels of dump can be carried > as far as desired. https://www.tuhs.org/cgi-bin/utree.pl?file=3D2.9BSD/usr/man/man8/dump.8 https://www.tuhs.org/cgi-bin/utree.pl?file=3DV7/usr/man/man1/dump.1m Then it was rewritten some time between 2.9BSD and 2.11BSD to be substantially similar to the present text, with the mysterious unexplained sequence, though specifying exactly 10 tapes for dailies and 5 tapes for weeklies: > Now a short suggestion on how to perform dumps. Start with > a full level 0 dump >=20 > dump 0un >=20 > Next, dumps of active file systems are taken on a daily > basis, using a modified Tower of Hanoi algorithm, with this > sequence of dump levels: > 3 2 5 4 7 6 9 8 9 9 ... > For the daily dumps, a set of 10 tapes per dumped file sys- > tem is used on a cyclical basis. Each week, a level 1 dump > is taken, and the daily Hanoi sequence repeats with 3. For > weekly dumps, a set of 5 tapes per dumped file system is > used, also on a cyclical basis. Each month, a level 0 dump > is taken on a set of fresh tapes that is saved forever. https://www.tuhs.org/cgi-bin/utree.pl?file=3D2.11BSD/man/cat8/dump.0 I wonder whether the intent was the following correspondence, with the binary counting progression of tape numbers concept obliquely concealed in the phrase `modified Tower of Hanoi algorithm'? day 0 1 2 3 4 5 6 7 8 9 10 11 12 13 ... level 0 3 2 5 4 7 6 9 8 9 9 9 9 9 ... (mysterious sequence) tape 0 1 2 1 3 1 2 1 4 1 2 1 3 1 ... (Tower of Hanoi) Or was it just the following as the plain reading of the new language suggests? tape 0 1 2 3 4 5 6 7 8 9 0 1 2 3 ... (dailies) tape 0 1 2 3 4 0 1 2 3 4 0 1 2 3 ... (weeklies) In 1991, Cael Staelin replaced the exact numbers in UCB CSRG BSD's dump(8) man page by the vague text `a fixed number of tapes', bringing it to essentially what it is today: -For the daily dumps, a set of 10 tapes per dumped file system -is used on a cyclical basis. +.Ed +.Pp +For the daily dumps, it should be possible to use a fixed number of tapes +for each day, used on a weekly basis. Each week, a level 1 dump is taken, and -the daily Hanoi sequence repeats with 3. -For weekly dumps, a set of 5 tapes per dumped file system is +the daily Hanoi sequence repeats beginning with 3. +For weekly dumps, another fixed set of tapes per dumped file system is used, also on a cyclical basis. -Each month, a level 0 dump is taken -on a set of fresh tapes that is saved forever. https://github.com/robohack/ucb-csrg-bsd/commit/cf93f1d76d4566948c9754282a7= 28d2f86b95a39#diff-1ebf0645f1a78aa421b8ee0b6f245358b9642f87037621aaec734343= d2768f81