Didn't you check prtvtoc O/P? Let me know that as well. -Sriram
On 6/15/06, Sriram Narayanan <sriramnrn at gmail.com> wrote: > > Hi : > > Here's a Perl script that I tried, and which reports an incorrect > partition size. I've used code from /usr/foss/lib/site_perl/disk.pm > > use lib "/usr/foss/lib/site_perl"; > use disk; > > my $diskdrive = "c0d0"; > > my @diskDimensions = getDiskDimensions("c0d0"); > print STDOUT @diskDimensions; > my $bytes_sector = shift(@diskDimensions); > print STDOUT "\n bytes/sector : " ; > print STDOUT $bytes_sector; > my $sectorstart = getSectorstart($diskdrive); > print STDOUT "\n sector start : " ; > print STDOUT $sectorstart ; > > my $sectorcount = getSectorcount($diskdrive, $sectorstart); > print STDOUT "\n sector count : " ; > print STDOUT $sectorcount ; > > > my $partitionsize = ($sectorcount - > $sectorstart)*($bytes_sector)/(1024*1024); > print STDOUT "\n partition size : " ; > > print STDOUT $partitionsize ; > > > ==================== > > 51216065 > bytes/sector : 512 > sector start : 48195 > sector count : 11631060 > partition size : 5655.69580078125 > > ================== > As you see above, the partition size is calculated at some 5655 MB. > However, I've created via fdisk an approx 20 GB partition. > > Is there something wrong with these calculations ? Or is the prtvtoc > tool reporting incorrect values ? > > My OS is Belenix 0.4.3a > > -- Sriram > _______________________________________________ > ug-bosug mailing list > List-Unsubscribe: mailto:ug-bosug-unsubscribe at opensolaris.org > List-Owner: mailto:ug-bosug-owner at opensolaris.org > List-Archives: http://www.opensolaris.org/jive/forum.jspa?forumID=54 > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/ug-bosug/attachments/20060615/99a33b3d/attachment.html>