rdashokraj
asked on
Converting Blocks to Size (in Solaris)
Hello,
Given below is the 'metastat' output of a mirrored volume. Having this output, how can I calculate the actual size of the volume in MB or GB? How can I determine the size of each block? Please let me know.
root@insitedb1# metastat d1
d1: Mirror
Submirror 0: d11
State: Okay
Submirror 1: d31
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 23164002 blocks <------------------------- ----
d11: Submirror of d1
State: Okay
Size: 23164002 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c1t0d0s1 0 No Okay
d31: Submirror of d1
State: Okay
Size: 23164002 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c1t3d0s1 0 No Okay
root@insitedb1#
root@insitedb1# prtvtoc /dev/rdsk/c1t0d0s1
* /dev/rdsk/c1t0d0s1 partition map
*
* Dimensions:
* 512 bytes/sector
* 107 sectors/track
* 27 tracks/cylinder
* 2889 sectors/cylinder
* 24622 cylinders
* 24620 accessible cylinders
*
* Flags:
* 1: unmountable
* 10: read-only
*
* First Sector Last
* Partition Tag Flags Sector Count Sector Mount Directory
0 2 00 0 9533700 9533699
1 3 01 9533700 23164002 32697701 <-------------------
2 5 00 0 71127180 71127179
3 7 00 32697702 28890000 61587701
4 0 00 61587702 9533700 71121401
6 0 00 71121402 2889 71124290
7 0 00 71124291 2889 71127179
root@insitedb1#
Thanks,
Ashok
Given below is the 'metastat' output of a mirrored volume. Having this output, how can I calculate the actual size of the volume in MB or GB? How can I determine the size of each block? Please let me know.
root@insitedb1# metastat d1
d1: Mirror
Submirror 0: d11
State: Okay
Submirror 1: d31
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 23164002 blocks <-------------------------
d11: Submirror of d1
State: Okay
Size: 23164002 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c1t0d0s1 0 No Okay
d31: Submirror of d1
State: Okay
Size: 23164002 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c1t3d0s1 0 No Okay
root@insitedb1#
root@insitedb1# prtvtoc /dev/rdsk/c1t0d0s1
* /dev/rdsk/c1t0d0s1 partition map
*
* Dimensions:
* 512 bytes/sector
* 107 sectors/track
* 27 tracks/cylinder
* 2889 sectors/cylinder
* 24622 cylinders
* 24620 accessible cylinders
*
* Flags:
* 1: unmountable
* 10: read-only
*
* First Sector Last
* Partition Tag Flags Sector Count Sector Mount Directory
0 2 00 0 9533700 9533699
1 3 01 9533700 23164002 32697701 <-------------------
2 5 00 0 71127180 71127179
3 7 00 32697702 28890000 61587701
4 0 00 61587702 9533700 71121401
6 0 00 71121402 2889 71124290
7 0 00 71124291 2889 71127179
root@insitedb1#
Thanks,
Ashok
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi Blu,
So the disk size of d1 volume is approx 11 GB. Please correct me if am wrong. Here's my calculation:
23164002 * 512 <-- Converting to Bytes
11859969024
11859969024/1024 <--- Converting to KB
11582001
11582001/1024 <---- Converting to MB
11310
11310/1024 <--------- Converting to GB
11
So the disk size of d1 volume is approx 11 GB. Please correct me if am wrong. Here's my calculation:
23164002 * 512 <-- Converting to Bytes
11859969024
11859969024/1024 <--- Converting to KB
11582001
11582001/1024 <---- Converting to MB
11310
11310/1024 <--------- Converting to GB
11
ASKER
Hi arthurjb,
The volume I specified (d1) is not shown in 'df' output since it is configured as swap device. I would like know exactly what is the size of swap device configured. Thats the reason, i want to convert the blocks into MB/GB.
root@insitedb1# swap -l
swapfile dev swaplo blocks free
/dev/md/dsk/d1 85,1 16 23163984 23157184
The volume I specified (d1) is not shown in 'df' output since it is configured as swap device. I would like know exactly what is the size of swap device configured. Thats the reason, i want to convert the blocks into MB/GB.
root@insitedb1# swap -l
swapfile dev swaplo blocks free
/dev/md/dsk/d1 85,1 16 23163984 23157184
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks a lot for your inputs
df -lk
If Solaris 9 and above;
df -lh
If they are not mounted, you can mount them on temporary mount points, its more accurate than doing the conversions manually...