How to create a snapshot volume with a different volume layout
book
Article ID: 100023358
calendar_today
Updated On:
Description
Error Message
vxvm:vxassist: ERROR: Cannot allocate space to mirror 204800 block volume
Resolution
By default, the vxassist command creates a snapshot volume with the same layout as the original volume. But there are times when it is not desired or practical to create snapshot volumes with the same volume layout as the original volume.
The following example shows how to create a snapshot volume with a different volume layout.
In this example, vol6 is the volume that needs to create a snapshot volume. This volume (vol6) is a two-column striped volume (see vxprint output below):
root@phoenix / [306]:vxprint -htg robertdg vol6
...
dg robertdg default default 80000 1053001473.1156.milan.veritas.com
dm disk01 c1t3d0s2 sliced 3535 17914356 -
dm disk02 c1t4d0s2 sliced 3535 17914356 -
dm disk03 c1t8d0s2 sliced 3535 17914356 -
dm disk04 c1t10d0s2 sliced 2843 17915304 -
dm disk05 c1t2d0s2 sliced 3535 17914356-
v vol6 - ENABLED ACTIVE 204800 SELECT vol6-01 fsgen
pl vol6-01 vol6 ENABLED ACTIVE 206756 STRIPE 2/128 RW
sd disk05-01 vol6-01 disk05 0 103332 0/0 c1t2d0 ENA
sd disk04-03 vol6-01 disk04 1101576 103332 1/0 c1t10d0 ENA
The above output shows the size of the volume vol6 is 100MB and the volume layout is 2-column stripe with stripe unit128.
Here the goal is to create a snapshot volume using only one disk:disk05. That is, the snapshot volume layout will not be striped.
The first step is to make sure that disk05 has sufficient free disk space for creating a new sub-disk of size 206756 sectors for a snapshot volume. To check for free disk space, run the following command:
root@phoenix / [321]:vxdg -g robertdg free disk05
DISK DEVICE TAG OFFSET LENGTH FLAGS
disk05 c1t2d0s2 c1t2d0 0 17914356 -
The above vxdg command output shows that disk05 has sufficient free disk space for creating a sub-disk of size 100MB.
If you run the following command tocreate a snapshot volume:
root@phoenix /[320]:vxassist -g robertdg snapstart vol6 alloc="disk05"
it fails with the following error:
vxvm:vxassist: ERROR: Cannot allocate space to mirror 204800 block volume
This happens because, by default, the vxassist snapstart command uses the volume layout of the original volume (vol6) to create the snapshot volume. To make a snapshot volume with a volume layout different than the original volume, one more vxassist command attribute called "layout" needs to be used.
The following command creates a snapshot volume with a concat plex layout:
root@phoenix /[322]:vxassist -g robertdg snapstart vol6 layout=concat alloc="disk05"
The vxprint -htg output shows the snapshot volume plex has been created with the layout as expected:
root@phoenix /[323]:vxprint -htg robertdg vol6
...
v vol6 - ENABLED ACTIVE 204800 SELECT vol6-01 fsgen
plvol6-01 vol6 ENABLED ACTIVE 206756 STRIPE 2/128 RW
sddisk01-04 vol6-01 disk01 1282644 103332 0/0 c1t3d0 ENA
sddisk02-04 vol6-01 disk02 2126364 103332 1/0 c1t4d0 ENA
plvol6-02 vol6 ENABLED SNAPDONE 205716 CONCAT - WO
sddisk05-01 vol6-02 disk05 0 205716 0 c1t2d0 ENA
The next step is to run the vxassist snapshot command below to separate the plex vol6-02 from vol6 so a new snapshot volume is created.
root@phoenix / [325]:vxassist -g robertdg snapshot vol6
The vxprint -htg output below shows that there are two volumes(with different volume layouts) containing the same data (at the time the snap was taken):
root@phoenix / [326]:vxprint -htg robertdg vol6 SNAP-vol6
...
v SNAP-vol6 - ENABLED ACTIVE 204800 ROUND - fsgen
plvol6-02 SNAP-vol6 ENABLED ACTIVE 205716 CONCAT - RW
sddisk05-01 vol6-02 disk05 0 205716 0 c1t2d0 ENA
v vol6 - ENABLED ACTIVE 204800 SELECT vol6-01 fsgen
plvol6-01 vol6 ENABLED ACTIVE 206756 STRIPE 2/128 RW
sddisk01-04 vol6-01 disk01 1282644 103332 0/0 c1t3d0 ENA
sddisk02-04 vol6-01 disk02 2126364 103332 1/0 c1t4d0 ENA
Note if the layout of the volume to be snapshot is Raid5,a special license called Raid5 Snapshot is required.
To check if you are licensed for RAID5 snapshot, run vxdctl license and check for licensed features.
Example:
#vxdctl license | grep -i raid
RAID-5
RAID-5 Snapshot
or
run vxlicrep and look forRAID5SNAP.
Example:
#vxlicrep | grep -i raid
RAID5SNAP = Enabled
Issue/Introduction
How to create a snapshot volume with a different volume layout
Was this article helpful?
thumb_up
Yes
thumb_down
No