bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Reported partition sizes


From: Neal H Walfield
Subject: Reported partition sizes
Date: Thu, 9 Nov 2000 22:53:07 -0500
User-agent: Mutt/1.2i

I was fooling around with device_get_status and wrote a small program to
probe my hard drive.   The results were not as expected.  Here is the
output from GNU/Linux (using cfdisk):

Disk Drive: /dev/hda
Size: 8455200768 bytes
Heads: 255   Sectors per Track: 63   Cylinders: 1027

   Name  Part Type    FS Type  Size (MB)
-----------------------------------------
   hda1   Primary   Linux ext2 987.04
   hda2   Primary   Linux ext2 987.04
   hda3   Primary   Linux ext2 987.04
   hda5   Logical   Linux ext2 987.04
   hda6   Logical   Linux ext2 987.04
   hda7   Logical   Linux ext2 987.04
   hda8   Logical   Linux ext2 987.04
   hda9   Logical   Linux ext2 987.04
   hda10  Logical   Linux      551.10


As one can see, I should be able to mount all of the devices under
the hurd.  From gnumach, this is not a problem.  The results
from probing hd0 are as follows:

# ./dev_probe hd0 hd0s1 hd0s2 hd0s3 hd0s4 hd0s5 hd0s6 hd0s7 hd0s8 \
> hd0s9 hd0s10
hd0:
  record size: 512 bytes
  device size: 3967 megabytes
hd0s1:
  record size: 512 bytes
  device size: 941 megabytes
hd0s2:
  record size: 512 bytes
  device size: 941 megabytes
hd0s3:
  record size: 512 bytes
  device size: 941 megabytes
hd0s4:
  record size: 512 bytes
  device size: 0 megabytes
hd0s5:
  record size: 512 bytes
  device size: 941 megabytes
hd0s6:
  record size: 512 bytes
  device size: 941 megabytes
hd0s7:
  record size: 512 bytes
  device size: 941 megabytes
hd0s8:
  record size: 512 bytes
  device size: 941 megabytes
hd0s9:
  record size: 512 bytes
  device size: 941 megabytes
hd0s10:
  record size: 512 bytes
  device size: 525 megabytes

First, we see that hd0 is reported as 4GB. . . strange.  Well, what
is the size of size_t?  32 bits!  Next, the logical partition, hd0s4
is reported as having a size of 0.

Under oskit-mach, the results were different:

# ./dev_probe hd0 hd0s1 hd0s2 hd0s3 hd0s4 hd0s5 hd0s6 hd0s7 hd0s8 \
> hd0s9 hd0s10
hd0:
  record size: 512 bytes
  device size: 3967 megabytes
hd0s1:
  record size: 512 bytes
  device size: 941 megabytes
hd0s2:
  record size: 512 bytes
  device size: 941 megabytes
hd0s3:
  record size: 512 bytes
  device size: 941 megabytes
hd0s4:
  record size: 512 bytes
  device size: 1136 megabytes
hd0s5:
  record size: 512 bytes
  device size: 941 megabytes
hd0s6:
  record size: 512 bytes
  device size: 941 megabytes
hd0s7: device unknown
hd0s8: device unknown
hd0s9: device unknown
hd0s10: device unknown

Here, the drive is again labeled as 4GB.  However, any partition that
starts after the 4GB line is not initialized.  Note, that hd0s6 which
crosses the 4GB boundary, can be mounted.  Additionally, the logical
partition size is the amount left until the 4GB boundary.

dev_probe.c is attached.

-Neal

-- 
Neal H Walfield
University of Massachusetts at Lowell
neal@walfield.org or neal@cs.uml.edu

Attachment: dev_probe.c
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]