How to calculate needed disk space in sectors for a striped volume
Article:TECH35417    Created: 20040112    Updated: 20100116    Article URL http://www.symantec.com/docs/TECH35417 
Issue
How to calculate needed disk space in sectors for a striped volume
Solution
When creating a stripe volume, the amount of space
available must be capable of containing the entire volume in complete stripe
blocks. This is a requirement. The formulas presented in this
TechNote will help with the creation of new striped volumes and when using the
Dynamic Relayout feature of VERITAS Storage Foundation (tm) for
Windows.
Example:
Four disk devices of equal size are presented to the operating system, 36,199,425,024 bytes, approximately 36.2 gigabytes. The goal is to create a striped volume using the default stripe size of 128 and the maximum amount of disk space available across all four disk devices. The first calculation needs to determine the total number of sectors on each disk device. To do this, take the size in bytes and divide by the total number of bytes per sector (512):
36,199,425,024 / 512 = 70,702,002 Sectors per disk device
Next, determine the total number of stripe blocks that will fit on this disk device. Take the total number of sectors per disk device and divide by the stripe size:
70,702,002 / 128 = 552,359.390625 Stripe blocks per disk device
Since only whole numbers are recognized, drop the remainder of the last computation, i.e. everything to the right of the decimal. This results in a total of 552,359 stripe blocks on this disk device.
Now compute how many sectors this number of stripe blocks will need. To do this, multiply the stripe blocks per disk device by the stripe size:
552,359 * 128 = 70,701,952 sectors required.
Lastly, determine the final size of the volume to be created in bytes. Simply multiply the sectors required (70,701,952), the total number of disk devices (4), and the bytes per sector (512):
70,701,952 * 4 * 512 = 144,797,597,696 final volume size. Use this value for the volume size when creating a new striped volume as it is optimized to the sectors and stripes per disk.
This information is useful in determining the volume size needed. However, when using the Dynamic Relayout feature, the volume has already been created and is being mirrored to a different layout. The formula to use in this scenario is different than what is presented above. To determine the needed size of the destination disk devices for the mirror, perform these calculations:
Total size of existing volume in sectors (282,808,008) divided by stripe size (128) = total number of sectors required (2,209,437.5625)
282,808,008 / 128 = 2,209,437.5625
Total number of sectors required (2,209,437.5625) / total number of columns for the stripe (4) = total number of sectors per column required (552,359.390625):
2,209,437.5625 / 4 = 552,359.390625
In this situation, the total number of sectors per column required must be a whole number or be less than the available space on the destination disk devices. If it is not less, then take the remainder (the value to the right of the decimal) of (total number of sectors per column required) and subtract that value from 1 to get the amount needed to complete the last stripe block:
(1)  The remainder of the total number of sectors per column required (0.390625) = percentage of total stripe block needed (0.609375)
1  0.390625 = 0.609375
The next step is to determine how many sectors must be added the disk devices in order to complete the last stripe block or add another column to the stripe set. The following formula will determine the total number of sectors needed to complete the last stripe block:
Percentage of total stripe block needed (0.609375) * stripe size (128) = actual number of extra sectors (78)
0.609375 * 128 = 78
This is the amount needed to complete the last stripe block on each disk device.
Example:
Four disk devices of equal size are presented to the operating system, 36,199,425,024 bytes, approximately 36.2 gigabytes. The goal is to create a striped volume using the default stripe size of 128 and the maximum amount of disk space available across all four disk devices. The first calculation needs to determine the total number of sectors on each disk device. To do this, take the size in bytes and divide by the total number of bytes per sector (512):
36,199,425,024 / 512 = 70,702,002 Sectors per disk device
Next, determine the total number of stripe blocks that will fit on this disk device. Take the total number of sectors per disk device and divide by the stripe size:
70,702,002 / 128 = 552,359.390625 Stripe blocks per disk device
Since only whole numbers are recognized, drop the remainder of the last computation, i.e. everything to the right of the decimal. This results in a total of 552,359 stripe blocks on this disk device.
Now compute how many sectors this number of stripe blocks will need. To do this, multiply the stripe blocks per disk device by the stripe size:
552,359 * 128 = 70,701,952 sectors required.
Lastly, determine the final size of the volume to be created in bytes. Simply multiply the sectors required (70,701,952), the total number of disk devices (4), and the bytes per sector (512):
70,701,952 * 4 * 512 = 144,797,597,696 final volume size. Use this value for the volume size when creating a new striped volume as it is optimized to the sectors and stripes per disk.
This information is useful in determining the volume size needed. However, when using the Dynamic Relayout feature, the volume has already been created and is being mirrored to a different layout. The formula to use in this scenario is different than what is presented above. To determine the needed size of the destination disk devices for the mirror, perform these calculations:
Total size of existing volume in sectors (282,808,008) divided by stripe size (128) = total number of sectors required (2,209,437.5625)
282,808,008 / 128 = 2,209,437.5625
Total number of sectors required (2,209,437.5625) / total number of columns for the stripe (4) = total number of sectors per column required (552,359.390625):
2,209,437.5625 / 4 = 552,359.390625
In this situation, the total number of sectors per column required must be a whole number or be less than the available space on the destination disk devices. If it is not less, then take the remainder (the value to the right of the decimal) of (total number of sectors per column required) and subtract that value from 1 to get the amount needed to complete the last stripe block:
(1)  The remainder of the total number of sectors per column required (0.390625) = percentage of total stripe block needed (0.609375)
1  0.390625 = 0.609375
The next step is to determine how many sectors must be added the disk devices in order to complete the last stripe block or add another column to the stripe set. The following formula will determine the total number of sectors needed to complete the last stripe block:
Percentage of total stripe block needed (0.609375) * stripe size (128) = actual number of extra sectors (78)
0.609375 * 128 = 78
This is the amount needed to complete the last stripe block on each disk device.

Legacy ID
272922
Article URL http://www.symantec.com/docs/TECH35417
Terms of use for this information are found in Legal Notices