Data Migration for Persistent Partitions

This release introduces an enhanced persistent partition workflow where persistent partition images are created by build-fs and flashed by the bootburn utility if --init-persistent-partitions is used. The work in the current release is not compatible with the previous releases of NVIDIA DRIVE® OS Linux including 6.0.4.0. If you have 6.0.4.0 filesystem flashed, updating the filesystem only updates the rootfs, but the data (although not erased) in the persistent partition is not usable for the current release. You can use the following steps to migrate your persistent data across releases.

Moving Data from Version 6.0.4.0 or Earlier to the Current Version

  • Setting Up to Migrate Data
    1. Enable a WAR in /usr/sbin/nv_init.sh script before it launches driveos-persistence.sh.
      #!/bin/bash
      ...
      export PS4='+(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'
       
      /bin/bash # <== Please add root shell HERE
       
      # Persistence service setup
      /bin/bash $DBG_OPTS /usr/sbin/driveos-persistence.sh
      sync
      ....
      systemctl --no-block isolate graphical.target || true
      
    2. Reboot the system.
    3. Wait for the root shell by pressing ENTER until you see the root prompt.
  • Migrating Persistent Metadata Partition
    1. Mount the persistent metadata partition.
      mkdir -p /tmp/tmp_mdata
      mount /dev/vblkdev1 /tmp/tmp_mdata
      mv /tmp/tmp_mdata/driveos/security/etc/ /tmp/tmp_mdata/
    2. Remove the old persistent partition directories after migration.
      rm -rf /tmp/tmp_mdata/driveos/security/
    3. Unmount the partition.
      umount /tmp/tmp_mdata
  • Migrating Persistent Data Partition
    1. Format data partition.
      mkfs.ext4 /dev/vlbkdev3 # (input y if any prompt comes up)
    2. Mount the persistent data partition.
      mkdir -p /tmp/tmp_data
      mount /dev/vblkdev3 /tmp/tmp_data
    3. Move the data in the home directory.
      mv /home /tmp/tmp_data/
    4. Unmount the partition.
      umount /tmp/tmp_data
  • After Migration
    • Flash the NVIDIA DRIVE® platform with the 6.0.5.0 SDK.

Moving Data from Current Version to Version 6.0.4.0 or Earlier

  • Setting Up to Migrate Data
    1. Enable a WAR in /usr/sbin/nv_init.sh script before it launches driveos-persistence.sh.
      #!/bin/bash
      ...
      export PS4='+(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'
       
      /bin/bash # <== Please add root shell HERE
       
      # Persistence service setup
      /bin/bash $DBG_OPTS /usr/sbin/driveos-persistence.sh
      sync
      ....
      systemctl --no-block isolate graphical.target || true
    2. Reboot the system.
    3. Wait for the root shell by pressing ENTER until you see the root prompt.
  • Migrating Persistent Metadata Partition
    1. Mount the persistent metadata partition.
      mkdir -p /tmp/tmp_mdata
      mount /dev/vblkdev1 /tmp/tmp_mdata
      mkdir -p /tmp/tmp_mdata/driveos/security/
      mv /tmp/tmp_mdata/etc/ /tmp/tmp_mdata/driveos/security/
    2. Remove the old persistent partition directories after migration.
    3. Unmount the partition.
      umount /tmp/tmp_mdata
  • Migrating Persistent Data Partition
    To prepare the system persistent data migration,
    1. Flash NVIDIA DRIVE platform with 6.0.4.0 or an earlier version.
    2. Add a WAR in nv_init.sh to execute /bin/bash before running driveos-perisstence.sh.
    3. Reboot the system.
    4. Wait for the root shell by pressing ENTER until you see the root prompt.
    To migrate the data,
    1. Mount the persistent data partition.
      mkdir -p /tmp/tmp_data
      mount /dev/vblkdev3 /tmp/tmp_data
    2. Move the data in the home directory to the rootfs partition.
      mv /tmp/tmp_data/home/ /
    3. Unmount the partition.
      umount /tmp/tmp_data
    4. Remove WAR by deleting the line and adding the /bin/bash for the root shell.
  • After Migration
    • Reboot the system.