TIP: Click on subject to list as thread! ANSI
echo: os2
to: Will Honea
from: Peter Knapper
date: 1999-12-11 11:22:08
subject: HPFS Directories.

Hi Will,

PK> A simple question.......;-) Where is the FIRST root directory
PK> entry located  on an HPFS volume? I know that HPFS uses a directory 
PK> recording methodology similar to a B-Tree, and it writes  files in
PK> BANDS across the partition, however the very FIRST  directory entry
PK> MUST be located somewhere that can be  calculated as a FIXED
PK> location for that particular  partition. Alternatively there must be
PK> a data structure  within an HPFS partition that contains details of
PK> the  partition "layout". Now how can I find out where that  location
PK> is? 

 WH> I'm sure Mike Ruskai will jump in here, but you should take a long
 WH> look at DFSEE (Hobbes, etc).  

THUNK! That was a brain cell falling into place, thanks Will, I needed that! I 
already have DFSEE here and had forgotten about it! Thats what happens when
you have too many fingers and too many pies......;-) 

Now DFSEE's output is interesting (edited for brevity and to account for line
wrapping in fido messages) -
=======================================================================
DFSee OS2 version : 3.07 14-09-99, executing cmd: cmd fdisk /query

Drive Name  Partition Vtype FStype Status   Start     Size

    1 00000020    C:    1    07      2          0      203
    2 0000003f     :    3    00      0          0      200
    2 00064820    D:    2    07      0        201      299
    2 000fa820    E:    2    07      4        501     1999
    2 004e2820    F:    2    07      0       2501      452

DFS message: 7168 : no additional info available.

Opened object: -- --none--  u=00000000 x=00000000 this=00000000  
  Base=00000000
11/12/99 09:01:22 : Now use our own built-in diagnostic power ...
DFSee OS2 version : 3.07 14-09-99, executing cmd: part
Number of disks   : 2
Geometry for disk : 1  Cyl:  203 H: 64 S:32   Disksize : 00065800 =  
   203 Mb
Geometry for disk : 2  Cyl:  750 H:128 S:63   Disksize : 005C4900 =  
  2953 Mb
Disk 2: No MBR or other bootrecord found
Invalid signature in EBR 00096000
 Id 02=D: WARNING : Device geometry and CHS-beginsector do not match LBA 
  offset.
          Some possible causes are: Change in BIOS level or BIOS settings,
          changed EIDE of SCSI adapter (or firmware) with different LBA 
  mapping
          or an upgrade of DISK/SCSI device-drivers or filters (Fixpack ?).
          Or the partition-table has been corrupted, possibly by a Virus.
 Id 02=D: WARNING : Partition does not start on head-1 (cylinder boundary)
 Id 02=D: WARNING : Partition doesn't end on last head (cylinder boundary)
 Id 02=D: WARNING : Logical partition extends beyond extended-container
 Id 02=D: WARNING : Extended partition extends beyond extended-container
 Id 02=D: WARNING : Extended partition extends beyond end of the disk
+--+--+---+-----------------+--------+--------+-----------+--+--------+
|id|PD|Vol|Type, description|Format  |Creator |Label Info |BM| Size
Mb|+---+-----------------+--------+--------+-----------+----------+------+
|01| 1|>C:|Prim 07 Inst-FSys|HPFS    |OS2 20.0|OS2        |  |   203.0|
+--+--+---+-----------------+--------+--------+-----------+--+--------+
|02| 2|   |N-P/Log FreeSpace|-- -- --|-- -- --|- - - - - -|  |   402.0|
|02| 2| D:|Log  07 Inst-FSys|HPFS    |OS2 20.0|FIDOBASE   |  |   300.0|
|04| 2|   |N-P/Log FreeSpace|-- -- --|-- -- --|- - - - - -|  |  2452.1|
+--+--+---+-----------------+--------+--------+-----------+--+--------+
=======================================================================

FDISK shows the partitions in the layout as I would expect. Note that drive 2
has free space at the beginning of about 200MB, this is so I can place the
OS/2 partition there if the first HD ever fails. The first DISk is 200MB, the
second is 3GB.

DFSEE shows a bit more info, notice the different Geometry info for each DISK. 
BOTH were set up on the Adaptec HA at the same time. The partition layout on
the second HD was changed just after the NEC HA was installed.

DFSEE has a somewhat different picture of the second HD, it is saying that the 
partition marked as free space is double the size (400MB), and that it only
has 1 valid partition (D:) of 300MB (which is actually correct in size),
however its complainaing that the partitions are not cylinder aligned, hence
probably why it sees the remaining drive space as 1 large free area...

I now think I can figure out whats going on. About 5 months ago I changed the
SCSI HA from an Adaptec ISA card to an NEC based PCI card. Within 2 weeks I
also changed the last 2 partitions as far as SIZE were concerned, increasing
E:, and shrinking F:. To do this I copied everything off them, deleted the
last 2 partitions, re-allocated, re-booted and Formatted them, then copied
everything back. Its been running fine since then except for the situations
where the system is not shut down before it restarts (it normally runs 24x7). 

It looks like the drive mapping schemes used by each HA do not exactly match,
and this could be leading to confusion when partitions are changed size
initial set up and certain types of errors occur and CHKDSK has to recover
things.

I guess I will have to remove EVERYTHING off DRIVE 2, remove ALL partitions on 
that drive, Re-boot and then re-allocate them again. Hopefully this will fix
the problem by updating the new controller geometry info for ALL partitions. 

Thanks for the pointer, fortunately my blindness is only partial.......;-)

Cheers...........pk.


--- Maximus/2 3.01
772/1
* Origin: Another Good Point About OS/2 (3:772/1.10)

SOURCE: echoes via The OS/2 BBS

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.