Method and device for positioning faulty disk
AssigneeZte Corporation
InventorYuxue Liu
Life of this patent
Estimating the term…
Abstract
Disclosed are a method and device for positioning a faulty disk. The method comprises: in response to detecting that a first disk is faulted, determining positioning information of the first disk, the positioning information comprising a logic Enclosure Identity (EID) and a logic Slot Identity (SID); and positioning the first disk according to the EID and SID of the first disk.
Claims7
A method for positioning a faulty disk, comprising:
- in response to detecting that a first disk is faulted, determining positioning information of the first disk, the positioning information comprising a logic Enclosure Identity (EID) and a logic Slot Identity (SID);
- and positioning the first disk according to the EID and SID of the first disk;
- wherein the determining positioning information of the first disk comprises:
- identifying a management mode of the first disk, which is Serial Attached SCSI (SAS) controller management or Redundant Arrays of Independent Drives (RAID) management;
- and
- determining positioning information of the first disk according to the management mode of the first disk;
- wherein, in response to the management mode of the first disk being SAS controller management, the determining positioning information of the first disk according to the management mode of the first disk comprises:
- determining Small Computer System Interface (SCSI) bus information of the first disk according to the name of the first disk;
- acquiring the EID and SID of the first disk mapped in a corresponding sysfs according to the SCSI bus information of the first disk;
- and
- verifying whether the SCSI bus information of the first disk presents and whether the SID of the first disk is within a scope of jurisdiction of a logic enclosure corresponding to the EID of the first disk;
- and
- wherein the positioning the first disk according to the EID and SID of the first disk comprises:
- in response to there being the SCSI bus information of the first disk and the SID of the first disk being within the scope of jurisdiction of the logic enclosure corresponding to the EID of the first disk, positioning the first disk according to the EID and SID of the first disk.
An apparatus for positioning a faulty disk, comprising:
- a determination unit, configured to, in response to detecting that a first disk is faulted, determine positioning information of the first disk, the positioning information comprising a logic Enclosure Identity (EID) and a logic Slot Identity (SID), wherein the determination unit is further configured to identify a management mode of the first disk, which is Serial Attached SCSI (SAS) controller management or Redundant Arrays of Independent Drives (RAID) management, and determine positioning information of the first disk according to the management mode of the first disk, wherein the determination unit is further configured to, in response to the management mode of the first disk being SAS controller management, determine Small Computer System Interface (SCSI) bus information of the first disk according to the name of the first disk, and acquire the EID and SID of the first disk mapped in a corresponding sysfs according to the SCSI bus information of the first disk;
- a verification unit configured to, after acquiring the EID and SID of the first disk mapped by the corresponding sysfs according to the SCSI bus information of the first disk, verify whether the SCSI bus information of the first disk presents and whether the SID of the first disk is within a scope of jurisdiction of a logic enclosure corresponding to the EID of the first disk;
- and
- a positioning unit, configured to position the first disk according to the EID and SID of the first disk, wherein the positioning unit is further configured to, in response to there being the SCSI bus information of the first disk and the SID of the first disk being within the scope of jurisdiction of the logic enclosure corresponding to the EID of the first disk, position the first disk according to the EID and SID of the first disk.
A device for positioning a faulty disk, comprising a memory, a processor and computer programs that are stored on the memory and executable by the processor, wherein the computer programs, when executed by the processor, cause the processor to carry out a method for positioning a faulty disk, the method comprising:
- in response to detecting that a first disk is faulted, determining positioning information of the first disk, the positioning information comprising a logic Enclosure Identity (EID) and a logic Slot Identity (SID);
- and
- positioning the first disk according to the EID and SID of the first disk;
- wherein the determining positioning information of the first disk comprises:
- identifying a management mode of the first disk, which is Serial Attached SCSI (SAS) controller management or Redundant Arrays of Independent Drives (RAID) management;
- and
- determining positioning information of the first disk according to the management mode of the first disk;
- wherein, in response to the management mode of the first disk being SAS controller management, the determining positioning information of the first disk according to the management mode of the first disk comprises:
- determining Small Computer System Interface (SCSI) bus information of the first disk according to the name of the first disk;
- acquiring the EID and SID of the first disk mapped in a corresponding sysfs according to the SCSI bus information of the first disk;
- and
- verifying whether the SCSI bus information of the first disk presents and whether the SID of the first disk is within a scope of jurisdiction of a logic enclosure corresponding to the EID of the first disk;
- and
- wherein the positioning the first disk according to the EID and SID of the first disk comprises:
- in response to there being the SCSI bus information of the first disk and the SID of the first disk being within the scope of jurisdiction of the logic enclosure corresponding to the EID of the first disk, positioning the first disk according to the EID and SID of the first disk.
Dependencies are inferred from the claim text.