Migrating to thin provisioning

The SmartMove™ feature enables migration from traditional LUNs to thinly provisioned LUNs, removing unused space in the process.

To migrate to thin provisioning

  1. Turn on the SmartMove feature. Edit the /etc/default/vxsf file so that usefssmartmove is set to all.

    usefssmartmove=all
  2. Add the new, thin LUNs to the existing disk group:

    # vxdisksetup -I da_name
    # vxdg -g datadg adddisk da_name

    where da_name is the disk access name in VxVM.

    If enclosure based naming (EBN) is enabled and the disk accesss name is displayed, enter:

    # vxddladm set naming scheme=ebn
  3. To identify thin LUNs, enter:

    # vxdisk -o thin list
  4. Add the new, thin LUNs as a new plex to the volume.

    NOTE: The VxFS file system must be mounted to get the benefits of the SmartMove feature.

    The following methods are available to add the LUNs:

    • Use the default settings:

      # vxassist -g datadg mirror datavol da_name
    • Use the options for fast completion. The following command has more I/O impact.

      # vxassist -b -oiosize=1m -t thinmig -g datadg mirror \
        datavol da_name
      # vxtask monitor thinmig
      TASKID  PTID TYPE/STATE    PCT     PROGRESS
      167          ATCOPY/R      00.34%  0/73400320/252416 PLXATT datavol datavol-02 datadg
      167          ATCOPY/R      00.35%  0/73400320/259840 PLXATT datavol datavol-02 datadg
      167          ATCOPY/R      00.36%  0/73400320/267264 PLXATT datavol datavol-02 datadg
    • Use the options for minimal impact. The following command takes longer to complete:

      # vxassist -oslow -g datadg mirror datavol da_name
  5. Optionally, test the performance of the new LUNs before removing the old LUNs.

    To test the performance, use the following steps:

    • Determine which plex corresponds to the thin LUNs:

      # vxprint -g datadg
      TY NAME         	     ASSOC   	       KSTATE   LENGTH     PLOFFS  STATE     TUTIL0 PUTIL0
      dg datadg       	     datadg      	   -        -          -       -         -       -
      dm THINARRAY0_02      THINARRAY0_02   -      	 83886080   -       -         -       -
      dm STDARRAY1_01	      STDARRAY1_01    -  	     41943040   -       -OHOTUSE  -       -
      
      v  datavol      	     fsgen        	  ENABLED 	41943040   -       ACTIVE    -       -
      pl datavol-01   	     datavol      	  ENABLED 	41943040   -       ACTIVE    -       -
      sd STDARRAY1_01-01    datavol-01   	  ENABLED 	41943040   0       -         -       -
      pl datavol-02   	     datavol      	  ENABLED 	41943040   -       ACTIVE    -       -
      sd THINARRAY0_02-01   datavol-02   	  ENABLED 	41943040   0       -         -       -

      The above output indicates that the thin LUNs corresponds to plex datavol-02.

    • Direct all reads to come from those LUNs:

      # vxvol -g datadg rdpol prefer datavol datavol-02
  6. Remove the original non-thin LUNs.

    Note:

    The ! character is a special character in some shells. This example shows how to escape it in a bash shell.

    # vxassist -g datadg remove mirror datavol \!STDARRAY1_01
    # vxdg -g datadg rmdisk STDARRAY1_01
    # vxdisk rm STDARRAY1_01
  7. Grow the file system and volume to use all of the larger thin LUN:

    # vxresize -g datadg -x datavol 40g da_name