Create a Private SMB File Storage without Active Directory
Last updated
Last updated
Address
VNG CorporationTo create an SMB (Server Message Block) without Active Directory on the File Storage system, you can follow these steps:
Below is a basic guide for initializing Windows server on vServer, if you already have a server, skip this step.
Attention:
Security Groups on Windows server need to open the following ports to share data:
With NFS File Storage: open additional port 2049
With SMB File Storage with Basic Authentication: open additional port 445
With SMB File Storage with Active Directory Authentication: open additional port list to be able to connect from File Storage to AD.
Below is a basic guide for connecting to Windows server on vServer, if you have used Console directly on vServer Portal, please skip this step.
After you have connected to Windows server, you need to make sure your Windows server has a static IP address, you can check and configure static IP according to the following instructions:
Check the VM's network configuration by:
Go to Control Panel > Network & Internet > Network Connections .
Select the Ethernet adapter , right-click and select Properties .
Set up a static IP address:
In the Properties screen , select Internet Protocol Version 4 (TCP/IPv4) and then click the Properties button .
Select Use the following IP address to set up a static IP address.
Provide address information:
IP Address: static IP address of the VM.
Subnet Mask: Corresponding subnet, for example: 255.0.0.0
Step 1: Go to https://efs.console.vngcloud.vn/overview
Step 2: Select File Storage then select Create a File storage.
Step 3: At the File Storage initialization screen, you need to enter/select:
File Storage name: the descriptive name of the storage file. The file name must be between 5 and 50 characters long and can include the characters a-z, AZ, 0-9, '-', '_'
Description : enter a description for the storage file.
File storage type: select the type of drive you want to use. Currently we only provide Standard HDD drive type.
Protocol: select NFS and the NFS version you want
Tag: you can add tags to mark file storage as needed.
File Storage Max quota: in the file storage initialization step, you need to set a maximum quota limit for that file storage. This quota means the limit of storage capacity that the file storage can use, helping to manage resources effectively. The minimum quota you need to choose is 1 TB and the maximum quota we provide is 50 TB. If you need to use more than 50 TB for a file storage, please contact us.
Network type : for SMB file type, network type must be Private. At this point, you need to select VPC , Subnet that you have created from vServer Portal.
Window Authentication: configure access rights via Basic Authentication
Basic Authentication: If your Windows server does not have Active Directory or you want to manage access simply through username and password, you can use Basic authentication, we support you to create up to 10 username/password accounts to access file storage.
Step 5: Select Create File Storage.
Step 6: After the system has completed initializing the SMB File Storage, you can get the File Storage IP Address information in the File Storage details section and continue to perform the steps below.
On Windows Server, you can map SMB file storage through the interface or command line.
Open File Explorer.
Right click on This PC and select Map network drive .
In the Map Network Drive window :
Drive letter : Select a drive letter (eg: Z:
).
Folder : Enter the SMB share path, for example: \\<File Storage IP Address>\<File Storage Name>
. For example \\10.50.3.8\demo-smb
.
Select Finish , once done, you can check in File Explorer to see the mapped drive.
Attention:
To automatically map the SMB storage file each time Windows Server starts, you can save the information when mapping through the interface by checking the Reconnect at sign-in box before clicking Finish .
Use the following command in Command Prompt or PowerShell :
Z: : Is the drive letter you want to mount.
\\<File Storage IP Address>\<File Storage Name> : File Storage SMB path.
For example:
More simply, you can also directly access the SMB File Storage via File Explorer through the following steps:
Open File Explorer : Press Windows key + E or click the File Explorer icon.
Enter UNC Path : In the address bar, enter the UNC path to the file share. For example:
Press Enter.
After you have successfully mapped the SMB File Storage to Windows Server, you can write data to the File Storage as follows:
Open a text editor (Notepad):
On Windows Server, open Notepad by:
Click Start and type Notepad , then press Enter .
Or, press Windows key + R , type notepad
and press Enter .
Write content to file:
In Notepad, type something simple, for example:
Copy
Or enter whatever content you want.
Save file to SMB file storage:
Click File > Save As... .
In the Save As dialog box , navigate to the drive that you mapped the SMB share to (eg: Z:
).
Name the file (eg: testfile.txt
).
Click Save to save the file.
Check files in SMB share:
Open File Explorer (shortcut: Windows + E ).
Navigate to the SMB drive (eg. Z:
).
Find and open the file testfile.txt
you just saved to verify the contents.