1. Applicable environment
1. When certain departments of small and medium-sized enterprises often need to exchange and share data, they can use professional servers within the enterprise to configure the remaining hard disk storage capacity in the form of shared network disks for data exchange between departments. exchange.
2. Multiple hard disks can be used to form a logical disk of a soft array through the debian Linux system to expand the capacity of the network disk. The soft array can support (Raid 0, Raid 1, Raid 5, Raid 6, Raid 10).
3. The supported service methods are:
(1) FTP: File Transfer Protocol.
(2) NFS: Network File System network file system. The operation in this example uses the shared folder service of NFS.
(3) Rsync: remote synchronize remote data synchronization tool, based on the Ftrans ultra-high-speed transmission protocol, synchronous backup of GB-level/TB-level files, and the speed is increased by more than 30 times. Ftrans Enhanced File Transfer System enhances the file transfer system, rsync is a data mirroring backup tool under the linux system. Use the fast incremental backup tool Remote Sync to synchronize remotely, support local replication, or synchronize with other SSH and rsync hosts.
(4) SMB/CIFS: SMB (Server Message Block), also known as CIFS (Common Internet File System) is a software program-level network transmission protocol developed by Microsoft, mainly used to make a Machines on a network share resources such as computer files, printers, serial ports, and communications.
(5) SSH: (Struts, Spring, Hibernate) Struts for process control, Spring for business flow, Hibernate for encapsulation of database operations.
Note: This example is completed in the experimental environment. The throughput has not been tested in the actual network environment. After testing the concurrent traffic in the actual environment, the data used and the method of WAN access will be supplemented. It is for reference only.
2. Preparation
1. openmediavault.iso installation package
(1) Open the installation package download site,
https://www.Openmediavault.org, as shown below:
(2) Click stable from the download tab in the figure below to start downloading Openmediavault.iso
2. Vmware workstation 16 virtual machine software
3. NFS client of win10 or win11
3. The process of installing debian Linux and configuring the network disk:
(1) The process of installing debian Linux:
1. The configuration environment of this example is installed on the virtual machine software of win11
2. Load the downloaded ISO file into the newly created virtual machine. After booting from the ISO file, select install from the boot menu, as shown in the figure below:.
3. Select the language. In this example, choose Chinese Simplified Chinese
4. Select the time zone, as shown in the figure below:
5. Select the keyboard layout, as shown below:
6. The progress of the installation, as shown in the figure below
7. Configure the host name of debian Linux, as shown in the figure below:
8. Configure the domain name suffix of debian Linux, as shown in the figure below:
9. Configure the password of the root user, as shown in the figure below:
10. Confirm the password of the root user, as shown in the figure below:
11. Copy the system files to the disk, as shown in the figure below:
12. Configure the country where the debian warehouse image software package is located, as shown in the figure below:
13. Select the warehouse image, as shown in the figure below:
14. Install APT, as shown below:
15. Install the GRUB boot loader, select /dev/sda in the figure below, as shown in the figure below:
16. Complete the final component installation process, as shown in the figure below:
17. When the installation prompt is over, click "Continue" to restart the debian Linux operating system
18. Select "Debian GNU/Linux" from the boot menu, as shown below:
19. The interface after startup, as shown in the figure below:
The figure above includes the ip address for logging in to the WEB server, the user name and password for WEB login. Note that the user name and password are mainly for the configuration of the network disk system after WEB login, not the root user of the debian Linux system.
20. Use the command to view the current debian Linux version information, and the command mode to view the ip address of the network card. The commands used are as follows:
Lsb_release -a
Ip addr
21. Open the WEB browser, enter the ip address after the debian Linux system is started in the address bar, as shown in the figure below, and the management login interface of the network disk system will appear, as shown in the figure below:
22. Enter the user name: admin, password: openmediavault, after successful login, you can see that the network disk services supported by this debian Linux are: FTP, NFS, RSYnc, SMB/CIFS, SSH, as shown below:
(2) The process of configuring the network disk (creating a disk array and mounting the file system of the logical network disk):
1. To add 3 hard disks to the virtual machine, debian Linux needs to be shut down first. At this time, log in as the root user, enter the password confirmed during system installation, and then execute the poweroff command to shut down, as shown in the figure below: 2. In the virtual machine settings
, Add 3 hard disks, here is the experiment process, we add 3 hard disks of 5GB each to confirm, as shown below:
3. After successfully adding 3 hard disks, you can see it in the preview of the virtual machine, as shown in the figure below
4. Turn on the virtual machine and start to the following interface:
5. At this time, log in to debian Linux from the WEB browser, and then select "storage" and "disk" from the list on the left, and you can see the 3 hard disks that have been successfully added and can be used as network disks, as shown in the figure below:
6. From the Raid management on the left, start to create a disk array, click + to create, as shown in the figure below:
7. Check the raid types supported by debian Linux, as shown in the figure below:
8. In this example, we use raid 5 as the basis to create a network disk, select the 3 hard disks to be added, and check them as shown in the figure below:
9. After confirming the creation of the disk soft array, click √ in the upper right corner to apply the disk array just created
10. The following dialog box pops up, check confirm, and click Yes
11. After the creation of the disk array is completed, a logical disk with a capacity of 9.99GB will be generated, as shown in the figure below:
12. Configure the 9.99GB file system of the newly created floppy disk array, as shown in the figure below:
13. After selecting raid nas 9.99GB, configure it as EXT4 file system and save
14. View the file system types supported by debian Linux, as shown in the figure below:
15. During the process of creating the file system, the end of line is displayed at the end, that is, the last line, as shown in the figure below:
16. Mount the file system, as shown in the figure below:
17. Confirm the mount, click Yes, as shown in the figure below:
18. After the file system is mounted, the online status will be displayed, as shown in the figure below:
19. Apply the changed configuration to the mounted file system, click √, confirm, yes
20. When the application configuration is completed, the available capacity and used capacity will be displayed, as shown in the figure below:
(3) Configure NFS network disk sharing and permissions
1. In the storage on the left, share the folder, click the + sign to create a share, as shown below:
2. Configure the share name, select the network disk to be shared, specify the path where the share is located, and save it, as shown in the figure below:
3. Configure the permissions when sharing. In the network disk sharing in this example, debian Linux supports the permission configuration as shown in the figure below:
4. Click √, confirm, yes, apply the configuration of the shared folder, as shown in the figure below:
5. After the sharing takes effect, the following picture is displayed:
6. Start the NFS service
7. Check Start, save, as shown below:
At this point, the server-side configuration is complete, and then the client-side configuration is completed
4. Result Verification
(1) Client configuration
1. Open the "Control Panel" on the win11 client, enable or disable the windows function, find the NFS server, check the NFS client and management tools, and confirm, as shown in the figure below:
2. Open the cmd window on the client, and enter the command showmount -e debian Linux server ip (depending on your own network environment, as shown in the figure below)
From the displayed path of the mountable network disk, we can see that there are 2 pieces of shared information. We created a share and specified the 192.168.45.0/24 and 192.168.111.0/24 network segments to mount and access the shared network of the server. Disk, when the command is successfully completed, note that we are mapped to the Z disk here, next:
3. After opening "This Computer", you can see that there is an additional Z disk, and the content of the Z disk is the content of the network disk, as shown in the figure below.
4. After opening the Z disk, it is empty without any files and folders. Now we try to upload a file to the network disk, and the prompt access is denied, as shown in the figure below: The reason is that the permission we give to ordinary users users is read-
only , so to modify the permissions
5. To modify permissions, click storage on the left, share folders, privileges, find users, configure read/write permissions, as shown in the figure below:
6. At this time, upload the file to the network disk to complete the writing, as shown in the figure below:
At this point, the process of using the debian Linux system to build a LAN network disk is over. If the external network needs to access the network disk, it needs to be completed using WAN-related technologies. Please criticize and correct the deficiencies.