* [TUHS] Adding an RP06 disk to a running V7 instance
@ 2015-12-05 20:11 Will Senn
2015-12-05 20:17 ` Ronald Natalie
0 siblings, 1 reply; 7+ messages in thread
From: Will Senn @ 2015-12-05 20:11 UTC (permalink / raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1747 bytes --]
I have set up v7 following [1] and I would like to better understand the
process of adding a disk to the environment. Here is what I know:
The system has one RP06 with two partitions rp0 and rp3 which correspond
to the two block devices rp0, rp3, and the two character devices rrp0,
and rrp3. The special files look like so:
brw-r--r-- 1 root 6, 0 Dec 31 19:05 /dev/rp0
brw-r--r-- 1 root 6, 7 Dec 31 19:04 /dev/rp3
crw-r--r-- 1 root 14, 0 Dec 31 19:01 /dev/rrp0
crw-r--r-- 1 root 14, 7 Dec 31 19:01 /dev/rrp3
This meshes with the device classes switches in c.c:
The block device switch:
struct bdevsw bdevsw[] =
{
...
nulldev, nulldev, hpstrategy, &hptab, /* hp = 6 */
...
}
The character device switch:
struct cdevsw cdevsw[] =
{
...
nulldev, nulldev, hpread, hpwrite, nodev, nulldev, 0, /* hp =
14 */
...
}
I would like to add another RP disk to the environment. After I attach
an RP04/05/06 to the system, what should I use as the major/minor device
numbers? To put it differently, it doesn't seem correct to me to use 6,1
for the block device or 14,1 for the character device on the new drive
as it's a completely different disk from rp0 and rp3 which are just
partitions on the first drive and have 6,0, 6,7, and 14,0, 14,7. If each
RP can have 8 partitions and there can be 8 drives, what is the correct
major, minor numbers to use with v7 for multiple devices?
c.c only lists one vector each for the hp device (one block vector where
hp = 6, and one char vector where hp = 15).
Thanks,
Will
[1] Haley, C. B. & Ritchie, D. M. (1979). Setting Up Unix – Seventh
Edition (pp. 497-505) in UNIX programmer's manual, Vol. 2, Revised and
Expanded Version. Bell Laboratories: NY.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [TUHS] Adding an RP06 disk to a running V7 instance
2015-12-05 20:11 [TUHS] Adding an RP06 disk to a running V7 instance Will Senn
@ 2015-12-05 20:17 ` Ronald Natalie
2015-12-05 22:33 ` Will Senn
0 siblings, 1 reply; 7+ messages in thread
From: Ronald Natalie @ 2015-12-05 20:17 UTC (permalink / raw)
You want to add another drive? The lower 3 bites selects the partition, the upper bits (shfited right 3) are the drive number.
The second disk (to match your first) would use 6,8 and 6,15 and 14,8 and 14,15 respectively.
> On Dec 5, 2015, at 3:11 PM, Will Senn <will.senn at gmail.com> wrote:
>
>
> I would like to add another RP disk to the environment. After I attach an RP04/05/06 to the system, what should I use as the major/minor device numbers? To put it differently, it doesn't seem correct to me to use 6,1 for the block device or 14,1 for the character device on the new drive as it's a completely different disk from rp0 and rp3 which are just partitions on the first drive and have 6,0, 6,7, and 14,0, 14,7. If each RP can have 8 partitions and there can be 8 drives, what is the correct major, minor numbers to use with v7 for multiple devices?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2284 bytes
Desc: not available
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20151205/84379840/attachment.bin>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [TUHS] Adding an RP06 disk to a running V7 instance
2015-12-05 20:17 ` Ronald Natalie
@ 2015-12-05 22:33 ` Will Senn
2015-12-05 22:48 ` Lawrence Stewart
2015-12-05 23:12 ` Hellwig Geisse
0 siblings, 2 replies; 7+ messages in thread
From: Will Senn @ 2015-12-05 22:33 UTC (permalink / raw)
The v7 manual suggests running /usr mounted on a separate drive from /.
I am trying to follow this advice, but I am getting a read error on the
newly added disk.
I read hp(4). According to this man page, hp partitions each device into
8 partitions of different sizes and lengths (given in cylinders of 418
512-byte blocks). Here are the partitions from the man page, where disk
refers to pseudodisks on each drive (are these partitions?):
disk start length
0 0 23
1 23 21
2 0 0
3 0 0
4 44 386
5 430 385
6 44 367
7 44 771
It would appear that:
partitions 0, 1 and 7 combined account for the entire contiguous disk,
cylinders 0-815, and has the largest single partition (partition 7) of
any of the schemes. This seems like the default scheme and during a
default setup accounts for rp0 on partition 0 and rp3 on partition 7.
partitions 0, 1 and 6 combined only account for cylinders 0-411.
partitions 0, 1, 4, and 5 combined, but with more slices than the first
scheme, also account for the entire disk cylinders 0-815.
partitions 2 and 3 don't seem to be useable.
Given the above constraints, it seems like the first partition scheme
that includes partition 7 would also be a good choice to use for an
additional drive.
I kept this in mind and added an additional RP06 to the PDP11/45
simulation. At boot, I tried two different approaches to handling the
new drive, both had the same problem ultimately. The first was to simply
ignore it until after booting into unix and then creating the special
files as Ronald describes and then running mkfs:
/etc/mknod rp3 b 6 8
/etc/mknod rrp3 c 14 15
chmod go-w rp3 rrp3
/etc/mkfs /dev/rp3 322278
isize = 10328
m/n = 3 500
I don't see any errors, but the isize is different than it is during the
default install onto the first drive.
The second was to use tm(0,3) (is this mkfs or something like it?) like
I did for the first drive:
tm(0,3)
file sys size: 5000
file system: hp(1,0)
isize = 1600
m/n = 3 500
then after creating the same special files as above, mkfs works the same
way it did on the default setup on drive 0:
/etc/mkfs /dev/rp3 322278
isize = 65496
m/n = 3 500
Still no errors, but when I try to check the filesystem with icheck, or
restore a filesystem from tape to the drive, I get the following error:
read error 9736
full result:
icheck /dev/rp3
/dev/rp3:
read error 9736
files 2 (r=1,d=1,b=0,c=0)
used 1 (i=0,ii=0,iii=0,d=1)
free 1389
missing312699
What does it look like I am doing wrong?
Thanks,
Will
On 12/5/15 2:17 PM, Ronald Natalie wrote:
> You want to add another drive? The lower 3 bites selects the partition, the upper bits (shfited right 3) are the drive number.
> The second disk (to match your first) would use 6,8 and 6,15 and 14,8 and 14,15 respectively.
>
>> On Dec 5, 2015, at 3:11 PM, Will Senn <will.senn at gmail.com> wrote:
>>
>>
>> I would like to add another RP disk to the environment. After I attach an RP04/05/06 to the system, what should I use as the major/minor device numbers? To put it differently, it doesn't seem correct to me to use 6,1 for the block device or 14,1 for the character device on the new drive as it's a completely different disk from rp0 and rp3 which are just partitions on the first drive and have 6,0, 6,7, and 14,0, 14,7. If each RP can have 8 partitions and there can be 8 drives, what is the correct major, minor numbers to use with v7 for multiple devices?
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [TUHS] Adding an RP06 disk to a running V7 instance
2015-12-05 22:33 ` Will Senn
@ 2015-12-05 22:48 ` Lawrence Stewart
2015-12-05 23:04 ` Will Senn
2015-12-05 23:12 ` Hellwig Geisse
1 sibling, 1 reply; 7+ messages in thread
From: Lawrence Stewart @ 2015-12-05 22:48 UTC (permalink / raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 4308 bytes --]
The reason for the advice to run root and usr on separate drives is so you don’t have to seek back and forth
between the two partitions if they are on the same drive. That reason doesn’t apply to simulators, since the
drives are just files anyway.
But it looks to me like you have the wrong minor device numbers for the block device
If you want partition 7 of the second drive youwant
mknod rp3 b 6 15
not b 6 8
minor device 8 would be partition 0 of the second drive, minor 9 is partition 1 of the second drive, etc.
-L
> On 2015, Dec 5, at 5:33 PM, Will Senn <will.senn at gmail.com> wrote:
>
>
> The v7 manual suggests running /usr mounted on a separate drive from /. I am trying to follow this advice, but I am getting a read error on the newly added disk.
>
> I read hp(4). According to this man page, hp partitions each device into 8 partitions of different sizes and lengths (given in cylinders of 418 512-byte blocks). Here are the partitions from the man page, where disk refers to pseudodisks on each drive (are these partitions?):
>
> disk start length
> 0 0 23
> 1 23 21
> 2 0 0
> 3 0 0
> 4 44 386
> 5 430 385
> 6 44 367
> 7 44 771
>
> It would appear that:
> partitions 0, 1 and 7 combined account for the entire contiguous disk, cylinders 0-815, and has the largest single partition (partition 7) of any of the schemes. This seems like the default scheme and during a default setup accounts for rp0 on partition 0 and rp3 on partition 7.
> partitions 0, 1 and 6 combined only account for cylinders 0-411.
> partitions 0, 1, 4, and 5 combined, but with more slices than the first scheme, also account for the entire disk cylinders 0-815.
> partitions 2 and 3 don't seem to be useable.
>
> Given the above constraints, it seems like the first partition scheme that includes partition 7 would also be a good choice to use for an additional drive.
>
> I kept this in mind and added an additional RP06 to the PDP11/45 simulation. At boot, I tried two different approaches to handling the new drive, both had the same problem ultimately. The first was to simply ignore it until after booting into unix and then creating the special files as Ronald describes and then running mkfs:
>
> /etc/mknod rp3 b 6 8
> /etc/mknod rrp3 c 14 15
> chmod go-w rp3 rrp3
>
> /etc/mkfs /dev/rp3 322278
> isize = 10328
> m/n = 3 500
>
> I don't see any errors, but the isize is different than it is during the default install onto the first drive.
>
> The second was to use tm(0,3) (is this mkfs or something like it?) like I did for the first drive:
> tm(0,3)
> file sys size: 5000
> file system: hp(1,0)
> isize = 1600
> m/n = 3 500
>
> then after creating the same special files as above, mkfs works the same way it did on the default setup on drive 0:
> /etc/mkfs /dev/rp3 322278
> isize = 65496
> m/n = 3 500
>
> Still no errors, but when I try to check the filesystem with icheck, or restore a filesystem from tape to the drive, I get the following error:
> read error 9736
>
> full result:
> icheck /dev/rp3
> /dev/rp3:
> read error 9736
> files 2 (r=1,d=1,b=0,c=0)
> used 1 (i=0,ii=0,iii=0,d=1)
> free 1389
> missing312699
>
> What does it look like I am doing wrong?
>
> Thanks,
>
> Will
>
> On 12/5/15 2:17 PM, Ronald Natalie wrote:
>> You want to add another drive? The lower 3 bites selects the partition, the upper bits (shfited right 3) are the drive number.
>> The second disk (to match your first) would use 6,8 and 6,15 and 14,8 and 14,15 respectively.
>>
>>> On Dec 5, 2015, at 3:11 PM, Will Senn <will.senn at gmail.com> wrote:
>>>
>>>
>>> I would like to add another RP disk to the environment. After I attach an RP04/05/06 to the system, what should I use as the major/minor device numbers? To put it differently, it doesn't seem correct to me to use 6,1 for the block device or 14,1 for the character device on the new drive as it's a completely different disk from rp0 and rp3 which are just partitions on the first drive and have 6,0, 6,7, and 14,0, 14,7. If each RP can have 8 partitions and there can be 8 drives, what is the correct major, minor numbers to use with v7 for multiple devices?
>>
>
> _______________________________________________
> TUHS mailing list
> TUHS at minnie.tuhs.org
> https://minnie.tuhs.org/mailman/listinfo/tuhs
^ permalink raw reply [flat|nested] 7+ messages in thread
* [TUHS] Adding an RP06 disk to a running V7 instance
2015-12-05 22:48 ` Lawrence Stewart
@ 2015-12-05 23:04 ` Will Senn
0 siblings, 0 replies; 7+ messages in thread
From: Will Senn @ 2015-12-05 23:04 UTC (permalink / raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 4729 bytes --]
Lawrence,
Thanks for the note. Moving /usr to another drive served as both an
exercise for me to understand how it works and for me to follow the
advice. Good to know the advice is less applicable to the sim. You were
correct about the math, duh, 1111 is 15, not 8 :). All good now.
Thanks,
Will
On 12/5/15 4:48 PM, Lawrence Stewart wrote:
> The reason for the advice to run root and usr on separate drives is so you don’t have to seek back and forth
> between the two partitions if they are on the same drive. That reason doesn’t apply to simulators, since the
> drives are just files anyway.
>
> But it looks to me like you have the wrong minor device numbers for the block device
>
> If you want partition 7 of the second drive youwant
> mknod rp3 b 6 15
> not b 6 8
>
> minor device 8 would be partition 0 of the second drive, minor 9 is partition 1 of the second drive, etc.
>
> -L
>
>> On 2015, Dec 5, at 5:33 PM, Will Senn <will.senn at gmail.com> wrote:
>>
>>
>> The v7 manual suggests running /usr mounted on a separate drive from /. I am trying to follow this advice, but I am getting a read error on the newly added disk.
>>
>> I read hp(4). According to this man page, hp partitions each device into 8 partitions of different sizes and lengths (given in cylinders of 418 512-byte blocks). Here are the partitions from the man page, where disk refers to pseudodisks on each drive (are these partitions?):
>>
>> disk start length
>> 0 0 23
>> 1 23 21
>> 2 0 0
>> 3 0 0
>> 4 44 386
>> 5 430 385
>> 6 44 367
>> 7 44 771
>>
>> It would appear that:
>> partitions 0, 1 and 7 combined account for the entire contiguous disk, cylinders 0-815, and has the largest single partition (partition 7) of any of the schemes. This seems like the default scheme and during a default setup accounts for rp0 on partition 0 and rp3 on partition 7.
>> partitions 0, 1 and 6 combined only account for cylinders 0-411.
>> partitions 0, 1, 4, and 5 combined, but with more slices than the first scheme, also account for the entire disk cylinders 0-815.
>> partitions 2 and 3 don't seem to be useable.
>>
>> Given the above constraints, it seems like the first partition scheme that includes partition 7 would also be a good choice to use for an additional drive.
>>
>> I kept this in mind and added an additional RP06 to the PDP11/45 simulation. At boot, I tried two different approaches to handling the new drive, both had the same problem ultimately. The first was to simply ignore it until after booting into unix and then creating the special files as Ronald describes and then running mkfs:
>>
>> /etc/mknod rp3 b 6 8
>> /etc/mknod rrp3 c 14 15
>> chmod go-w rp3 rrp3
>>
>> /etc/mkfs /dev/rp3 322278
>> isize = 10328
>> m/n = 3 500
>>
>> I don't see any errors, but the isize is different than it is during the default install onto the first drive.
>>
>> The second was to use tm(0,3) (is this mkfs or something like it?) like I did for the first drive:
>> tm(0,3)
>> file sys size: 5000
>> file system: hp(1,0)
>> isize = 1600
>> m/n = 3 500
>>
>> then after creating the same special files as above, mkfs works the same way it did on the default setup on drive 0:
>> /etc/mkfs /dev/rp3 322278
>> isize = 65496
>> m/n = 3 500
>>
>> Still no errors, but when I try to check the filesystem with icheck, or restore a filesystem from tape to the drive, I get the following error:
>> read error 9736
>>
>> full result:
>> icheck /dev/rp3
>> /dev/rp3:
>> read error 9736
>> files 2 (r=1,d=1,b=0,c=0)
>> used 1 (i=0,ii=0,iii=0,d=1)
>> free 1389
>> missing312699
>>
>> What does it look like I am doing wrong?
>>
>> Thanks,
>>
>> Will
>>
>> On 12/5/15 2:17 PM, Ronald Natalie wrote:
>>> You want to add another drive? The lower 3 bites selects the partition, the upper bits (shfited right 3) are the drive number.
>>> The second disk (to match your first) would use 6,8 and 6,15 and 14,8 and 14,15 respectively.
>>>
>>>> On Dec 5, 2015, at 3:11 PM, Will Senn <will.senn at gmail.com> wrote:
>>>>
>>>>
>>>> I would like to add another RP disk to the environment. After I attach an RP04/05/06 to the system, what should I use as the major/minor device numbers? To put it differently, it doesn't seem correct to me to use 6,1 for the block device or 14,1 for the character device on the new drive as it's a completely different disk from rp0 and rp3 which are just partitions on the first drive and have 6,0, 6,7, and 14,0, 14,7. If each RP can have 8 partitions and there can be 8 drives, what is the correct major, minor numbers to use with v7 for multiple devices?
>> _______________________________________________
>> TUHS mailing list
>> TUHS at minnie.tuhs.org
>> https://minnie.tuhs.org/mailman/listinfo/tuhs
^ permalink raw reply [flat|nested] 7+ messages in thread
* [TUHS] Adding an RP06 disk to a running V7 instance
2015-12-05 22:33 ` Will Senn
2015-12-05 22:48 ` Lawrence Stewart
@ 2015-12-05 23:12 ` Hellwig Geisse
2015-12-05 23:28 ` Will Senn
1 sibling, 1 reply; 7+ messages in thread
From: Hellwig Geisse @ 2015-12-05 23:12 UTC (permalink / raw)
On Sa, 2015-12-05 at 16:33 -0600, Will Senn wrote:
> The second was to use tm(0,3) (is this mkfs or something like it?)
If you run 'strings f2', you get:
File 1:
2 copies of magtape bootstrap (2 blocks total)
The standalone bootstrap
File 2:
A file to console copy program
File 3:
This file
File 4:
The program mkfs
File 5:
The program restor
File 6:
A dump of rp0
File 7:
A dump of rp3
The numbering starts at 0 of course, so that tm(0,3)
is indeed a standalone mkfs.
Hellwig
^ permalink raw reply [flat|nested] 7+ messages in thread
* [TUHS] Adding an RP06 disk to a running V7 instance
2015-12-05 23:12 ` Hellwig Geisse
@ 2015-12-05 23:28 ` Will Senn
0 siblings, 0 replies; 7+ messages in thread
From: Will Senn @ 2015-12-05 23:28 UTC (permalink / raw)
On 12/5/15 5:12 PM, Hellwig Geisse wrote:
> On Sa, 2015-12-05 at 16:33 -0600, Will Senn wrote:
>> The second was to use tm(0,3) (is this mkfs or something like it?)
> If you run 'strings f2', you get:
>
> File 1:
> 2 copies of magtape bootstrap (2 blocks total)
> The standalone bootstrap
> ...
> The numbering starts at 0 of course, so that tm(0,3)
> is indeed a standalone mkfs.
>
>
This may be obvious to you, but to me it's flat out amazing. Thanks for
giving me your insight. I never would have thought to use strings on the
tape segments, but it is so incredibly helpful.
Regards,
Will
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-12-05 23:28 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-05 20:11 [TUHS] Adding an RP06 disk to a running V7 instance Will Senn
2015-12-05 20:17 ` Ronald Natalie
2015-12-05 22:33 ` Will Senn
2015-12-05 22:48 ` Lawrence Stewart
2015-12-05 23:04 ` Will Senn
2015-12-05 23:12 ` Hellwig Geisse
2015-12-05 23:28 ` Will Senn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).