When using device creation commands, such as vxmake, an error is returned:
VxVM vxmake ERROR: Length for subdiskis not a multiple of the disk group alignment.
VxVM vxmake INFO: Subdisk length is <13422294> while disk group alignment is 16
This error is due to the diskgroup alignment size in vxvm 4.0. The alignment size for 4.0, by default is 16 blocks (8k). This size is set to accommodate Cross-Platform Data Sharing(CDS) capability. Unless specified otherwise, CDS is assumed when a new volume is created, thus the alignment size is set to 16 blocks. In earlier versions, the alignment size was set at 1 block, and was not visible.
This can create problems when using / moving devices within diskgroups.
Resolution
QOALQ6H Internal ID use only.
First, check if the 2 diskgroups have differing alignment sizes:
To compare 2 different diskgroups, use the following command:
vxdg list
Example: (also, notice the flag "cds")
Group: newdg
dgid: 1106270153.72.lab1
import-id: 1024.71
flags: cds <-------------
version: 110
alignment: 8192 (bytes)
ssb: on
detach-policy: global
copies: nconfig=default nlog=default
config: seqno=0.1042 permlen=1280 free=1275 templen=2 loglen=192
config disk Disk_4 copy 1 len=1280 state=clean online
log disk Disk_4 copy 1 len=192
Example:
Group: newdg1
dgid: 1106276811.60.lab1
import-id: 1024.59
flags:
version: 110
alignment: 512 (bytes)
ssb: on
detach-policy: global
copies: nconfig=default nlog=default
config: seqno=0.1044 permlen=1280 free=1275 templen=2 loglen=192
config disk Disk_4 copy 1 len=1280 state=clean online
log disk Disk_4 copy 1 len=192
Here, we can see the 2 differing alignment fields, one is set at 8192 bytes, the other at 512 bytes, reflecting the 8 kB -vs- 1 block difference.
If not utilizing the CDS feature, you can set the CDS to off, then change the alignment size of the diskgroup. The CDS feature must first be disabled for the diskgroup, or it will not allow you to change the alignment size.
Example:
#vxdg -gset cds=off
#vxdg -gset alignment=1
After these commands, the diskgroups' alignment should now show as 512 in the vxdg list
Example:
Group: newdg
dgid: 1106270153.72.lab1
import-id: 1024.71
flags:
version: 110
alignment: 512 (bytes)
ssb: on
detach-policy: global
copies: nconfig=default nlog=default
config: seqno=0.1042 permlen=1280 free=1275 templen=2 loglen=192
config disk Disk_4 copy 1 len=1280 state=clean online
log disk Disk_4 copy 1 len=192
Additional Information
QOVLUR4 Internal ID use only.
Example:
Create diskgroup, volumes, etc, in any earlier version of VxVM. (non-4.0)
Mirror volume.
Attach the mirror plex, allow to sync.
Detach one of the mirror plexes.
Upgrade to vxvm 4.0
Create new diskgroup, use pre-existing plex.
Here is where we would see the error. Once we try to associate the existing plex with a new diskgroup, the alignment mismatch will appear.
This could come up in several different instances. Some customers use their own scripted method of a "snapshot" by adding a 3rd plex to a mirrored volume, syncing the plex, detaching & creating a new diskgroup using this plex. They would then use the plex to create a new volume & diskgroup as means of a backup.
Product
VERITAS Volume Manager 4.1 Software
VERITAS Volume Manager 4.0 Software
VERITAS Storage Foundation 4.1 Software
VERITAS Storage Foundation 4.0 Software