Disk space requirements for online relayout of concat, striped and RAID-5 volumes

book

Article ID: 100031069

calendar_today

Updated On:

Description

Error Message

vxvm:vxassist: ERROR: Cannot allocate space for XXXXXXX block volume
vxvm:vxassist: ERROR: Relayout operation aborted. (7)

Resolution

Introduction

The online relayout feature available with VERITAS Volume Manager (tm) 3.x enables you to transform the layout of a volume from one form to another. It is also possible to change the number of columns and the stripe width of striped and RAID-5 volumes. This document details the disk space requirements for relayout operations on the above three types of volumes. It also discusses the variable parameters that may be used to influence the allocation of resources to the operation, thereby ensuring its success.


General disk space allocation guidelines

These are the general rules and guidelines that apply to striped and RAID-5 volumes and the way Volume Manager allocates space to these volumes.

1. All columns of a striped and RAID-5 volume are of the same size. In a striped volume, the size of a column is roughly equal to the size of the volume divided by the number of columns. In a RAID-5 volume, one column space is taken up by the parity. Therefore in a RAID-5 volume, the size of a column is roughly equal to the size of the volume divided by the number of data columns (that is, one less than the total number of columns).
2. Each column can be made up of one or more sub-disks. Sub-disks that form one column in the volume cannot use disks that are occupied by sub-disks that form another column in the same volume.


Temporary space required for relayout

Relayout operations require temporary disk space. This temporary space is allocated from the free space available in the disk group that contains the volume being relayed out, and is in the form of a mirrored (two-plex) sub-volume. The size of the temporary space mainly depends on the size and type of the volume being relayed out. The following table shows the default temporary space required by the relayout operation.

 
Volume SizeStriped VolumeRAID-5 VolumeConcat Volume
Size < 50MBTwice volume sizeTwice volume sizeTwice volume size
50MB <= Size < 500MB20% of volume size100MB100MB
500MB <= Size < 10GB20% of volume size20% of volume size20% of volume size
10GB <= Size2GB2GB2GB


Please note that the above table specifies the total temporary space required for the two plexes in the sub-volume. The actual sub-volume size is half of the numbers specified in the table. That is, to relayout a 5GB striped volume, the temporary sub-volume size would be 500MB. For the two plexes together, this equates to 1GB of space (20% of 5GB).


Non-temporary disk space requirements for common volume transformations

The following table shows the space requirements for common relayout transformations. These space requirements are in addition to the temporary disk space requirements shown above. For the sake of this discussion, concat volumes may be considered to be single column volumes.

 
Relayout typeSame number of columnsMore columnsFewer columns
Concat to Stripe (one column to many)-The sub-disks currently forming volume will get transformed to first column in striped volume. Additional columns will need other free disks, with each column occupying unique, non-intersecting set of disks.-
Concat to RAID-5 (one column to many)-The sub-disks currently forming volume will get transformed to first column in RAID-5 volume. Additional columns will need other free disks, with each column occupying unique, non-intersecting set of disks.-
Stripe to StripeIn some cases, a small amount of free space is necessary, as little as one cylinder per columnFor each new column to be formed, a set of disks with free space not already occupied by volume. The original columns will reduce in size.The columns retained after relayout will grow in size. The free space for column size increase must be available on the disks currently being used by those columns, or other unique disks in disk group.
Stripe to RAID-5Each column will grow in size. The disks currently used by columns must have free space, or other disks with free space must be available.Each column added will need free space on disks that are not already being used by the volume. The original columns may stay the same size or decrease in size, depending on the number of columns being added.The columns retained after relayout will grow in size. The free space for column size increase must be available on the disks currently being used by those columns, or other unique disks in disk group.
Stripe to Concat (many columns to one)--The first column of the volume will grow to accommodate the full size of the volume. Free space on first column disks or on disks not occupied by the other columns of the striped volume.
RAID-5 to RAID-5In some cases, a small amount of free space is necessary, as little as one cylinder per columnFor each new column to be formed, a set of disks with free space not already occupied by volume. The original columns will reduce in size.The columns retained after relayout will grow in size. The free space for column size increase must be available on the disks currently being used by those columns, or other unique disks in disk group.
RAID-5 to StripeEach column will reduce in size. No extra disk space required.Each column added will need free space on disks that are not already being used by the volume. The original columns will reduce in size.The columns retained after relayout may stay the same size or grow in size, depending on the number of columns being reduced. The free space for any column size increases must be available on the disks currently being used by those columns, or other unique disks in disk group.
RAID-5 to Concat (many columns to one)--The first column of the volume will grow to accommodate the full size of the volume. Free space on first column disks or on disks not occupied by the other columns of the RAID-5 volume.


The following table shows indicative disk space requirements for some sample relayout operations.

 
Relayout operationTemporary disk space (2 plex)Disk space for volume (minimum)
Concat volume of size 6GB, all on disk disk01. Relayout to 3-column striped volume.600MB + 600MBEach column in striped volume will be 2GB in size. At least 2 disks (other than disk01), each with 2GB free space.
Concat volume of size 6GB, all on disk disk01. Relayout to 3-column RAID-5 volume.600MB + 600MBEach column in RAID-5 volume will be 3GB. At least 2 disks (other than disk01), each with 3GB free space.
12GB 3-column striped volume. Disks disk01, disk02 and disk03 occupied by each of the 3 columns. Relayout to 4-column striped volume.1GB + 1GBEach column will be 3GB. At least one disk (other than disk01, disk02 or disk03) with 3GB free space.
12GB 4-column striped volume on disks disk01, disk02, disk03 and disk04. Relayout to 3-column striped volume.1GB + 1GBFirst three columns in volume will grow in size from 3GB to 4GB. Disks disk01, disk02 and disk03 must have 1GB free space. Any space shortfall must be met by disks in disk group other than disk04.
1GB 3-column RAID-5 volume on disks disk01, disk02 and disk03. Relayout to concat volume.100MB + 100MBFirst column in volume will grow from 500MB to 1GB. Disk disk01 must have 500MB free space. Any space shortfall must be met by disks in disk group other than disk02 and disk03.



Appearance of a volume during relayout

During a relayout operation, a number of additional Volume Manager objects are created for the volume. These additional objects are temporary in nature and will disappear upon successful completion of the operation. Here is an example of a volume being relayed out:

The volume vol01 is a three-column striped volume of size 1200MB.

 

The following command is issued to relay out the volume to 4 columns.

 

During the relayout, this is the appearance of the volume vol01.

 

After the completion of the operation, vol01 is a four-column striped volume.

 


Variables that affect space allocation during relayout

There are a number of options available with the vxassist command that influence the size and allocation of the temporary space as well as the allocation of space to the data volume. The options are:

1. tmpsize=temporary-space-size
The tmpsize option is useful when the default temporary space for the relayout is not available in the disk group. Note that this option specifies the size of the sub-volume (that is, for one plex, not the total temporary space indicated in the table above, which is for two plexes).

2. tmpalloc=disk1,disk2,...
This option allows you to specify the disks that would be used to allocate temporary space.

3. alloc=disk1,disk2,...
The alloc option specifies the disks to use for the allocation of space to the volume.


Some sample problems and resolutions

Case 1:

The volume vol01 is a 34GB two-column striped volume.

 

The free space in the diskgroup is as follows.

 

The volume is to be relayed out to three columns. The following command is issued to perform the relayout.

 


Analysis and resolution

The relayout fails due to lack of space for the temporary sub-volume. Based on the table above, the relayout will try to allocate 2GB of space to the temporary space, in the form of a two-plex 1GB sub-volume (from the error message, 2096640 sectors is roughly 1GB). This space is not available in the disk group. One possible solution is to specify a smaller temporary space size. In this example, if this is specified to be 367696 sectors (183848 sectors on disk01 + 183848 sectors on disk02), the relayout will commence.

 

Please note that the total temporary space used for this relayout would be 735392 sectors (367696 sectors for each plex, so 367696 * 2 = 735392). One plex will consist of two sub-disks, one each on disk01 and disk02. The second plex will consist of one sub-disk on disk03.

Case 2:

Volume vol01 is a two-column striped volume of size 34.175GB.

 

The free space in the diskgroup is as follows.

 

Upon trying to relayout the volume to three columns, the command fails with an error message.

 

Analysis and resolution

The relayout operation fails to run since there is no space available for the temporary two-plex sub-volume. Only one disk in the disk group has free space. There are two ways to resolve this problem. One is to add an extra disk to the disk group. The second option is to try and shrink the volume (and VERITAS File System file system) so that some free space will become available on disk01 and disk02. This will enable the relayout operation to create the temporary sub-volume and commence successfully.

In this example, the volume (and file system) has been reduced in size, thereby freeing up some working space for the relayout.

 

From the disk group free space output, it is clear that the default temporary space of 2GB (spread over two plexes) is still not available. Therefore, by specifying the tmpsize attribute, the relayout operation can be made to commence. In this case, the tmpsize is specified as 2096416 disk sectors. This results in one plex of the temporary sub-volume using disk01 and disk02, and the second plex using disk03.

 

Case 3:

vol01 is a three-column striped volume of roughly 48GB size. The diskgroup also contains a second volume, vol02. The details for the diskgroup are as follows.

 

The diskgroup free space is shown below.

 

It is required to relayout the volume vol01 to 4 columns.
Upon issuing the relayout command, it fails with the error message shown below.

 

Analysis and resolution

The relayout of vol01 requires 2GB of temporary space spread over two plexes. One plex of the temporary space is formed on disk04. However, that is the disk vol01 needs to add the fourth column, which has to be 25315840 sectors (just over 12GB) in size. Disk disk04 cannot accommodate the new column as well as the temporary space of 1GB. The relayout can be made to succeed by specifying disk01 and disk02 (or disk03) for the temporary space and the size equal to what is available on those disks.

 

Case 4:

vol01 is a three-column striped volume of size 18GB in a disk group consisting of only three disks.

 

This volume needs to be relayed out into a concat volume. The free space in the disk group is as follows.

 

On issuing the relayout command, this is the error message returned.

 

Analysis and resolution

Each column of the striped volume is 6GB in size. The first column of the volume needs to grow by 12GB to the full volume size, that is 18GB. The space for this growth must be available on the disk or disks occupied by the first column, or other disks in the disk group not being occupied by the second and third column. The only space available that satisfies this criteria is the space on disk01. However, this available space is less than 12GB (11GB).
For the relayout to succeed, another disk could be added to the disk group. Alternatively, shrink the volume (and VERITAS File System file system) to under 17GB (the size of disk01) and then attempt the relayout.
In this case, shrink the volume to 17GB and then try the relayout again.

 

Inspite of reducing the volume size to 17GB (please note that if a VERITAS File System file system is present on the volume, use the vxresize command to shrink the file system and volume, instead of the vxassist shrinkby command shown above, which only reduces volume size) the relayout does not succeed. This is contrary to our expectations, based on the disk space requirements discussed previously. The reason for the failure this time is the temporary space being used by the relayout. The temporary space is probably using up 1GB each on disk01 and another disk. Therefore, there is no space left on disk01 for the first column to grow to 17GB. This new problem is circumvented by specifying the disks to use for temporary space, as follows.

 

Case 5:

In this example, a small 26MB concat volume needs to be converted to a RAID-5 volume. The concat volume consists of two sub-disks, each sub-disk lying on a separate disk. Thus, two of the three disks in the disk group are used by the volume.

 

When the command to relayout the volume to a three-column RAID-5 volume is issued, it fails with an error message.

 

Analysis and resolution

Since we are converting to a three-column RAID-5 volume, each column needs to be on a unique set of disks. The existing sub-disks of the concat volume will be converted to the first column in the RAID-5 volume. However, there is only one other free disk, disk03, available for the other two columns. Since columns cannot share the same disks, the relayout fails.

There are two ways to address this problem. Add an extra disk to the diskgroup, or re-arrange the concat volume's sub-disks such that they both occupy the same disk.
In this example, we adopt the latter approach.

 

After creating a sub-disk on disk01 (disk01-02) of the requisite size and moving the sub-disk from disk02 (disk02-01) to the newly created sub-disk, the volume now occupies only one disk. The relayout to three-column RAID-5 volume will succeed now.


Summary

Using the above guidelines that apply to transformations from and to the basic volume types (concat, stripe and RAID-5), it is possible to extrapolate these and apply to relayout operations of more complicated volume layouts (like layered volumes). Please note that a companion function to relayout is also available. This is the vxassist convert operation, which changes layered volumes to non-layered and vice versa.
 

Issue/Introduction

Disk space requirements for online relayout of concat, striped and RAID-5 volumes