Mount File System (Windows)
NFS
Step 1. Install the NFS client
-
Log in to the Windows cloud host.
-
Click the
Startbutton in the lower left corner to open theServer Manager. -
Select
Add roles and features. -
Follow the prompts to install the NFS client. a. For
Before start,Installation type,Server selection, keep the default selection and click next.
b. In theServer Rolestab, checkFiles and Storage Services->Files and iSCSI Services-> NFS Serverand click next.
c. In theFeaturestab, checkNFS Clientand click next.
d. Click Install. -
Restart the cloud host.
-
Open the
Command Promptwindow, enter the commandmount. If the following information is outputted, it means the NFS client is installed.
Step 2. Mount the UFS file system
-
Open the
Command Promptwindow and enter the following command to mount the UFS file system.mount -o nolock -o mtype=hard -o timeout=10 \\mountpoint_ip\! Z:Please replace the
mountpoint_ipin the command according to the actual situation of the UFS file system mount point information on the console, and the local drive letterZcan also be replaced according to the actual demand. -
After the mount is successful, execute the
mountcommand again to check the mount result.Check if the mount type in the properties is
hard,timeouttime is10.0or above, andlockingisno. If not, it means the mount is abnormal. Please useumount Z:(modify the disk letter according to the actual situation) to unmount the file system, and refer to the above steps to re-mount. -
Double-click
This PCicon to view the shared file system. Create and delete files/folders in the shared file system to confirm its normal use.
Step 3. Set Up Automatic Mounting of the UFS File System
-
Create a mount script
auto_mount.batin theC:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUpdirectory of the cloud host, with the following script content.mount -o nolock -o mtype=hard -o timeout=10 \\mountpoint_ip\! Z:Please replace
mountpoint_ipin the command with the actual UFS file system mount point information on the console, and the local drive letterZcan also be replaced as needed. -
Create a mount task.
a. Click theStartbutton in the lower left corner to open theControl Panel.b. Click
System and Securityand selectScheduled Tasks.c. Click
Create Taskin the operation tab.
Set theNameinGeneraltab, checkRun whether user is logged on or not(if you are using Windows Server 2016, checkRun only when user is logged in), and checkRun with the highest privileges.Click
Newin theTriggerstab, setBegin the tasktoAt log on, and checkEnabledinAdvanced settings.Click
Newin theActionstab, setActiontoStart a program, select the scriptauto_mount.batcreated in step 1 inProgram or script, and click okay.Check
Start the task only if the following network connection is availablein theConditionstab, and selectAny connectionin the drop-down options.In the
Settingstab, uncheckAllow task to be run on demandandIf the task runs for a period longer than this, stop the task. CheckIf the task is still running when requested to stop, force it to stop. SelectDo not start a new instancein the drop-down ofIf the task is already running, the following rule applies. Click ok. -
Restart the cloud host and verify the result. a. Check the scheduled task status. If the following information is displayed, it means the task is executing normally.
b. Execute the
mountcommand in theCommand Promptwindow and check the mount information. Confirm whether themounttype ishard,lockingisno, andtimeoutis10or above. If the mount is normal, the parameters should look as follows.
SMB
Step 1. Environment preparation
-
Log in to the Windows cloud host.
-
For systems running Windows Server 2016 or later, you need to configure to allow anonymous client access. Execute the following command:
REG ADD HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\LanmanWorkstation\Parameters /f /v AllowInsecureGuestAuth /t REG_DWORD /d 1
Step 2. Mount the SMB file system
Command line mount
-
Log in to the Windows host, open a CMD window, and execute the following command to mount the SMB file system:
net use Z: \\18.0.0.1\share
The meanings of each parameter in the mount command are as follows:
| Parameter/Option Name | Description |
|---|---|
| Z | The target drive letter to be mounted on the current Windows system. If there is a conflict or multiple NAS file systems are mounted, the drive letter will be decremented in alphabetical order. |
- After successful mounting, execute the net use command to view the mount information.