[Orca-dev] RE[2]: RE: Re[4]: Digest 336
Rusty Carruth
rcarruth at tempe.tt.slb.com
Wed Oct 10 14:59:31 PDT 2001
"Alan LeGrand" <legrand at inow.com> wrote:
> Rusty,
>
> If this is the only problem then simply add
>
> int GLOBAL_diskinfo_size = 512;
>
> the size does not matter. Since the disk_map function is suppose to
> terminate before it reaches the end of the array.
That fixed it. here's the result as non-root:
rcarruth at msfree> /opt/RICHPse/bin/se /tmp/disks.se
RAW_disk_count:3 GLOBAL_diskinfo_size:512
i=0 j=0 dad0 c0t2d0 atapicd2
i=0 j=1 c0t0d0 c0t0d0 dad0
i=1 j=0 c0t2d0 c0t2d0 atapicd2
i=2 j=0 fd0 c0t2d0 atapicd2
i=2 j=1 fd0 c0t0d0 dad0
Fatal: subscript: 2 out of range for: GLOBAL_disk_info
and as root:
# /opt/RICHPse/bin/se /tmp/disks.se
RAW_disk_count:3 GLOBAL_diskinfo_size:512
i=0 j=0 dad0 c0t2d0 atapicd2
i=0 j=1 c0t0d0 c0t0d0 dad0
i=1 j=0 c0t2d0 c0t2d0 atapicd2
i=2 j=0 fd0 c0t2d0 atapicd2
i=2 j=1 fd0 c0t0d0 dad0
Fatal: subscript: 2 out of range for: GLOBAL_disk_info
>
> Your fix eliminated searching for the long disk name of the short disk name
> fd0 (floppy disk 0) which is not in the table. disk_map is suppose to stop
> as soon as it encounters a disk slice c*s? apparently your eide disk
> dad0 long disk name differs from a scsi disk long disk name. For example
> the first scsi disk is normally sd0 and has a long disk name c0t0d0 with
> slices sd0,{a-f} or c0t0d0s{0-7}
Yeah, and what's strange is that the pointers all look like you'd expect
(see below) - apparently something is different enough to confuse matters.
Hopefully your output above (which looks strange to me, when you look at
what devices I have, below) will help you more than it helps me! ;-)
(Of course, if I *looked* at your program the output would maybe make
more sense ;-)
> What I really wanted to get from running the test program was the short to
> long disk mapping for your disk. If you can't get the test program to run
> you should still be able to identify the mapping from iostat by running it
> with and without the -n option (if solaris 2.5.1 supports iostat -n.)
> Unfortunately,I don't remeber when sun added this feature
>
> Alan
>
rcarruth at msfree> iostat
tty atapicd2 dad0 fd0 cpu
tin tout Kps tps serv Kps tps serv Kps tps serv us sy wt id
0 133 0 0 32 18 2 43 0 0 401 4 1 1 94
rcarruth at msfree> iostat -n
Usage: iostat [-tdDxcI] [-l n] [disk ...] [interval [count]]
rcarruth at msfree>
Looks like they don't support it in 2.5.1 yet. Bummer.
This might be slightly useful:
rcarruth at msfree> df -kl
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c0t0d0s0 480815 14534 418201 4% /
/dev/dsk/c0t0d0s4 962134 370228 495696 43% /usr
/proc 0 0 0 0% /proc
fd 0 0 0 0% /dev/fd
/dev/dsk/c0t0d0s1 769710 100676 592064 15% /var
/dev/dsk/c0t0d0s5 4878413 3601648 788925 83% /export/home
/dev/dsk/c0t0d0s3 240399 76204 140165 36% /opt
swap 388200 117880 270320 31% /tmp
rcarruth at msfree> ls -l /dev/dsk/c0t0d0s{0,1,3,4,5} /dev/fd
lrwxrwxrwx 1 root 46 May 23 2000 /dev/dsk/c0t0d0s0 -> ../../devices/pci at 1f,0/pci at 1,1/ide at 3/dad at 0,0:a
lrwxrwxrwx 1 root 46 May 23 2000 /dev/dsk/c0t0d0s1 -> ../../devices/pci at 1f,0/pci at 1,1/ide at 3/dad at 0,0:b
lrwxrwxrwx 1 root 46 May 23 2000 /dev/dsk/c0t0d0s3 -> ../../devices/pci at 1f,0/pci at 1,1/ide at 3/dad at 0,0:d
lrwxrwxrwx 1 root 46 May 23 2000 /dev/dsk/c0t0d0s4 -> ../../devices/pci at 1f,0/pci at 1,1/ide at 3/dad at 0,0:e
lrwxrwxrwx 1 root 46 May 23 2000 /dev/dsk/c0t0d0s5 -> ../../devices/pci at 1f,0/pci at 1,1/ide at 3/dad at 0,0:f
/dev/fd:
total 0
crw-rw-rw- 1 root 176, 0 Oct 10 14:55 0
crw-rw-rw- 1 root 176, 1 Oct 10 14:55 1
crw-rw-rw- 1 root 176, 10 Oct 10 14:55 10
crw-rw-rw- 1 root 176, 11 Oct 10 14:55 11
<etc, for 62 total entries>
Hope this helps!
rc
More information about the Orca-dev
mailing list