[parted-devel] Wrong logical sector size/geometry of DASD disks

Petr Uzel petr.uzel at suse.cz
Thu Mar 20 14:53:25 UTC 2014


Hello,

on IBM System z, parted reports confusing disk geometry and logical
sector size for ECKD DASD disks.


linux:~ # lsdasd | grep dasdb
0.0.0150   active      dasdb     94:4    ECKD  4096   7043MB    1803060

linux:~ # fdasd -p /dev/dasdb
reading volume label ..: VOL1
reading vtoc ..........: ok

Disk /dev/dasdb:
  cylinders ............: 10017
  tracks per cylinder ..: 15
  blocks per track .....: 12
  bytes per block ......: 4096
  volume label .........: VOL1
  volume serial ........: 0X0150
  max partitions .......: 3
[...]

linux:~ # parted -s /dev/dasdb unit cyl print
Model: IBM S390 DASD drive (dasd)
Disk /dev/dasdb: 80135cyl
Sector size (logical/physical): 512B/4096B
BIOS cylinder,head,sector geometry: 80136,15,12.  Each cylinder is 92.2kB.
Partition Table: dasd
Disk Flags:
[...]


Notice that parted reports the disk to have 512B logical block size, which
is however not correct (compare to fdasd output or /sys/block/dasdb/queue/logical_block_size).

This also means that the cylinder size reported by parted (80136) is incorrect:
8-times bigger than reality.

In _device_set_sector_size() I see that this 'faking' of logical
sector size on DASD disks is intentional and that internally, parted knows
the correct logical sector size and does the right thing.

784 #if defined __s390__ || defined __s390x__
785         /* Return PED_SECTOR_SIZE_DEFAULT for DASDs. */
786         if (dev->type == PED_DEVICE_DASD) {
787                 arch_specific->real_sector_size = dev->sector_size;
788                 dev->sector_size = PED_SECTOR_SIZE_DEFAULT;
789         }
790 #endif


But I fail to understand why/if it is needed and whether it could be
changed to make parted consistent with other tools/kernel.



Thanks,


        Petr

--
Petr Uzel
TL SUSE L3 Team 2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/parted-devel/attachments/20140320/c737859a/attachment.sig>


More information about the parted-devel mailing list