CN104636441A - Network file system realization method and device - Google Patents

Network file system realization method and device Download PDF

Info

Publication number
CN104636441A
CN104636441A CN201510006997.6A CN201510006997A CN104636441A CN 104636441 A CN104636441 A CN 104636441A CN 201510006997 A CN201510006997 A CN 201510006997A CN 104636441 A CN104636441 A CN 104636441A
Authority
CN
China
Prior art keywords
nfs
pattern
carry
file system
network file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201510006997.6A
Other languages
Chinese (zh)
Other versions
CN104636441B (en
Inventor
李坤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Beijing Electronic Information Industry Co Ltd
Original Assignee
Inspur Beijing Electronic Information Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inspur Beijing Electronic Information Industry Co Ltd filed Critical Inspur Beijing Electronic Information Industry Co Ltd
Priority to CN201510006997.6A priority Critical patent/CN104636441B/en
Publication of CN104636441A publication Critical patent/CN104636441A/en
Application granted granted Critical
Publication of CN104636441B publication Critical patent/CN104636441B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention provides a network file system realization method and device, and relates to the field of computer applications. The problem that the efficiency of an existing NFS mounting method is low is solved. The method comprises the steps of acquiring an NFS mode used by mounting; automatically mounting lv disk according to the NFS mode. According to the technical scheme, the network file system realization method and device are suitable for the NFS, and high-efficient and rapid NFS configuration is achieved.

Description

Network file system(NFS) implementation method and device
Technical field
The present invention relates to computer application field, particularly relate to a kind of network file system(NFS) implementation method and device.
Background technology
NFS is writing a Chinese character in simplified form of Network File System, i.e. network file system(NFS).NFS allow a system on network with other people share directory and file.By using NFS, user can access the file on far end system as access local file with program.NFS has two major parts at least: a station server and (or more) client computer.Client remote accesses the data deposited on the server.In order to normal work, some processes need be configured and run.
NFS is developed by Sun Microsystems, has become a kind of standard (RFC1904, RFC1813) of file service at present.Its maximum function is exactly to pass through network, allows the computing machine of different operating system share data, so also it can be regarded as a file server.NFS file server is one of service of the most classical network of Linux.It is simple in rule that let it be to the greatest extent, but has abundant intension.
Nfs server can be regarded as a file server, in the file mount that it can allow your PC share out by the nfs server of far-end by network to oneself system, use the far-end file of NFS just as if the same at use local file in client.The share and access agreement of NFS is a part for composition NFS service, and the experimental situation of this script uses to be transmitted with the network of InfiniBand related protocol; I.e. remote direct memory access (RDMA) agreement and IP over InfiniBand (IPoIB: IP agreement is mapped to InfiniBand).
Traditional NFS hanging method first the hard disk needed is made lv, aggregates into a jumbo disk; Then be formatted as ext4 form and use mount order to carry out carry; Then be exactly configure NFS, start the related service of NFS, comprise the startup of RDMA service, the closedown of fire wall, the startup (the NFS related service that different NFS patterns starts is also different) of NFS service etc.; Subsequently carry out carry to NFS exactly, the order of different NFS pattern carries is also different, also needs in addition to carry out carry one by one in multiple client.
Summary of the invention
The invention provides a kind of network file system(NFS) implementation method and device, solve the problem of existing NFS hanging method inefficiency.
A kind of network file system(NFS) implementation method, comprising:
Obtain the NFS pattern that carry uses;
According to described NFS pattern, automatic carry lv dish.
Preferably, before the step of the NFS pattern that described acquisition carry uses, also comprise:
The hard disk of multiple needs is aggregated into a lv dish;
To described lv disk formatting;
After having formatd, by described lv dish carry under default directory.
Preferably, the method also comprises:
The parameter of at least one NFS pattern is added in configuration file.
Preferably, described NFS pattern comprises IPoIB pattern and RDMA pattern.
Preferably, the NFS pattern obtaining carry use comprises:
According at least one the client ib address detected, determine the NFS pattern that each client uses.
Present invention also offers a kind of network file system(NFS) implement device, comprising:
Mode selection module, for obtaining the NFS pattern that carry uses;
Automatic carry module, for according to described NFS pattern, automatic carry lv dish.
Preferably, this device also comprises:
Hard disk aggregation module, for aggregating into a lv dish by the hard disk of multiple needs;
Formatting module, for described lv disk formatting;
Carry module, for after format completes, by described lv dish carry under default directory.
Preferably, this device also comprises:
Configuration Manager, for adding to the parameter of at least one NFS pattern in configuration file.
Preferably, described NFS pattern comprises IPoIB pattern and RDMA pattern.
Preferably, described mode selection module, specifically for according at least one the client ib address detected, determines the NFS pattern that each client uses.
The invention provides a kind of network file system(NFS) implementation method and device, first obtain the NFS pattern that carry uses, then according to described NFS pattern, automatic carry lv dish.Facilitate carry multi-client and detect NFS environmental problem place, facilitate experimenter more efficient quick complete NFS configuration effort, save time, raise the efficiency.
Accompanying drawing explanation
The process flow diagram of a kind of network file system(NFS) implementation method that Fig. 1 provides for embodiments of the invention one;
The structural representation of a kind of network file system(NFS) implement device that Fig. 2 provides for embodiments of the invention two.
Embodiment
Traditional NFS hanging method first the hard disk needed is made lv, aggregates into a jumbo disk; Then be formatted as ext4 form and use mount order to carry out carry; Then be exactly configure NFS, start the related service of NFS, comprise the startup of RDMA service, the closedown of fire wall, the startup (the NFS related service that different NFS patterns starts is also different) of NFS service etc.; Subsequently carry out carry to NFS exactly, the order of different NFS pattern carries is also different, also needs in addition to carry out carry one by one in multiple client.
In order to solve the problem, The embodiment provides a kind of network file system(NFS) implementation method and device, the mode of script is used to carry out automatic carry, omit the complicated processes in NFS layoutprocedure, even if make those not understand the personnel how configuring NFS, this script also can be utilized to carry out the configuration of NFS easily; And the pattern of carry required for oneself can be selected as required, and facilitate experimenter to carry out the carry of multi-client, thus increase work efficiency.Embodiments of the invention are for avoiding in layoutprocedure because omit step, service does not start, environment configurations the reason such as not to mate and the problem such as the carry caused is unsuccessful, additionally provide the function detecting NFS environment, facilitate experimenter according to system suggestion to find problem place in layoutprocedure, make carry NFS more efficiently.
Hereinafter will be described in detail to embodiments of the invention by reference to the accompanying drawings.It should be noted that, when not conflicting, the embodiment in the application and the feature in embodiment can combination in any mutually.
First by reference to the accompanying drawings, embodiments of the invention one are described.
Embodiments provide a kind of network file system(NFS) implementation method, idiographic flow as shown in Figure 1, comprising:
Script runs at server end, in preliminary preparation, the hard disk of multiple needs is aggregated into a lv dish, to described lv disk formatting; And after format completes, by described lv dish carry under default directory.Add in configuration file by the parameter of at least one NFS pattern, described NFS pattern comprises IPoIB pattern and RDMA pattern.。After configuration is complete, when needing to carry out carry, obtain the NFS pattern that carry uses, concrete, according at least one the client ib address detected, the NFS pattern that each client uses can be determined; According to described NFS pattern, automatic carry lv dish.
Configure the ib address of server end and client, and by under the ib address name write/etc/hosts of server end and client.And configuration server end and client without cryptographic acess, Deterministic service device end is connected with the network of client.Arranging selinux is disabled.
Below for completing a concrete implementation example of the process of the network file system(NFS) implementation method of embodiment of the present invention jacquard weave with form of scripts:
MountNFS.sh script file is created in/root/ catalogue
The content of mountNFS.sh is as follows:
Above script is the layoutprocedure script of NFS, to unload the carry of NFS, then performs and creates the unloading unmountNFS.sh script be associated.
Create unmountNFS.sh script:
# starts
#!/bin/bash
# reads the address of client
cat clientlist|while read line1
do
echo"umount the client$line1"
# unloads client NFS mount point
if ssh$line1umount/mnt/NFStest;then
echo"umount the client$line1mountpoint/mnt/NFStest successful."
elif echo"force umount!"
If # cannot unload, then forced unloading
ssh$line umount-f/mnt/NFStest&ssh$line1umount-l/mnt/NFStest;
then
echo"umount the client$line1mountpoint/mnt/NFStest successful."
# prompting unloads successfully, otherwise reports an error
else
echo"\033[31mError!:\033[0m can not umount the client$line1mountpoint/mnt/NFStest"
fi
# stops client NFS service
ssh$line1NFS stop
done
# stops service end NFS related service
service NFS-RDMA stop&&
service NFS stop&&
service opensm stop&&
service RDMA stop&&
# offload services end NFS mount point
if umount/mnt/NFStest;then
echo"umount/mnt/NFStest successful."
elif
echo"force umount!"
umount-f/mnt/NFStest&umount-l/mnt/NFStest;
then
echo"umount/mnt/NFStest successful."
else
echo"\033[31mError!:\033[0m can not umount the client mountpoint/mnt/NFStest"
fi
# removes lv, recovers former hard disk
vgremove svg
Cat disklist|while read line2# reads hard disk list
do
pvremove$line2
done
Generally, use common mkfs.ext4 mode disk format, need capacity just can format within 16T; If more than 16T, need the software package in Download Script, after compiling and install, Large Copacity formatting command mode is carried out in use mke2fs order, and now the version of mke2fs is " 1.43 ~ WIP ".
Use Ethernet carry NFS if want, and do not use ib network, then select IPOIB pattern when the selection of pattern, and the ib address that server holds is changed into the ip address of Ethernet, the ib address of client is changed into the ip address of client.
After having edited script, this script attribute is set to executable file, as chmod+x mountNFS.sh; Chmod+x unmountNFS.sh
The information according to system suggestion detected, testing environment configures, to improve NFS environment, thus the building of quickness and high efficiency.
Below in conjunction with accompanying drawing, embodiments of the invention two are described.
Embodiments provide a kind of network file system(NFS) implement device, its structure as shown in Figure 2, comprising:
Mode selection module 201, for obtaining the NFS pattern that carry uses;
Automatic carry module 202, for according to described NFS pattern, automatic carry lv dish.
Preferably, this device also comprises:
Hard disk aggregation module 203, for aggregating into a lv dish by the hard disk of multiple needs;
Formatting module 204, for described lv disk formatting;
Carry module 205, for after format completes, by described lv dish carry under default directory.
Preferably, this device also comprises:
Configuration Manager 206, for adding to the parameter of at least one NFS pattern in configuration file.
Preferably, described NFS pattern comprises IPoIB pattern and RDMA pattern.
Preferably, described mode selection module 201, specifically for according at least one the client ib address detected, determines the NFS pattern that each client uses.
Embodiments of the invention jacquard weave a kind of network file system(NFS) implementation method and device, first obtain the NFS pattern that carry uses, then according to described NFS pattern, and automatic carry lv dish.Use shell script, configuration NFS running environment, the NFS pattern that carry is different, facilitate carry multi-client and detect the method at NFS environmental problem place, facilitate experimenter more efficient quick complete NFS configuration effort, save time, raise the efficiency.
One of ordinary skill in the art will appreciate that all or part of step of above-described embodiment can use computer program flow process to realize, described computer program can be stored in a computer-readable recording medium, described computer program (as system, unit, device etc.) on corresponding hardware platform performs, when performing, step comprising embodiment of the method one or a combination set of.
Alternatively, all or part of step of above-described embodiment also can use integrated circuit to realize, and these steps can be made into integrated circuit modules one by one respectively, or the multiple module in them or step are made into single integrated circuit module to realize.Like this, the present invention is not restricted to any specific hardware and software combination.
Each device/functional module/functional unit in above-described embodiment can adopt general calculation element to realize, and they can concentrate on single calculation element, also can be distributed on network that multiple calculation element forms.
Each device/functional module/functional unit in above-described embodiment using the form of software function module realize and as independently production marketing or use time, can be stored in a computer read/write memory medium.The above-mentioned computer read/write memory medium mentioned can be ROM (read-only memory), disk or CD etc.
Anyly be familiar with those skilled in the art in the technical scope that the present invention discloses, change can be expected easily or replace, all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection domain described in claim.

Claims (10)

1. a network file system(NFS) implementation method, is characterized in that, comprising:
Obtain the NFS pattern that carry uses;
According to described NFS pattern, automatic carry lv dish.
2. network file system(NFS) implementation method according to claim 1, is characterized in that, before the step of the NFS pattern that described acquisition carry uses, also comprises:
The hard disk of multiple needs is aggregated into a lv dish;
To described lv disk formatting;
After having formatd, by described lv dish carry under default directory.
3. network file system(NFS) implementation method according to claim 1, it is characterized in that, the method also comprises:
The parameter of at least one NFS pattern is added in configuration file.
4. network file system(NFS) implementation method according to claim 3, is characterized in that, described NFS pattern comprises IPoIB pattern and RDMA pattern.
5. network file system(NFS) implementation method according to claim 1, is characterized in that, the NFS pattern obtaining carry use comprises:
According at least one the client ib address detected, determine the NFS pattern that each client uses.
6. a network file system(NFS) implement device, is characterized in that, comprising:
Mode selection module, for obtaining the NFS pattern that carry uses;
Automatic carry module, for according to described NFS pattern, automatic carry lv dish.
7. network file system(NFS) implement device according to claim 6, is characterized in that, this device also comprises:
Hard disk aggregation module, for aggregating into a lv dish by the hard disk of multiple needs;
Formatting module, for described lv disk formatting;
Carry module, for after format completes, by described lv dish carry under default directory.
8. network file system(NFS) implement device according to claim 6, is characterized in that, this device also comprises:
Configuration Manager, for adding to the parameter of at least one NFS pattern in configuration file.
9. network file system(NFS) implement device according to claim 8, is characterized in that, described NFS pattern comprises IPoIB pattern and RDMA pattern.
10. network file system(NFS) implement device according to claim 6, is characterized in that, described mode selection module, specifically for according at least one the client ib address detected, determines the NFS pattern that each client uses.
CN201510006997.6A 2015-01-07 2015-01-07 NFS implementation method and device Active CN104636441B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510006997.6A CN104636441B (en) 2015-01-07 2015-01-07 NFS implementation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510006997.6A CN104636441B (en) 2015-01-07 2015-01-07 NFS implementation method and device

Publications (2)

Publication Number Publication Date
CN104636441A true CN104636441A (en) 2015-05-20
CN104636441B CN104636441B (en) 2018-02-06

Family

ID=53215187

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510006997.6A Active CN104636441B (en) 2015-01-07 2015-01-07 NFS implementation method and device

Country Status (1)

Country Link
CN (1) CN104636441B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105278985A (en) * 2015-09-25 2016-01-27 浪潮(北京)电子信息产业有限公司 Method and system for deploying file system
WO2017084587A1 (en) * 2015-11-17 2017-05-26 华为技术有限公司 Interactive method and apparatus based on network file system
CN108769246A (en) * 2018-06-14 2018-11-06 郑州云海信息技术有限公司 A kind of NFS shares maximized test method and system
CN108984215A (en) * 2018-07-02 2018-12-11 郑州云海信息技术有限公司 A kind of method, apparatus, equipment and the storage medium of automatic carry NFS
CN109976814A (en) * 2019-03-12 2019-07-05 浪潮商用机器有限公司 A kind of method, apparatus that building LCB server and medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070260606A1 (en) * 2006-05-04 2007-11-08 Dell Products L.P. System and method for using a network file system mount from a remote management card
CN101378411A (en) * 2008-09-28 2009-03-04 深圳华为通信技术有限公司 Mobile terminal, server and data access method
CN102541994A (en) * 2011-11-18 2012-07-04 浪潮电子信息产业股份有限公司 Method for deploying and sharing NFS (network file system) automatically and quickly
US20140222879A1 (en) * 2013-02-01 2014-08-07 Apple Inc. Method and system for unmounting an inaccessible network file system
CN103986789A (en) * 2014-06-05 2014-08-13 浪潮电子信息产业股份有限公司 Method for realizing dual redundant of NFS (network file system) nodes in HADOOP HA (home address) cluster based on NFS

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070260606A1 (en) * 2006-05-04 2007-11-08 Dell Products L.P. System and method for using a network file system mount from a remote management card
CN101378411A (en) * 2008-09-28 2009-03-04 深圳华为通信技术有限公司 Mobile terminal, server and data access method
CN102541994A (en) * 2011-11-18 2012-07-04 浪潮电子信息产业股份有限公司 Method for deploying and sharing NFS (network file system) automatically and quickly
US20140222879A1 (en) * 2013-02-01 2014-08-07 Apple Inc. Method and system for unmounting an inaccessible network file system
CN103986789A (en) * 2014-06-05 2014-08-13 浪潮电子信息产业股份有限公司 Method for realizing dual redundant of NFS (network file system) nodes in HADOOP HA (home address) cluster based on NFS

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105278985A (en) * 2015-09-25 2016-01-27 浪潮(北京)电子信息产业有限公司 Method and system for deploying file system
WO2017084587A1 (en) * 2015-11-17 2017-05-26 华为技术有限公司 Interactive method and apparatus based on network file system
CN108769246A (en) * 2018-06-14 2018-11-06 郑州云海信息技术有限公司 A kind of NFS shares maximized test method and system
CN108769246B (en) * 2018-06-14 2021-02-02 苏州浪潮智能科技有限公司 NFS sharing maximization test method and system
CN108984215A (en) * 2018-07-02 2018-12-11 郑州云海信息技术有限公司 A kind of method, apparatus, equipment and the storage medium of automatic carry NFS
CN109976814A (en) * 2019-03-12 2019-07-05 浪潮商用机器有限公司 A kind of method, apparatus that building LCB server and medium

Also Published As

Publication number Publication date
CN104636441B (en) 2018-02-06

Similar Documents

Publication Publication Date Title
CN108228209B (en) System, method, and medium for automatically updating firmware of elements of a server system
EP3367636B1 (en) System and method for automatically updating bios setup options
TWI598746B (en) Server systems and computer-implemented method for providing flexible hard-disk drive (hdd) and solid-state drive (ssd) support in a computing system
EP3442319B1 (en) Multi-node system-fan-control switch
US10127055B2 (en) iSCSI based bare metal OS image deployment and diskless boot
EP3744072B1 (en) Network flow stitching using middle box flow stitching
CN108983938B (en) Operational system, computer-implemented method, and medium when standby power fails
CN104636441A (en) Network file system realization method and device
US20180348309A1 (en) System and method for voltage regulator self-burn-in test
CN110572439B (en) Cloud monitoring method based on metadata service and virtual forwarding network bridge
CN104718723A (en) A framework for networking and security services in virtual networks
CN113783765B (en) Method, system, equipment and medium for realizing intercommunication between cloud internal network and cloud external network
US10230567B2 (en) Management of a plurality of system control networks
CN106155264B (en) Manage the computer approach and computer system of the power consumption of storage subsystem
US9967139B2 (en) Remote zone management of JBOD systems
CN104468791A (en) Private cloud IaaS platform construction method
US9804642B2 (en) Systems and methods for mounting and dismounting computing components
US20160183401A1 (en) Systems and methods for mounting and dismounting computing components
US10019185B2 (en) System and method for copying directory structures
TWI637611B (en) System recovery using wol
CN106790403A (en) Realize the method for mobile cloud computing halfpace and realize distributed method
JP2019036944A (en) Configuration by network attribute
CN112764830B (en) Data migration method and system applied to localization substitution
CN109005068B (en) Configuration method of cluster virtual machine qos
US10027535B1 (en) Systems and methods for managing device configurations at various levels of abstraction

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant