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. Check if the SmartMove feature is enabled.
    # vxdefault list
    KEYWORD                        CURRENT-VALUE   DEFAULT-VALUE  
    usefssmartmove                 all             all       
    ...

    If the output shows that the current value is none, configure SmartMove for all disks or thin disks.

    See Configuring SmartMove .

  2. Add the new, thin LUNs to the existing disk group. Enter the following commands:
    # vxdisksetup -i da_name
    # vxdg -g datadg adddisk da_name

    where da_name is the disk access name in VxVM.

  3. To identify LUNs with the thinonly or thinrclm attributes, 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 for the vxassist command:

      # vxassist -g datadg mirror datavol da_name
    • Specify the vxassist command options for faster completion. The -b option copies blocks in the background. The following command improves I/O throughput:

      # vxassist -b -oiosize=1m -t thinmig -g datadg mirror \
        datavol da_name

      To view the status of the command, use the vxtask command:

      # vxtask list
      TASKID PTID TYPE/STATE    PCT   PROGRESS
      211         ATCOPY/R 10.64% 0/20971520/2232320 PLXATT vol1 vol1-02 xivdg smartmove
      212         ATCOPY/R 09.88% 0/20971520/2072576 PLXATT vol1 vol1-03 xivdg smartmove
      219         ATCOPY/R 00.27% 0/20971520/57344 PLXATT vol1 vol1-04 xivdg smartmove
      # vxtask monitor 211  
      TASKID PTID TYPE/STATE    PCT   PROGRESS
      211         ATCOPY/R 50.00% 0/20971520/10485760 PLXATT vol1 vol1-02 xivdg smartmove
      211         ATCOPY/R 50.02% 0/20971520/10489856 PLXATT vol1 vol1-02 xivdg smartmove
      211         ATCOPY/R 50.04% 0/20971520/10493952 PLXATT vol1 vol1-02 xivdg smartmove
      211         ATCOPY/R 50.06% 0/20971520/10498048 PLXATT vol1 vol1-02 xivdg smartmove
      211         ATCOPY/R 50.08% 0/20971520/10502144 PLXATT vol1 vol1-02 xivdg smartmove
      211         ATCOPY/R 50.10% 0/20971520/10506240 PLXATT vol1 vol1-02 xivdg smartmove
    • Specify the vxassist command options to reduce the effect on system performance. 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 example output indicates that the thin LUN 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