--- title: "Migrate PVs from VAST CSI Driver 2.0.x to 2.x" slug: "migrate-pvs-from-vast-csi-driver-20x-to-2x-2-4" updated: 2026-10-28T02:14:51Z published: 2026-10-28T02:14:51Z canonical: "docs.vastdata.com/migrate-pvs-from-vast-csi-driver-20x-to-2x-2-4" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.vastdata.com/llms.txt > Use this file to discover all available pages before exploring further. # Migrate PVs from VAST CSI Driver 2.0.x to 2.x You have to migrate Kubernetes persistent volumes (PVs) that were created with VAST CSI Driver 2.0.x and earlier to be able to use the PVs with VAST CSI Driver 2.x. Each PV created with VAST CSI Driver versions 2.1.0 and later has the following parameters in its `volumeAttributes` configuration entry: - `root_export`. This is the path within the VAST cluster where the volume directory is created. - `vip_pool_name`. This is the name of the VAST virtual IP pool to be used when mounting the volume. - `mount_options`. This parameter lists custom NFS mount options to be used when mounting the volume. If no custom mount options are needed, the parameter is specified with an empty value (''). PVs created with earlier versions of VAST CSI Driver do not have these attributes and thus cannot be mounted with VAST CSI Driver 2.1.0 or later for Kubernetes pods. To add the missing attributes to PVs created with pre-2.1.0 versions of VAST CSI Driver, download and run the PV migration script provided by VAST. ## Running the PV Migration Script Run the PV migration script `migrate-pv.py` as part of the procedure to migrate your environment from VAST CSI Driver 2.0.x or earlier to VAST CSI Driver 2.1.1. The PV migration script adds `root_export` and `vip_pool_name` attributes to Kubernetes persistent volumes (PVs) created with VAST CSI Driver 2.0.x or earlier. After running this script, VAST CSI Driver 2.1.1 is able to mount the updated PVs for Kubernetes pods. VAST recommends running the PV migration script before you remove the old version of VAST CSI Driver to let the script automatically determine and set proper `root_export, ``vip_pool_name` and `mount_options` values. However, you can choose to run the script after having removed the old version of VAST CSI Driver and installed VAST CSI Driver 2.1.1. In this case, you have to specify the `root_export`, `vip_pool_name` and `mount_options` values manually. Complete these steps: 1. Download the PV migration script from the VAST GitHub space: ```plaintext wget https://raw.githubusercontent.com/vast-data/vast-csi/v2.1/scripts/migrate-pv.py ``` 2. Run the script on a host where `kubectl` is already installed and configured with the target Kubernetes cluster. - If the old version of VAST CSI Driver has not been removed yet, use the following syntax: ```plaintext migrate-pv.py [--vast-csi-namespace=''] ``` Specify the `--vast-csi-namespace` parameter if the namespace of the old version of VAST CSI Driver is not *vast-csi*. For example: ```plaintext >> python3 ./migrate-pv.py --vast-csi-namespace='kube-system' ``` - If you have removed the old version of VAST CSI Driver and installed VAST CSI Driver 2.1.1, use the following syntax: ```plaintext migrate-pv.py --force --root_export= --vip_pool_name= ``` Where: - `--force` is a required parameter that indicates that the script is run after you have removed the old version of VAST CSI Driver and installed VAST CSI Driver 2.1.1. - `--root_export` identifies the storage path that was provided when the old version of VAST CSI Driver was deployed. This is the value you supplied at the “NFS Export Path” prompt. - `--vip_pool_name` identifies the virtual IP pool to be used for the PVs. Specify a virtual IP pool that has been defined in VAST Cluster. It does not have to be the same as in the original deployment. - `--mount_options` specifies custom NFS mount options. Enter a comma-separated list of options. Specify '' (empty string) if none are needed. For example: ```plaintext >> python3 ./migrate-pv.py --force --root_export=/data/k8s --vip_pool_name=vippool-1 --mount_options='' ``` 3. Verify that the script output is similar to the following: ```plaintext info: PV updated. info: Done. ``` > [!NOTE] > Note > > If an error was found in the user-supplied parameters, rerun the script with correct values specified.