Actions
Bug #12510
closedprtvtoc columns are not wide enough for modern disks
Start date:
Due date:
% Done:
100%
Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
Description
As disks continue to grow in size, and virtual disks are increasingly common and increasingly large, the table output of prtvtoc
is no longer correctly aligned for all devices. We should widen the columns.
In addition, the prtvtoc
codebase has a number of quirks and minor errors presumably due at least in part to its age. We should remove the warning and smatch gags while we're there, and clean things up -- including the manual page!
Updated by Joshua M. Clulow about 2 years ago
Updated by Joshua M. Clulow over 1 year ago
Testing Notes¶
6TB Hard Drive¶
Old Output¶
odin # prtvtoc /dev/dsk/c1t3d0 * /dev/dsk/c1t3d0 partition map * * Dimensions: * 512 bytes/sector * 11721045168 sectors * 11721045101 accessible sectors * * Flags: * 1: unmountable * 10: read-only * * Unallocated space: * First Sector Last * Sector Count Sector * 34 222 255 * * First Sector Last * Partition Tag Flags Sector Count Sector Mount Directory 0 4 00 256 11721028495 11721028750 8 11 00 11721028751 16384 11721045134
New Output¶
odin # /var/tmp/prtvtoc !$ /var/tmp/prtvtoc /dev/dsk/c1t3d0 * /dev/dsk/c1t3d0 partition map * * Dimensions: * 512 bytes/sector * 11721045168 sectors * 11721045101 accessible sectors * * Flags: * 1: unmountable * 10: read-only * * Unallocated space: * First Sector Last * Sector Count Sector * 34 222 255 * * First Sector Last * Partition Tag Flags Sector Count Sector Mount Directory 0 4 00 256 11721028495 11721028750 8 11 00 11721028751 16384 11721045134
Diff¶
odin # diff -u /var/tmp/old.txt /var/tmp/new.txt --- /var/tmp/old.txt Fri Sep 11 17:18:04 2020 +++ /var/tmp/new.txt Fri Sep 11 17:18:09 2020 @@ -1,7 +1,7 @@ * /dev/dsk/c1t3d0 partition map * * Dimensions: -* 512 bytes/sector +* 512 bytes/sector * 11721045168 sectors * 11721045101 accessible sectors * @@ -10,11 +10,11 @@ * 10: read-only * * Unallocated space: -* First Sector Last -* Sector Count Sector -* 34 222 255 +* First Sector Last +* Sector Count Sector +* 34 222 255 * -* First Sector Last -* Partition Tag Flags Sector Count Sector Mount Directory - 0 4 00 256 11721028495 11721028750 - 8 11 00 11721028751 16384 11721045134 +* First Sector Last +* Partition Tag Flags Sector Count Sector Mount Directory + 0 4 00 256 11721028495 11721028750 + 8 11 00 11721028751 16384 11721045134
Only the whitespace has changed:
odin # diff -bu /var/tmp/old.txt /var/tmp/new.txt No differences encountered
15GB Virtual Disk¶
Old Output¶
oi0 # prtvtoc /dev/dsk/c5t0d0 * /dev/dsk/c5t0d0 partition map * * Dimensions: * 512 bytes/sector * 30720000 sectors * 30719933 accessible sectors * * Flags: * 1: unmountable * 10: read-only * * Unallocated space: * First Sector Last * Sector Count Sector * 34 222 255 * * First Sector Last * Partition Tag Flags Sector Count Sector Mount Directory 0 4 00 256 30703327 30703582 8 11 00 30703583 16384 30719966
New Output¶
oi0 # /var/tmp/prtvtoc /dev/dsk/c5t0d0 * /dev/dsk/c5t0d0 partition map * * Dimensions: * 512 bytes/sector * 30720000 sectors * 30719933 accessible sectors * * Flags: * 1: unmountable * 10: read-only * * Unallocated space: * First Sector Last * Sector Count Sector * 34 222 255 * * First Sector Last * Partition Tag Flags Sector Count Sector Mount Directory 0 4 00 256 30703327 30703582 8 11 00 30703583 16384 30719966
Diff¶
oi0 # diff -u /var/tmp/old.txt /var/tmp/new.txt --- /var/tmp/old.txt Fri Sep 11 12:22:42 2020 +++ /var/tmp/new.txt Fri Sep 11 12:22:46 2020 @@ -1,9 +1,9 @@ * /dev/dsk/c5t0d0 partition map * * Dimensions: -* 512 bytes/sector -* 30720000 sectors -* 30719933 accessible sectors +* 512 bytes/sector +* 30720000 sectors +* 30719933 accessible sectors * * Flags: * 1: unmountable @@ -10,11 +10,11 @@ * 10: read-only * * Unallocated space: -* First Sector Last -* Sector Count Sector -* 34 222 255 +* First Sector Last +* Sector Count Sector +* 34 222 255 * -* First Sector Last -* Partition Tag Flags Sector Count Sector Mount Directory - 0 4 00 256 30703327 30703582 - 8 11 00 30703583 16384 30719966 +* First Sector Last +* Partition Tag Flags Sector Count Sector Mount Directory + 0 4 00 256 30703327 30703582 + 8 11 00 30703583 16384 30719966
Only the whitespace has changed:
oi0 # diff -wu /var/tmp/old.txt /var/tmp/new.txt No differences encountered
Updated by Electric Monk over 1 year ago
- Status changed from New to Closed
- % Done changed from 0 to 100
git commit 51706d6c808d070acc209c5894e98814aa259ba6
commit 51706d6c808d070acc209c5894e98814aa259ba6 Author: Joshua M. Clulow <josh@sysmgr.org> Date: 2020-09-11T22:17:04.000Z 12510 prtvtoc columns are not wide enough for modern disks Reviewed by: Robert Mustacchi <rm@fingolfin.org> Approved by: Richard Lowe <richlowe@richlowe.net>
Actions