Go to main content

Transitioning From Oracle® Solaris 10 to Oracle Solaris 11.3

Exit Print View

Updated: December 2018
 
 

Migrating File System Data to ZFS File Systems

Consider the following suggested best practices for migrating data to systems that are running Oracle Solaris 11.

UFS to ZFS Data Migration Best Practices

    Follow these guidelines:

  • Do not mix UFS directories and ZFS file systems in the same file system hierarchy because this model is confusing to administer and maintain.

  • Do not mix NFS legacy shared ZFS file systems and ZFS NFS shared file systems because this model is difficult to maintain. Consider using only ZFS NFS shared file systems.

  • Use the shadow migration feature to migrate existing UFS data over NFS to ZFS file systems.

Migrating Data With ZFS Shadow Migration

You can use the ZFS shadow migration tool to migrate data from an existing file system to a new file system. A shadow file system is created and that file system then pulls data from the original source as necessary.

    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 and then does the following:

  • Creates an empty ZFS file system.

  • Sets 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, as shown in the following example:

    # zfs create -o shadow=nfs://system/export/home/ufsdata users/home/shadow2
  • Data from the file system to be migrated is copied over to the shadow file system. For step-by-step instructions, see Migrating ZFS File Systems in Managing ZFS File Systems in Oracle Solaris 11.3.

    Review the following considerations when migrating file systems:

  • The file system to be 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 reboot.

  • 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 to determine whether all of the ACL 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.

  • Monitor file system data migration with the shadowstat command.

Migrating UFS Data to a ZFS File System

You can also use the ufsrestore command to restore a previous ufsdump dump, as shown in the following example:

# mount -F nfs rsystem:/export/ufsdata /tank/legacyufs
# ls /tank/legacyufs
ufsdump-a
# zfs create tank/newzfs
# cd /tank/newzfs
# ufsrestore rvf /tank/legacyufs/ufsdump-a

If the original UFS file system data includes POSIX-draft ACLs, it is translated into NFSv4 ACLs. See Using Access Control Lists in Securing Systems and Attached Devices in Oracle Solaris 11.3.