Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method and device for binding disk drive in Linux system

A drive letter, binding technology, applied in the field of operating systems, can solve problems such as inconsistencies

Active Publication Date: 2015-06-10
XFUSION DIGITAL TECH CO LTD
View PDF5 Cites 24 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Some processes in the system will directly detect the hard disk through the drive letter of the kernel device under / sys / . At this time, the drive letter sdx reported by the process is inconsistent with the user mode device sdy.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and device for binding disk drive in Linux system
  • Method and device for binding disk drive in Linux system
  • Method and device for binding disk drive in Linux system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0043]The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some of the embodiments of the present invention, but not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

[0044] figure 1 A schematic flowchart of a method 100 for binding a drive letter in a Linux system according to an embodiment of the present invention is shown. The method 100 is executed in the Linux system, including:

[0045] S110, when adding a disk device in the Linux system, the kernel allocates a first drive letter corresponding to the kernel device for the disk device;

[0046] S120. The device manager UDEV obtains information indicating the s...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a method and device for binding a disk drive in a Linux system. The method comprises the steps that when a disk device is added to the Linux system, a first disk drive corresponding to a kernel device is assigned to the disk device by a kernel; information indicating a slot position of the disk device is obtained by UDEV, and a second disk drive corresponding to a user mode device is assigned to the disk device by the UDEV according to the slot position of the disk device and the mapping relation between a preset slot position and the disk drive; and name change information is transmitted to the kernel by the UDEV, and the name of the kernel device and a name pointing to a link of the kernel device is changed from the first disk drive into the second disk drive by the kernel according to the name change information. According to the method, the disk drive of the user mode device is determined by the UDEV for the new disk device, the name change information is transmitted to the kernel by the UDEV, and the disk drive of the kernel device and the disk drive of the link pointing to the kernel device are modified to be identical to the disk drive of the user mode device by the kernel according to the name change information, so that the binding between the slot position and the disk drive is achieved.

Description

technical field [0001] The embodiment of the present invention relates to the field of operating systems, and more specifically, to a method and device for binding a drive letter in a Linux system. Background technique [0002] When there are multiple hard disks in the Linux system, the Small Computer System Interface (SCSI) driver module in the kernel usually assigns drive letters to each hard disk, for example, / dev / sda, / dev / sdb, / dev / sdc, ...etc. During system startup, the kernel assigns drive letters in the order in which the hard disks are scanned. After the system is started, when the hard disk is hot-swapped, the system will assign drive letters sequentially after adding new hard disks. Therefore, for the same hard disk slot, the drive letter of the slot in the system may be inconsistent after each startup or hot-swapping of the hard disk. That is, the drive letter assigned by the Linux system to the hard disk has nothing to do with the slot where the hard disk i...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F3/06
Inventor 张亚林
Owner XFUSION DIGITAL TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products