Managing ZFS File Systems in Oracle® Solaris 11.2

Exit Print View

Updated: December 2014
 
 

Migrating ZFS File Systems

You can use the shadow migration feature to migrate file systems as follows:

  • A local or remote ZFS file system to a target ZFS file system

  • A local or remote UFS file system to a target ZFS file system

Shadow migration is a process that pulls the data to be migrated:

  • Create an empty ZFS file system.

  • Set the shadow property on an empty ZFS file system, which is the target (or shadow) file system, to point to the file system to be migrated.

  • Data from file system to be migrated is copied over to the shadow file system.

You can use the shadow property URI to identify the file system to be migrated in two ways:

  • shadow=file:///path – Use this syntax to migrate a local file system

  • shadow=nfs://host/path – Use this syntax to migrate a NFS file system

Review the following considerations when migrating file systems:

  • The file system to migrated must be set to read-only. If the file system is not set to read-only, in progress changes might not be migrated.

  • The target file system must be completely empty.

  • If the system is rebooted during a migration, the migration continues after the system is booted.

  • Access to directory content that is not completely migrated or access to file content that is not completely migrated is blocked until the entire content is migrated.

  • If you want the UID, GID, and ACL information to be migrated to the shadow file system during an NFS migration, make sure that the name service information is accessible between the local and remote systems. You might consider copying a subset of the file system data to be migrated for a test migration to see that all the information is migrated properly before completing a large migration of data over NFS.

  • Migrating file system data over NFS can be slow, depending on your network bandwidth. Be patient.

  • You can use the shadowstat command to monitor a file system migration, which provides the following data:

    • The BYTES XFRD column identifies how many bytes have been transferred to the shadow file system.

    • The BYTES LEFT column fluctuates continuously until the migration is almost complete. ZFS does not identify how much data needs to be migrated at the beginning of the migration because this process might be too time-consuming.

    • Consider using the BYTES XFRD and the ELAPSED TIME information to estimate the length of the migration process.