CN104951254B - A kind of method and device of management storage device - Google Patents

A kind of method and device of management storage device Download PDF

Info

Publication number
CN104951254B
CN104951254B CN201510388349.1A CN201510388349A CN104951254B CN 104951254 B CN104951254 B CN 104951254B CN 201510388349 A CN201510388349 A CN 201510388349A CN 104951254 B CN104951254 B CN 104951254B
Authority
CN
China
Prior art keywords
host
san
equipment
carry
new carry
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.)
Active
Application number
CN201510388349.1A
Other languages
Chinese (zh)
Other versions
CN104951254A (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 CN201510388349.1A priority Critical patent/CN104951254B/en
Publication of CN104951254A publication Critical patent/CN104951254A/en
Application granted granted Critical
Publication of CN104951254B publication Critical patent/CN104951254B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Debugging And Monitoring (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A method of management storage device, the method includes:Detect storing device information of the carry on host;The storage device of new carry on the host is obtained according to the storing device information;Obtain the configuration parameter information of the storage device of new carry on the host;According to the configuration parameter information of the storage device of new carry on the host, the storage device of the new carry on the host is added to the host.It is not required to restart the (SuSE) Linux OS of host, host can identify that SAN storage device of the new carry on host, implementation process are stablized effective.

Description

A kind of method and device of management storage device
Technical field
The present invention relates to field of computer technology, especially a kind of management storage device method.
Background technology
With the development of the new techniques such as cloud computing, big data, the requirement to data storage is higher and higher, while storing need to Ask also is in explosive growth.The birth of SAN (Storage Area Network, storage area network), makes memory space obtain It more fully utilizes and installs and manage more efficient.SAN be it is a kind of by storage device, connection equipment and Interface integration exist Technology in one express network.SAN assumes responsibility for data store tasks, SAN network and LAN itself is a storage network Business network is isolated, and storage data flow will not occupy business network bandwidth.
In SAN network, all data transmissions are carried out at a high speed, in the network of high bandwidth, and SAN storages are accomplished that directly It connects to store the block grade of physical hardware and access, improve the performance and upgrading ability of storage.
Widely use promotes to require SAN equipment during implementing carry host more stable, and SAN equipment is hung The host operating system of load is generally Windows and Linux.In the host carry SAN equipment for being mounted with Windows operating system When, only " rescaning hard disk " i.e. recognizable new addition hard disk need to be clicked at the equipment management interface of Windows operating system, It is exactly the LUN of SAN device maps.And when using the host for being mounted with (SuSE) Linux OS, it generally requires to restart host (SuSE) Linux OS just can recognize that, restarts system and not only takes a certain time, if host is related to production system, but will cause Interrupting service and the risk for bringing other biggers.
Invention content
To solve the above-mentioned problems, it the present invention provides a kind of (SuSE) Linux OS for being not required to restart host, can manage The method of SAN storage devices, implementation process are stablized effective.
A method of management storage device, the method includes:
Detect storing device information of the carry on host;
The storage device of new carry on the host is obtained according to the storing device information;
Obtain the configuration parameter information of the storage device of new carry on the host;
According to the configuration parameter information of the storage device of new carry on the host, on the host by the new carry Storage device be added to the host.
Optionally, the configuration parameter information includes:Adapter identification, gap marker, device identification and logical unit number At least one of LUN identification.
Optionally, according to the configuration parameter information of the storage device of new carry on the host, by the new carry in institute It states the storage device on host to be added to after the host, the method further includes:It generates and runs lookup device command, root Whether the system for detecting host according to lookup result can identify storage device of the new carry on host.
Optionally, the storage device that new carry on the host is obtained according to the storing device information, including:From In storing device information of the carry on host, the identification number of each storage device is found;Pass through current identification number The list of identification numbers of list and history compares, and obtains the storage device of new carry on the host.
A kind of device of management storage device, described device include:
Detection module, for detecting storing device information of the carry on host;
First acquisition module, the storage device for obtaining new carry on the host according to the storing device information;
Second acquisition module, the configuration parameter information for obtaining the storage device of new carry on the host;
Add module, for the configuration parameter information according to the storage device of new carry on the host, by the new extension The storage device carried on the host is added to the host.
Optionally, the configuration parameter information includes:Adapter identification, gap marker, device identification and logical unit number At least one of LUN identification.
Optionally, described device further includes correction verification module,
For generating and running lookup device command, whether the system for detecting the host according to lookup result can identify The new storage device of carry on the host.
Optionally, first acquisition module, including:
Searching unit is used in the storing device information from the carry on host, finds each storage device Identification number;
Acquiring unit obtains new carry for being compared by the list of identification numbers of current list of identification numbers and history Storage device on the host.
Description of the drawings
Fig. 1 is the flow chart of the method for management storage device provided by the invention;
Fig. 2 is the structure chart of the device of the invention.
Specific implementation mode
Technical scheme of the present invention is described in detail below in conjunction with accompanying drawings and embodiments.
It should be noted that if do not conflicted, each feature in the embodiment of the present invention and embodiment can be tied mutually It closes, within protection scope of the present invention.In addition, though logical order is shown in flow charts, but in certain situations Under, it can be with the steps shown or described are performed in an order that is different from the one herein.
To make the object, technical solutions and advantages of the present invention clearer, the specific implementation mode of the present invention is made below Described below.
A method of management storage device, the method includes:
Detect storing device information of the carry on host;
The storage device of new carry on the host is obtained according to the storing device information;
Obtain the configuration parameter information of the storage device of new carry on the host;
According to the configuration parameter information of the storage device of new carry on the host, on the host by the new carry Storage device be added to the host.
Fig. 1 is the flow chart of the present invention;
Step S01:Detect storing device information of the carry on host;
Step S02:The storage device of new carry on the host is obtained according to the storing device information;
Step S03:Obtain the configuration parameter information of the storage device of new carry on the host;
Step S04:According to the configuration parameter information of the storage device of new carry on the host, by the new carry in institute It states the storage device on host and is added to the host.
Optionally, the configuration parameter information includes:Adapter identification, gap marker, device identification and logical unit number At least one of LUN identification.
Logical unit number LUN (logic unit number), describes equipment, operating system can identify most using LUN Small storage object rank is exactly lun device, and usual abbreviation lun device are lun, and generally, the equipment mounted in bus is used Target device are described, and lun device are concepts more smaller than target device, under each target device It face can be by multiple lun device;In this way, the description of each equipment can become taget x by original target x lun y;The ability of description equipment enhances, and the concept that lun is arranged is the prior art, is repeated no more.
Obtain the configuration parameter information of newly added equipment, so that it may the storage device increased newly is added to host.
Optionally, according to the configuration parameter information of the storage device of new carry on the host, by the new carry in institute It states the storage device on host to be added to after the host, the method further includes:It generates and runs lookup device command, root Whether the system for detecting host according to lookup result can identify storage device of the new carry on host.
After newly added equipment is added to host, it is also necessary to examine, whether addition succeeds, and whether the operating system of host can Enough newly added equipments successfully identified after addition illustrate addition failure, need to add again if cannot successfully identify.
Optionally, the storage device that new carry on the host is obtained according to the storing device information, including:From In storing device information of the carry on host, the identification number of each storage device is found;Pass through current identification number The list of identification numbers of list and history compares, and obtains the storage device of new carry on the host.
The information of storage device includes the identification number of storage device, has storage to record, can be looked by the record of storage See which storage device, storage record can also become list of identification numbers, after newly-increased storage device, storage record can be sent out The identification number of changing, newly-increased storage device can be also recorded in record, compare the variation of list of identification numbers, so that it may to judge The identification number of newly-increased storage device, to know which is newly-increased storage device.It is illustrated below:
Before the first step, execution order, inspection/proc/scsi/scsi files determines the identification number id of new disk;
Attached devices:
Host:scsi0 Channel:00 Id:00 Lun:00
Vendor:VMware Model:Virtual disk Rev:1.0
Type:Direct-Access ANSI SCSI revision:02
Host:scsi0 Channel:00 Id:01 Lun:00
Vendor:VMware Model:Virtual disk Rev:1.0
Type:Direct-Access ANSI SCSI revision:02
Host:scsi0 Channel:00 Id:02 Lun:00
Vendor:VMware Model:Virtual disk Rev:1.0
Type:Direct-Access ANSI SCSI revision:02
Host:scsi0 Channel:00 Id:03 Lun:00
Vendor:VMware Model:Virtual disk Rev:1.0
Type:Direct-Access ANSI SCSI revision:02
Host:scsi0 Channel:00 Id:04 Lun:00
Vendor:VMware Model:Virtual disk Rev:1.0
Type:Direct-Access ANSI SCSI revision:02
In above step ,/proc/scsi/scsi files are exactly the configuration file in LINUX operating systems,
Configuration file describes all carries in the information equipped with the equipment on LINUX operating system hosts.
It can be seen that maximum No. id is 04, the ID of newly-increased disk should be determined as 5.
That is, before newly-increased Disk Mapping, in the list of identification numbers of historical record, most identification number id are 03, newly After increasing Disk Mapping, in the list of current identification number, maximum identification number id becomes for 04;
It was determined that No. id be 04 a line:
Host:scsi0 Channel:00 Id:04 Lun:00
It is exactly the parameter of newly-increased disk,
It is meant that:First host adapter;First channel SCSI;5th scsi disk;First LUN;
Above four parameters, for describing newly-increased SAN equipment.By above four parameters, it just will appreciate that newly-increased SAN is set Standby status information, to prepare for the input order of next step.
It is worth noting that, after the LUN mapping of newly-increased SAN equipment is to Linux hosts, in configuration file, can all retrieve To the information of newly-increased SAN equipment, this operating system for not representing host can identify newly-increased SAN equipment.Host operating system SAN equipment is increased newly to identify, it is also necessary to which operation increases the order of SAN equipment.
Second step, the order for increasing disk by hand;
#echo"scsi add-single-device w x y z">/proc/scsi/scsi;
To make the order normal operation, it is necessary to specify correct parameter value w, x, y and z, as follows:
W is host adapter mark, and first adapter is zero (0);
X is the channels SCSI on host adapter, and first channel is zero (0);
Y is the SCSI marks of equipment;
Z is No. LUN, and first LUN is zero (0);
By taking the embodiment of above-mentioned newly-increased SAN equipment as an example,
Execute order:
#echo"scsi add-single-device 0 0 5 0">/proc/scsi/scsi;
After running mentioned order on host, newly-increased SAN equipment can be identified by operating system.
Third step executes fdisk-l orders, checks the case where working as front disk
[root@soadb scsi]#fdisk-l
Disk/dev/sda:21.4GB,21474836480 bytes
255 heads,63 sectors/track,2610 cylinders
Units=cylinders of 16065*512=8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1*1 13 104391 83 Linux
/dev/sda2 14 2610 20860402+8e Linux LVM
Disk/dev/sde:53.6GB,53687091200 bytes
255 heads,63 sectors/track,6527 cylinders
Units=cylinders of 16065*512=8225280 bytes
Disk/dev/sde doesn't contain a valid partition table。
4th step executes fdisk orders, inspection result
[root@soadb scsi]#fdisk-l
Disk/dev/sdf:53.6 GB,53687091200 bytes
255 heads,63 sectors/track,6527 cylinders
Units=cylinders of 16065*512=8225280 bytes
Disk/dev/sdf doesn't contain a valid partition table。
It can be seen that the disk of newly-increased 50G recognizes in an operating system, device name is /dev/sdf.
The present invention first checks for/proc/ first after by the LUN mapping of SAN equipment to Linux hosts, at the ends Linux Scsi/scsi files determine the id of new disk.Then operation increases the order of disk manually:
#echo"scsi add-single-device w x y z">/proc/scsi/scsi
To make the order normal operation, it is necessary to specify correct parameter value w, x, y and z, as follows:
W is host adapter mark, and first adapter is zero (0);
X is the channels SCSI on host adapter, and first channel is zero (0);
Y is the SCSI marks of equipment;
Z is No. LUN, and first LUN is zero (0);
And w, x, y, z quadrinomial parameter are determined according to/proc/scsi/scsi files.
Fig. 2 is the structure chart of the device of management storage device provided by the invention.Fig. 2 shown devices include being sequentially connected 's:Detection module 201, the first acquisition module 202, the second acquisition module 203, add module 204;
Detection module 201, for detecting storing device information of the carry on host;
First acquisition module 202, the storage for obtaining new carry on the host according to the storing device information are set It is standby;
Second acquisition module 203, the configuration parameter information for obtaining the storage device of new carry on the host;
Add module 204 will be described new for the configuration parameter information according to the storage device of new carry on the host The storage device of carry on the host is added to the host.
Optionally, the configuration parameter information includes:Adapter identification, gap marker, device identification and logical unit number At least one of LUN identification.
Optionally, described device further includes correction verification module,
For generating and running lookup device command, whether the system for detecting the host according to lookup result can identify The new storage device of carry on the host.
Optionally, first acquisition module, including:
Searching unit is used in the storing device information from the carry on host, finds each storage device Identification number;
Acquiring unit obtains new carry for being compared by the list of identification numbers of current list of identification numbers and history Storage device on the host.
Because there are one identification number, equipment to be corresponded with identification number for each equipment, by the way that searching unit is arranged, lead to Cross the identification number for searching storage device of the carry on host, so that it may since which storage device of carry determined on host,
After newly added equipment, list of identification numbers will necessarily change, and the mark of newly added equipment is added in list of identification numbers Number, by the way that acquiring unit is arranged, the front and back comparison of the number of being identified list can obtain storage of the new carry on host and set It is standby.
One of ordinary skill in the art will appreciate that all or part of step in the above method can be instructed by program Related hardware is completed, and described program can be stored in computer readable storage medium, such as read-only memory, disk or CD Deng.Optionally, all or part of step of above-described embodiment can also be realized using one or more integrated circuits.Accordingly Ground, the form that hardware may be used in each module/unit in above-described embodiment are realized, the shape of software function module can also be used Formula is realized.The present invention is not limited to the combinations of the hardware and software of any particular form.
Certainly, the invention may also have other embodiments, without deviating from the spirit and substance of the present invention, ripe It knows those skilled in the art and makes various corresponding change and deformations, but these corresponding changes and change in accordance with the present invention Shape should all belong to the scope of the claims of the present invention.

Claims (4)

1. a kind of method of management SAN equipment, which is characterized in that the method includes:
Detect SAN facility information of the carry on LINUX operating system hosts, the SAN facility informations, including SAN equipment Identification number;
According to the SAN equipment of new carry on host described in the SAN apparatus information acquirings;
The configuration parameter information of the SAN equipment of new carry on the host is obtained, the configuration parameter information includes:Adapter mark At least one of knowledge, gap marker, device identification and logical unit number LUN identification;
According to the configuration parameter information of the SAN equipment of new carry on the host, by the SAN of the new carry on the host Equipment is added to the host;
The SAN equipment according to new carry on host described in the SAN apparatus information acquirings, including:
From SAN facility information of the carry on host, the identification number of each SAN equipment is found;
It is compared by the list of identification numbers of current list of identification numbers and history, obtains the SAN of new carry on the host Equipment.
2. the method as described in claim 1, which is characterized in that joined according to the configuration of the SAN equipment of new carry on the host Number information, after the SAN equipment of the new carry on the host is added to the host, the method further includes:
Lookup device command is generated and runs, whether the system for detecting host according to lookup result can identify new carry in host On SAN equipment.
3. a kind of device of management SAN equipment, which is characterized in that described device includes:
Detection module, for detecting SAN facility information of the carry on LINUX operating system hosts, the SAN facility informations, Include the identification number of SAN equipment;
First acquisition module, for the SAN equipment according to new carry on host described in the SAN apparatus information acquirings;
Second acquisition module, the configuration parameter information for obtaining the SAN equipment of new carry on the host, the configuration parameter Information includes:At least one of adapter identification, gap marker, device identification and logical unit number LUN identification;
Add module, for the configuration parameter information according to the SAN equipment of new carry on the host, by the new carry in institute The SAN equipment stated on host is added to the host;
First acquisition module, including:
Searching unit is used in the SAN facility informations from the carry on host, finds the identification number of each SAN equipment;
Acquiring unit obtains new carry in institute for being compared by the list of identification numbers of current list of identification numbers and history State the SAN equipment on host.
4. device as claimed in claim 3, which is characterized in that described device further includes:
Correction verification module, for generating and running lookup device command, whether the system for detecting the host according to lookup result can Enough identify the SAN equipment of new carry on the host.
CN201510388349.1A 2015-07-03 2015-07-03 A kind of method and device of management storage device Active CN104951254B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510388349.1A CN104951254B (en) 2015-07-03 2015-07-03 A kind of method and device of management storage device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510388349.1A CN104951254B (en) 2015-07-03 2015-07-03 A kind of method and device of management storage device

Publications (2)

Publication Number Publication Date
CN104951254A CN104951254A (en) 2015-09-30
CN104951254B true CN104951254B (en) 2018-09-11

Family

ID=54165934

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510388349.1A Active CN104951254B (en) 2015-07-03 2015-07-03 A kind of method and device of management storage device

Country Status (1)

Country Link
CN (1) CN104951254B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107329707A (en) * 2017-07-03 2017-11-07 郑州云海信息技术有限公司 Multiple storage devices management method, system and the gui management system of unified storage
CN107704209A (en) * 2017-10-26 2018-02-16 郑州云海信息技术有限公司 A kind of disk scanning method, system, equipment and computer-readable storage medium
CN110187844B (en) * 2019-06-11 2020-03-31 苏州浪潮智能科技有限公司 Method and device for automatically identifying and mounting nodes of hard RAID (redundant array of independent disk) equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101477444A (en) * 2008-12-29 2009-07-08 成都市华为赛门铁克科技有限公司 Virtual memory method and apparatus
CN101739217A (en) * 2008-11-24 2010-06-16 英业达集团(天津)电子技术有限公司 Recognition system and method of just bundle of disks with single-wire cascading topological structure
CN102541475A (en) * 2012-03-12 2012-07-04 成都市华为赛门铁克科技有限公司 Data storage method and data storage device
CN104699423A (en) * 2015-03-13 2015-06-10 华为技术有限公司 Method and device for binding disk drive in Linux system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101739217A (en) * 2008-11-24 2010-06-16 英业达集团(天津)电子技术有限公司 Recognition system and method of just bundle of disks with single-wire cascading topological structure
CN101477444A (en) * 2008-12-29 2009-07-08 成都市华为赛门铁克科技有限公司 Virtual memory method and apparatus
CN102541475A (en) * 2012-03-12 2012-07-04 成都市华为赛门铁克科技有限公司 Data storage method and data storage device
CN104699423A (en) * 2015-03-13 2015-06-10 华为技术有限公司 Method and device for binding disk drive in Linux system

Also Published As

Publication number Publication date
CN104951254A (en) 2015-09-30

Similar Documents

Publication Publication Date Title
US8924664B2 (en) Logical object deletion
US9223788B2 (en) File system consistency check on part of a file system
US9058125B2 (en) Computer system, computer and method for performing thin provisioning capacity management in coordination with virtual machines
US9501231B2 (en) Storage system and storage control method
US8127096B1 (en) High capacity thin provisioned storage server with advanced snapshot mechanism
US8751768B2 (en) Data storage reclamation systems and methods
US9423984B2 (en) Storage apparatus and control method thereof
US9489210B2 (en) Implementing configuration preserving relocation of SRIOV adapter
US8966130B2 (en) Tag allocation for queued commands across multiple devices
US20120117367A1 (en) Electronic apparatus and booting method thereof
US20160224427A1 (en) Enhanced restart of a core dumping application
EP2829968A1 (en) Storage controller, controlling program, and method for controlling
US20100211949A1 (en) Management computer and processing management method
CN106201652B (en) Data processing method and virtual machine
CN104951254B (en) A kind of method and device of management storage device
US10007436B2 (en) Storage control apparatus and control method of storage control apparatus
US20140297988A1 (en) Storage device, allocation release control method
EP3018585A1 (en) Machine provision method, machine provision system, and machine provision program
US20210124510A1 (en) Using telemetry data from different storage systems to predict response time
US9619154B2 (en) Computer system, data management method, and host computer
JP5492731B2 (en) Virtual machine volume allocation method and computer system using the method
US20140047144A1 (en) I/o device and storage management system
US20170139779A1 (en) Controller, storage system, and non-transitory computer-readable storage medium having control program stored therein
CN105573862B (en) Method and equipment for recovering file system
US20180032351A1 (en) Information processing method and storage device

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