Determine size of a raw device in Unix Solaris

September 8, 2009

Log on to the server

$ devinfo -i /dev/md/rdsk/d301
/dev/md/rdsk/d301 0 0 16384 512 1 <-- This is the block size
$ devinfo -p /dev/md/rdsk/d301
/dev/md/rdsk/d301 55 c12d 16384 524288 0 0 <-- this is the device size in blocks

To calculate the device size in bytes, you need both bits of information obtained from the above commands as follows:

Device size = ( (524288 / (1024 / 512) ) / 1024 = 256MB

tags: , , , ,
posted in ase by Carsten

 
Powered by Wordpress and MySQL. Theme by Shlomi Noach, openark.org