Professional Documents
Culture Documents
Nutanix, Inc.
Introduction...............................................................................................................................6
Audience...........................................................................................................................................6
Purpose..............................................................................................................................................6
Pre-requisites.....................................................................................................................................6
https://portal.nutanix.com/#/page/docs/details?targetId=Web-Console-Guide-Prism-v56:sto-metro-
availability-witness-create-t.html....................................................................................................12
Create Mounts...................................................................................................................................15
Appendix..................................................................................................................................17
Troubleshooting..............................................................................................................................17
Command Reference.......................................................................................................................18
Useful Commands.............................................................................................................................18
About Nutanix.........................................................................................................................19
This document outlines the migration process for SMB/NFS data on to an existing AFS Server,
including creation of mount-targets (shares/exports), copying files to the newly created mount-targets,
preserving file attributes, permissions, and timestamps.
This document is intended for Nutanix Services Consultants who have some prior file server appliance
experience.
Purpose
This document is meant to provide guidance on how to implement Acropolis File Services on a
Nutanix cluster, create mount targets, and migrate data.
Pre-requisites
The following items are pre-requisites prior to migrating from a SMB/NFS File Server to a Nutanix
AFS Server:
1. AOS 5.1.1. or later for SMB / AOS 5.5 or later for NFS
2. AFS 2.1.1 or later for SMB / AFS 3.0.0 or later for NFS
3. The creation of the AFS file server via the Prism interface.
4. A Windows VM (Windows 2012 R2 recommended) that has access to the SMB source being
migrated and access to the AFS Server. The AFS Migration Services tools will be loaded on
and run from this VM.
5. A Linux VM (CentOS 7 with 4.x kernel recommended) with an IP address that has export
permissions to the NFS filesystems to be migrated, and access to the exports on the AFS
Server.
6. Adequate network connectivity between the SMB/NFS source and the AFS Server for file
transfers
7. Active Directory Account with read permissions across all CIFS shares to be migrated.
8. Active Directory or LDAP Account with read permissions across all NFS exports to be
migrated
9. The Nutanix cluster must have Authentication configured, pointing to a valid Active Directory
server
As noted in the pre-requisites, a Windows VM is required to run the requisite executables to create the
AFS shares and migrate the data from the legacy file server shares to the newly created AFS shares.
The Windows VM needs to have the following installed:
3. Open a PowerShell or Command prompt and change to the directory where the executables
have been unzipped or copied.
The fs_probe.exe is a tool to probe file servers for share information that can be used to create
shares on a Nutanix AFS instance. This tool is to be used by Nutanix Services.
fs_probe.exe :
The script will create a CSV formatted file of share information to pass to the fs_migrate.exe
tool.
** Note: The share CSV formatted file that is created using the fs_probe.exe documentation tool
will need to be edited manually to account for user home shares that need to be migrated under
another "HOME" share as a directory.
The fs_migrate.exe tool can be used to create shares based on the output file from the fs_probe.exe
tool and initiate migration from the source.
ALERT: fs_migrate maps a drive to a source share and a destination share on the AFS Server.
The tool is currently hard-coded to map a drive to “home” on the AFS Server because this default
share was created on AFS 2.x servers. AFS 3.0 does not create this share. Please create a
“home” share on the AFS server before proceeding with the fs_migrate execution. The share can
be either type of share.
Note: The tool is idempotent, i.e. you can rerun it again and it’ll skip the steps that have already been
configured.
* Note: The creation of the AFS file server via the Prism interface is required before running the
fs_migrate.exe to create shares and/or migrate data.
2. Using the Windows VM, navigate to the directory where the fs_migrate.exe exists
3. Update the CSV file that was the output of the executable to define the appropriate home share
configurations. Please split the file into separate wav-migration based csv’s. This file will be used
as input into the migration tool based on the number of waves.
Note: Please ensure to read all the instructions provided with the README.
4. Execute the following command. (See the README for list of parameters and help)
fs_migrate.exe -P migration_config.yml
The command will prompt for a password to connect to the cluster and then prompt for the
password of the domain account that has rights to join the AFS server to AD.
Password:
Note: The script has full restart capability. If the shares have already been created the script
notifies and skips those components and continues creating the components that do not exist.
5. Once the script completes, run through the AFS Migration test cases to validate that shares and
files have been copied correctly
Re-run the fs_migrate.exe script selecting only the options required to migrate shares as a final “sync”
copy before migrating users over to the new AFS shares.
Note: Shares should be configured as Everyone/Full Control and that all security be managed using
NTFS permissions on the file system underneath the share. Door is open for everyone, but they can
only access folders and files that they have access to. In NTFS world, you don't use share permissions.
The share permissions in the MS world are really only around still for the people sharing FAT file
systems that have no native file system permissions.
If the customer insists on retaining the source share permissions, please proceed with this section.
Below is a link to the PoSH script that can be used to migrate share level permissions.
https://gallery.technet.microsoft.com/scriptcenter/Migrate-Share-Permissions-eb9e9ec4
Download the script and run on the Windows VM that was used to migrate the shares.
Below is an example PowerShell script that can be used to change Active Directory user’s home
directory to a new location (such as when changing the hostname of the legacy file server to the AFS
Server name):
https://portal.nutanix.com/#/page/docs/details?targetId=Web-Console-Guide-Prism-v56:sto-metro-
availability-witness-create-t.html
*NOTE – 5.1.5 Witness VM must be utilized as it is a CentOS 6.x kernel. The CentOS 7.x
kernel currently has issues creating Top Level Directories on sharded home shares.
The Witness VM will deploy with a DHCP address
Follow step 5 of the deployment documentation to apply a static IP address if needed
Combine nfsstat -m output from all clients to create a table of exports to migrate.
Table should include the source hostname/IP, export path, NFS Version, security style.
Combine exports from multiple NFS Servers, if needed, to create a table of exports to migrate.
Table should include the source hostname/IP, export path, NFS Version, security style
Note – this method makes it difficult to identify what NFS Clients have the filesystem
mounted, if as in the example, the exports are broad to a subnet or just wide-open.
Extract Tools
Create Mounts
mount -a
Edit the /home/nutanix/wave1.sh and wave2.sh files to split up the migration file systems
between waves.
Add an entry for each src/dst pair to be migrated.
The recommended syntax is documented in the comments of the wave scripts. See the appendix
for detailed breakdown of the switches utilized.
Edit /etc/crontab to modify the schedule of the baselines and the updates.
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
Once all NFS Exports in a single wave are running with delta updates, they can be scheduled for
cutover.
The cutover requires unmounting the filesystem from the NFS Clients, updating the filesystems for
one last sync, and finally mounting the AFS mount-targets on the NFS client. This is done by editing
the associated clients mount file (fstab, vfstab, mounts, etc.) to reflect the AFS Server as the mount
target. When transitioning from NFSv3 to NFSv4, it is also necessary to modify the ostype in the
mount file.
Troubleshooting
1 File Server fails to join domain Click on the file server in Prism, select “Join
Domain” and re-enter AD credentials
3 File Server Create fails with Ensure the internal network has at least 4 IPs
error: “Error: Not enough IP available in the defined ip address pool and the
addresses available in the external network has at least 3 IPs available in the
network selected with uuid defined ip address ippool
14636129-3d47-4d7d-92d1-
cf2b66cdfb00.”
4 2016/11/08 05:35:36 ERROR Ensure that a share to be migrated from the legacy
1326 (0x0000052E) Accessing file server is mapped using credentials that have
Command Reference
Useful Commands
afs info.fileservers