Sunday, May 24, 2009

Solution 217667 : VxVM - Unable to mirror a striped volume using 'vxassist' command

When attempting to grow a volume with a striped plex to a single disk with ample free space, vxassist complains that there is not enough space to perform the operation.

Here are the details of a generic case.

Start with a volume containing at least one striped plex:

  # vxprint -ht
V NAME RVG KSTATE STATE LENGTH READPOL PREFPLEX UTYPE
PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE
SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF DEVICE MODE
  v  vol01     -        ENABLED  ACTIVE   105906176 SELECT    -        fsgen
pl vol01-01 vol01 ENABLED ACTIVE 105907104 STRIPE 3/128 RW
sd disk01-01 vol01-01 disk01 0 35302304 0/0 c4t3d0 ENA
sd disk02-01 vol01-01 disk02 0 35302304 1/0 c4t7d0 ENA
sd disk03-01 vol01-01 disk03 0 35302304 2/0 c4t23d0 ENA

and another disk with free space on which to mirror it:

  # vxdg -g ckdg free
DISK DEVICE TAG OFFSET LENGTH FLAGS
disk09 c5t34d0s2 c5t34d0 0 143328960 -

However, when an attempt is made to mirror this volume using this disk, it fails with this error:

  # vxassist -g ckdg mirror vol01 alloc=disk09
vxvm:vxassist: ERROR: Cannot allocate space to mirror 105906176 block volume

Resolution
The reason is that when mirroring a striped plex, the 'vxassist' command wants to create *another* striped plex as the mirror, by default. So, the command is failing not because there was not enough space to mirror it, but because there was not enough disks specified to create another striped plex.


To actually get vxassist to do what you want, that is, to mirror the striped plex to a new concat plex, you must use the 'layout=nostripe' option as well. Therefore, the command

  # vxassist -g ckdg mirror vol01 layout=nostripe alloc=disk09

will actually complete.

No comments:

Post a Comment