Operating System - HP-UX
1833924 Members
3109 Online
110063 Solutions
New Discussion

Size mismatch while interpreting output of diskinfo

 
SOLVED
Go to solution
Nikhil_1
Advisor

Size mismatch while interpreting output of diskinfo

The diskinfo command claims a certain 'size' in Kbytes.
This size does not match (blocks per disk * bytes per sector).

E.g. in following output

bash-2.05b# diskinfo -v /dev/rdsk/c2t6d0
SCSI describe of /dev/rdsk/c2t6d0:
vendor: SEAGATE
product id: ST32430W
type: direct access
size: 2097342 Kbytes
bytes per sector: 512
rev level: HP05
blocks per disk: 4194685
ISO version: 0
ECMA version: 0
ANSI version: 2
removable media: no
response format: 2
(Additional inquiry bytes: (32)30 (33)38 (34)34 (35)38 (36)35 (37)36 (38)32 (39)0 (40)0 (41)0 (42)0 (43)0 (44)0 (45)0 (46)0 (47)0 (48)0 (49)0 (50)0 (51)0 (52)0 (53)0 (54)0 (55)0 (56)0 (57)0 (58)0 (59)0 (60)0 (61)0 (62)0 (63)0 (64)0 (65)0 (66)0 (67)0 (68)0 (69)0 (70)0 (71)0 (72)0 (73)0 (74)0 (75)0 (76)0 (77)0 (78)0 (79)0 (80)0 (81)0 (82)0 (83)0 (84)0 (85)0 (86)0 (87)0 (88)0 (89)0 (90)0 (91)0 (92)43 (93)6f (94)70 (95)79 (96)72 (97)69 (98)67 (99)68 (100)74 (101)20 (102)28 (103)63 (104)29 (105)20 (106)31 (107)39 (108)39 (109)35 (110)20 (111)53 (112)65 (113)61 (114)67 (115)61 (116)74 (117)65 (118)20 (119)41 (120)6c (121)6c (122)20 (123)0 (124)40 (125)1 (126)7d (127)0 (128)0 (129)2 (130)0 (131)0 (132)0 (133)0 (134)0 (135)0 (136)0 (137)0 (138)0 (139)7f (140)7e (141)6 (142)20 )
bash-2.05b# diskinfo -b /dev/rdsk/c2t6d0
2097342


s1 = size = 2097342 Kbytes
s1 = 2147678208 bytes


s2 = bytes per sector * blocks per disk
s2 = 512 * 4194685
s2 = 2147678720

s2 - s1 = 512

My questions:
1. Is the "Kbytes" in "size:" field of 1024 bytes or 1000 bytes?
2. The "block" in "blocks per disk:" field is actually the "sector"?
If not, then what is a "block"?
3. Is s2 always greater than s1? i.e. the disk is actually of say
N blocks, but, some of those blocks (in above case 1?) are not
useable to store data, so size will be reported as N - k
(where k may be some blocks on the 1st platter 1st side used
by the harddisk for say keeping some information, extra sectors
so that bad sectors may be relocated etc.)
4. Why do s2 and s1 not match?
5. Have I interpreted the fields correctly above calculations?

Typically the drives will have something like bad sector relocation
(spare cylinders are kept so that they can be used in case one of the
cylinders goes bad). Does this account for the size difference between
s1 and s2?

 

 

P.S> This thread has been moevd from Disk to HP-UX > LVM and VxVM. - Hp Forum Moderator

2 REPLIES 2
Bill McNAMARA_1
Honored Contributor

Re: Size mismatch while interpreting output of diskinfo

uuugghh maths... ((((shudder)))

bad blocks will not be at that level, you'd see them on the PV level.

pvdisplay -v /dev/rdsk/c2t6d0

what does that say btw.

Kb is 1024

I get 4194684 blocks from my calc. Off by one on the diskinfo output. Try getting the diskinfo patch????

http://www4.itrc.hp.com/service/patch/patchDetail.do?patchid=PHKL_28131&context=hpux:800:11:00


then trying again:
but I guess it'd be more related to disk FW should that be a problem, although I'm not sure it is.. I've never paid much attention.


Later,
Bill
It works for me (tm)
Vincent Fleming
Honored Contributor
Solution

Re: Size mismatch while interpreting output of diskinfo

512 bytes = 1/2 Kbyte

The size in Kbytes is truncating the .5 Kbytes because it's not a floating-point number.

So, your actual size is 2097342.5 Kbytes, but it shows only 2097342 Kbytes.

-Vince
No matter where you go, there you are.