The Graham Utilities for OS/2 - Version 2


[Warpspeed]

[Table of Contents] [Index] [Previous] [Next]


DI - Disk Information

Summary

DI reports technical information about a disk. It displays the recommended values for the media as well as the actual values.

Icon

Command Line Format

Usage: DI {Switches} <Drive Spec(s)>

Switches

-a
All disks.
-h
Hard disks only.
-p
Physical disk mode.

Note : If no drive specifications are entered, the current drive is the only one displayed.

Description

DI reports on the technical information about a disk. OS/2 reports two different types of data about a disk - the recommended values and the actual values. The recommended values are those OS/2 thinks that particular type of media SHOULD have; and the actual values are those the media ACTUALLY reports. Normally these should be the same.

The values which DI reports on are:

bytes per sector
Sectors are the smallest amount of data which a disk can either read or write. They are determined when the disk is physically formatted. The bytes per sector value is usually 512, but it may be 128, 256, 1024 or 2048 as well.
sectors per cluster
OS/2 and DOS allocate sectors in groups called "Clusters". This is the minimum amount of space in which DOS or OS/2 can allocate to a file. This value varies, it depends on the size and type of media.
reserved sectors
This is the number of sectors reserved for use by the operating system.
number of FATs
The File Allocation Table (FAT) file system uses tables to save information about where files reside. To assist in maintaining file system integrity, more than one copy of the FAT may be kept. The default for the number of FAT's is 2.
root directory entries
The FAT file system requires a fixed space to be reserved for the root directory. This amount is determined when the disk is formatted. This value varies as it depends on the size and type of media. Although a value is returned for HPFS partitions, its value is meaningless as HPFS has no limit to the number of files in the root directory.
number of sectors
This specifies the number of sectors available on the disk. This value only valid for partitions of less than 32Mb in size.
media descriptor
Specifies a hexadecimal number which lists the type of media in the disk drive. Common values are:
F0
A 1.44Mb 3.5" floppy disk
F8
A hard disk.
F9
A 1.2Mb 5.25" floppy disk OR
A 720K 3.5" floppy disk.
FD
A 360K 5.25" floppy disk.
FE
A 160K 5.25" floppy disk.
FF
A 320K 5.25" floppy disk.
sectors per FAT
Specifies the number of sectors occupied by each FAT in the FAT file system.
sectors per track
Each track is divided up into a number of sectors. Common values are:
8
A 320K 5.25" floppy disk.
9
A 360K 5.25" floppy disk OR
A 720K 3.5" floppy disk.
15
A 1.2Mb 5.25" floppy disk.
18
A 1.44Mb floppy disk.
number of heads
Specifies the number of heads (or sides) of the logical disk.
hidden sectors
Under FAT file systems, this specifies the number of sectors reserved for system use.
large sectors
This is the number of sectors available on a large partition. A large partition is 32Mb is size.
number of cylinders
Specifies the number of cylinders (or tracks) on a hard drive or floppy disk.
device attributes
Specifies the attributes of a particular device. They can be added together. The attributes are defined by the following values:
1
Not removable.
2
Can detect media changes.
4
The physical device driver supports physical addresses greater than 16 megabytes.
device type
This specifies the type of device. The type of device is specified by the following:
0
48 tracks-per-inch, low density floppy disk.
1
96 tracks-per-inch, high density floppy disk.
2
3.5-inch (720K) floppy disk.
3
8-inch, single density floppy disk.
4
8-inch, double density floppy disk.
5
Fixed disk.
6
Tape drive.
7
Other or 1.44Mb (unknown type of device).
8
Read/Write Optical disk.
9
3.5-inch 2.88Mb floppy disk.

-a All disks

DI will scan all logical disk drives defined by the system, starting at drive A:. The drives are scanned in order, starting at A:, then B: and so on.

-h Hard disks only

DI will scan all logical disk drives defined by the system, starting at drive C:. The drives are scanned in order, starting at C:, then D: and so on.

-p Physical disk mode

By default, DI works in logical disk mode. Logical disks are defined by FDISK when you partition your hard disks. A logical disk must be part (or all) of a physical disk. Multiple logical disks can be defined on a single physical (or real) hard disk. The -p switch changes the operation of DI to enable it to report on information about the physical disks attached to your system. If this switch is given, then only the physical disk information is returned. No logical disk information is returned.

In this mode DI will report on the number of cylinders (tracks), heads, and sectors per track. The definitions of cylinders etc, are the same as described as above, but they apply to the physical disk, not a logical disk.

Examples

DI
DI will report on the information about the currently selected logical disk.
DI -h
DI will report the information about all of your logical disks, starting at drive C:. If you have a large number of logical drives defined, you may get many screens of information returned to you. To overcome this enter:
DI -h | MORE
This will display the data one page at a time.
DI -p
DI will display the technical information about all of the physical disks attached to your system. An example of this switch is:
Number of physical disks : 1

Physical Disk : 1 Cylinders : 1307 Heads : 64 Sectors Per Track : 32

DI C: E:
DI will report the information about logical disks C: and E: only.
DI C: -p
DI will report only the physical disk information. No logical disk information about C: is returned.

Networks

A quick note about networks and logical drives is necessary at this point. When you use a network drive, it appears as a logical drive to your system. OS/2 does not support calls of the low technical nature necessary to return this level of information across networks. If you try DI on a network drive you will get an error message similar to the following:

SYS0065: Network access is denied.
OS/2 is not inherently based on the FAT file system. It supports other disk formats using installable file systems. On a network, any remote drive to which you are connected may be of a totally different format - one which is not known to OS/2. It may be able to share files, but the internal file structure of the remote file server will not be generally known. For example, the format of UNIX and NETWARE drives could be anything. OS/2 does not need to know the internal formats of network drives. This is why calls of this nature are not supported by OS/2 across networks.