How to Migrate SMB Filesystems

To migrate SMB filesystems, observe the following requirements:

  • If Active Directory is used, then both the source system and the target system must be in the same AD domain.

  • Unlike NFS source filesystems, SMB systems require authentication to grant access. Therefore, the target system must be aware of the user account on the source system. Ensure also that the user has backup and restore privileges on the source system.

  • The SMB source must be using the SMB 2.0 protocol.

  1. Configure the same SMB user account on the target system to enable authentication to be processed between the source and target systems.

    Ensure that the password is persistent in the target system:

    • If the domain controller is configured to allow all NT Lan Manager (NTLM) pass-through authentication requests within the domain, use the smbadm add-key command to create the persistent password.

    • If the domain controller is configured to restrict all NTLM pass-through authentication requests, enable Kerberos caching. Then, use the kinit command to create a persistent password.

  2. Set the SMB source filesystem to have read-only permissions during the migration.
  3. Create the target file system while setting the shadow file to the file system to be migrated.

    Note:

    The new target ZFS file system must be completely empty. Otherwise, migration will not start.
    $ zfs create -o shadow=smb://user@host/path target
  4. To check the progress of the migration, use the shadowstat command.