CN101609393A - The operating system access of non-LVM is based on the method for the memory device of LV volume - Google Patents

The operating system access of non-LVM is based on the method for the memory device of LV volume Download PDF

Info

Publication number
CN101609393A
CN101609393A CNA2009100894751A CN200910089475A CN101609393A CN 101609393 A CN101609393 A CN 101609393A CN A2009100894751 A CNA2009100894751 A CN A2009100894751A CN 200910089475 A CN200910089475 A CN 200910089475A CN 101609393 A CN101609393 A CN 101609393A
Authority
CN
China
Prior art keywords
volume
virtual disk
sector
address
byte
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
CNA2009100894751A
Other languages
Chinese (zh)
Other versions
CN101609393B (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.)
POWER7 (DONGGUAN) TECHNOLOGY COMPANY, LTD.
Original Assignee
BEIJING SHUSHUAI TECHNOLOGY 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 BEIJING SHUSHUAI TECHNOLOGY Co Ltd filed Critical BEIJING SHUSHUAI TECHNOLOGY Co Ltd
Priority to CN2009100894751A priority Critical patent/CN101609393B/en
Publication of CN101609393A publication Critical patent/CN101609393A/en
Application granted granted Critical
Publication of CN101609393B publication Critical patent/CN101609393B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

The invention provides the method for a kind of operating system access of non-LVM, comprising: structure one virtual disk with Master boot sector based on the memory device of LV volume; Each memory address of virtual disk is mapped to each storage ground of the LV volume that to visit; When the memory address of virtual disk is conducted interviews, visit the memory address of the LV volume that this memory address is mapped to.Use the present invention, the operating system that solves non-LVM mechanism can't be discerned the memory storage based on LVM, promptly realizes the LV volume that the main frame of non-LVM operating system can Direct Recognition be set up on disk based on LVM mechanism.

Description

The operating system access of non-LVM is based on the method for the memory device of LV volume
Technical field
The present invention relates to the method for a kind of operating system access of non-LVM based on the memory device of LV volume.
Background technology
LVM; Logical Disk volume management (Logical Volume Manager); be that provide under the present (SuSE) Linux OS a kind of shuts down under the prerequisite and can adjust the size of file system freely zero, the convenient file system that realizes is crossed over a solution of different disk and subregion.
LVM is a logical layer that is based upon on hard disk and the subregion, improves the dirigibility of disk partition management.By the light hyperdisk subregion of LVM system manager, as: several disk partition are connected to the volume group (Volume Group) of a monoblock, form a storage pool.The keeper can arbitrarily create logical volume on the volume group (LV LogicalVolumes), and further creates file system on logical volume.The keeper can adjust the size of logical volume easily by LVM, and can name, manage and distribute according to the mode of volume group disk storage.
LV volume based on LVM mechanism is set up at disk does not have partition table in the disk sector reference position.Linux is distinctive on one's own account LVM mechanism, distinguish with operate disk on different LV volume.When an operating system that does not have LVM mechanism, Windows operating system for example, when visiting a disk by the LVM mechanism management, it can not find subregion.That is to say,, promptly can't discern this disk if a main frame that does not have LVM mechanism as the computing machine of Windows operating system is installed, directly to this disk partition address visit, can not get partition information.For example, for the USB portable hard drive that adopts LVM mechanism, after the computing machine of Windows operating system was installed in access, Windows operating system can't identify this portable hard drive LV volume.
Summary of the invention
In view of this, fundamental purpose of the present invention is to provide the method for a kind of operating system access of non-LVM based on the memory device of LV volume, the LV volume of can Direct Recognition being set up on disk based on LVM mechanism with the main frame of realizing non-LVM operating system.
The invention provides the method for a kind of operating system access of non-LVM, comprise step based on the memory device of LV volume:
A, structure one virtual disk with Master boot sector;
B, each memory address of virtual disk is mapped to each memory address of the LV volume that to visit;
C, when the memory address of virtual disk is conducted interviews, visit the memory address of the LV volume that this memory address is mapped to.
Hence one can see that, by structure one virtual disk with Master boot sector on based on the disk of LVM mechanism, can make the main frame identification of non-LVM operating system and the visit disk based on LVM mechanism.
In the above-mentioned method, it is characterized in that the step of the virtual disk of the described Master boot sector of structure comprises in the steps A:
The core buffer of A1, application specified byte is as the virtual Master boot sector of virtual disk;
A2, the virtual Master boot sector of being created is carried out assignment so that described virtual disk is addressable.
Hence one can see that, and the core buffer of application specified byte utilizes equipment have hardware resource as the virtual Master boot sector of virtual disk, need not additionally increase hardware, low-costly consumes realization down and produce more conveniently or reequip disk based on LVM mechanism.
In the above-mentioned method, it is characterized in that steps A 2 is described carries out assignment to the virtual Master boot sector of being created and comprise:
Obtain the Main Boot Record start-up routine and the startup character string of the Main Boot Record sector of LV volume, and assignment starts character string for the Main Boot Record start-up routine of described virtual Master boot sector and Main Boot Record;
According to disk structure the virtual disk partition table is carried out assignment.
Hence one can see that, utilize the system function under the existing Linux to obtain the Main Boot Record start-up routine and the startup character string of the Main Boot Record sector of LV volume, and assignment can construct the Main Boot Record start-up routine of virtual disk partition and start character string to the Main Boot Record start-up routine and the Main Boot Record startup character string of described virtual Master boot sector.
In the above-mentioned method, it is characterized in that, describedly the virtual disk partition table is carried out assignment comprise:
The byte of the sevtor address that the expression virtual disk partition that comprises begins is set to the sevtor address of representing that virtual disk partition begins;
The byte of total sector number that the expression virtual disk partition that comprises takies is set to the shared sector number sum of core buffer that LV rolls up shared number of sectors and the specified byte of being applied for.
Hence one can see that, and the byte setting of the sevtor address that virtual disk partition is begun, and the byte setting of total sector number that virtual disk partition is taken can construct beginning sevtor address and total sector number of virtual disk master boot partition.
In the above-mentioned method, it is characterized in that, describedly the virtual disk partition table is carried out assignment comprise:
The byte of the expression virtual disk partition guide signing that comprises is set to represent inactive partition;
The byte of the expression virtual disk partition start address form that comprises is set to represent non-CHS form;
The byte of the type of the expression virtual disk partition that comprises is set to represent that divisional type is the fat32 file system;
The byte of the expression virtual disk partition end address form that comprises is set to represent non-CHS form;
Hence one can see that, and above-mentioned virtual partition table has better disk partition sheet format, and its value can be provided with neatly.
In the above-mentioned method, it is characterized in that described LV rolls up shared number of sectors and obtains in the following way:
Obtain the shared byte number of LV volume;
Calculate LV according to following formula and roll up shared sector number:
LV rolls up shared byte number/512 of shared sector number=LV volume.
Hence one can see that, utilizes above-mentioned formula to calculate LV and roll up shared sector number, can further release total sector number that virtual disk partition takies.
In the above-mentioned method, it is characterized in that described step B comprises:
B1, according to the sevtor address that begins of expression virtual disk partition in the virtual disk partition table as the virtual disk partition start address;
Each LV that B2, basis are obtained rolls up shared number of sectors and calculates the memory address number that each LV rolls up shared memory device;
B3, be side-play amount, each memory address after this start address of virtual disk partition be mapped to successively the memory address of described each LV volume with described virtual disk partition start address.
Hence one can see that, each memory address of virtual disk can be mapped to each memory address of the LV volume that will visit.
In the above-mentioned method, it is characterized in that the described visit of step C is when reading, the step of described visit comprises:
The start address of the LV volume sector of C71, calculating actual access comprises:
Start address=(sevtor address-127 that request is read) * 512 of actual access LV_A volume sector;
C72, by the start address of the actual access LV that calculates volume sector, read according to the byte length that reads in the described reading command.
Hence one can see that, according to the good mapping between virtual disk and the LV volume, can carry out read operation to the memory address of the LV volume that this memory address was mapped to indirectly by the memory address of accesses virtual disk.
In the above-mentioned method, it is characterized in that when the described visit of step C was write data, the step of described visit comprised:
The start address of C81, calculating actual access LV volume sector comprises:
Start address=(sevtor address-127 that request is write) * 512 of actual access LV_A volume sector;
C82, by the start address of the actual access LV that calculates volume sector, the data in the write data instruction are write in the LV volume.
Hence one can see that, according to the good mapping between virtual disk and the LV volume, can carry out write operation to the memory address of the LV volume that this memory address was mapped to indirectly by the memory address of accesses virtual disk.
Description of drawings
Fig. 1 is the LV volume and virtual disk mapping relations synoptic diagram in the disk of LVM volume group management;
Fig. 2 is by the process flow diagram of usb bus visit based on the subregion in the disk of LVM volume group;
Fig. 3 is the mapping relations figure of virtual disk storage space and LV volume storage space;
Fig. 4 is the process flow diagram that reads the disk of LV volume;
Fig. 5 is a process flow diagram of writing the disk of LV volume.
Embodiment
For the operating system that does not have LVM mechanism, as Windows operating system (present embodiment will as example), it during the visit disk logic sector addressing mode visit disk with its defined, because LV volume mode is different with creating on disk based on LVM mechanism, thereby can't directly visit the LV volume of creating on the described disk.
The present invention is provided with a system program (as the program based on Linux) with LVM mechanism in described disk based on the LVM mechanism management, set up the mapping relations of LV volume and the logic sector of Windows operating system access on the disk by described program by creating a virtual disk, realize that Windows operating system can be by the volume of the LV on the described virtual disc accesses disk.Wherein, described disk can be for being equipped with the portable hard drive of linux system program, perhaps for the mobile playing device of linux system is installed, as based on the MP3/MP4 hard disc player of Liunx system etc.
At first describe with the virtual disk mapping relations based on the volume of the LV in the disk of LVM mechanism management, comprising as shown in Figure 1:
Disk 101: the expression physical storage medium can be hard disk, portable hard drive, USB flash disk (or claiming flash disk) etc.;
Logical volume group (LVM, Logical Volume Group) 102: be meant and in one or more disk 101 subregions, mark the logical volume group space that a panel region is formed.LVM volume category is similar to the physical disk in the non-LVM system, and it is made up of physical volume (physical volume is the basic stored logic piece of LVM, refer to fdisk or from have the equipment of said function in logic with disk partition, as RAID);
Logical volume (LV, Logical Volume) 103: be that a room that marks from LVM volume group is formed an independently volume, i.e. LV volume.The space of LV volume is less than operable space in the LVM volume group, and the LV volume must belong to a LVM volume group.LV volume is similar to the fdisk in the non-LVM system, can set up file system on the LV volume, as ext2, ext3, reiserfs, ntfs file system etc.;
Virtual disk 104: a virtual disk that is used for more than one LV is rolled up virtual composition among the present invention;
USB interface layer 105: the logic middle layer that expression is made up of USB device (USB DEVICE) chip; It has the logic sector addressing space of oneself, and is corresponding one by one with the actual logic sector addressing space of disk; Be responsible for receiving the order that main frame sends over, resolve its order, and carry out its operation, from disk, read sector data and return to main frame or the data that main frame sends over are write designated sector;
Main frame 106: be the equipment that Windows operating system (as Windows98, Windows XP, operating systems such as Windows NT, WinCE) is installed in this example, as PC or notebook computer.
Show the process flow diagram of the LV volume 103 that main frame 106 that Windows operating system is installed creates based on LVM mechanism by the usb bus visit as Fig. 2 on disk, after the instruction that receives 101 visits of 106 pairs of disks of described main frame, carry out following steps:
Step 201: according to the partition table structure that designs in advance, create a virtual Master boot sector, and create the partition table of virtual disk 104.Specifically comprise:
At first, one 65024 byte (virtual disk 104 preceding 127 sectors of static application, every sector 512 bytes, 512 * 127 bytes altogether) core buffer (iovst_mem_partition), wherein preceding 512 bytes, be first sector as virtual Master boot sector, deposit the virtual disk partition table of establishment.
The as shown in table 1 below distribution of virtual Master boot sector address of wherein, being created:
Start address The end address Action scope
0x0000 0x008a Main guiding record start-up routine
0x008b 0x00d9 Main guiding record starts character string
0x00da 0x01bc Keep the territory
0x01be 0x01fd The disk partition list area
0x01fe 0x01ff Main guiding record significant notation
Table 1
Then, the virtual Master boot sector of being created is carried out assignment.Specifically comprise:
The assignment of Main Boot Record start-up routine and startup character string: call the vfs_read function that (SuSE) Linux OS provides, obtain first sector data of LV volume 103 on the disk 101, be Main Boot Record sector (MBR, Master Boot Recorder), give described virtual Master boot sector with the Main Boot Record sectors of data obtained (being first sector data of LV volume 103) assignment then, specifically comprise: with the main guiding record start-up routine of first sector data of first LV volume 103 and start character string respectively assignment give the main guiding record start-up routine of the virtual main boot partition table of being created and start character string.
Keep valuation of a field: keep the territory and be filled to zero.
The disk partition list area, promptly the virtual disk partition table is made up of 4 partition tables, and each subregion has 16 bytes, adopts subregion 0 herein, and its assignment is as follows:
The 0th byte of virtual disk partition table subregion 0 (being used for representing virtual disk 104 subregion guide signings) is set to 0x0, represents that this subregion is set to inactive partition;
The 1st~3 byte of virtual disk partition table subregion 0 (being used for representing the CHS form of virtual disk 104 subregion start addresss) is set to 0x0, and the CHS form is not adopted in expression, Gu it is set to zero;
The 4th byte of virtual disk partition table subregion 0 (being used for representing the type of virtual disk 104 subregions) is set to 0xc, and the expression divisional type is the fat32 file system;
The 5th~7 byte of virtual disk partition table subregion 0 (being used for representing the CHS form of virtual disk 104 subregion end addresses) is set to 0x0, and the CHS form is not adopted in expression, Gu it is set to zero;
The 8th~11 byte of virtual disk partition table subregion 0 (being used for representing the sevtor address of virtual disk partition 104 beginnings) is set to 0x80, and the sevtor address that the expression subregion begins is 0x80;
The 12nd~15 byte of virtual disk partition table subregion 0 (be used for representing the sector number altogether that virtual disk 104 subregions take) is set to the actual shared number of sectors and 127 sector sums of being applied for of LV volume 103.Such as, present embodiment one has three LV volumes 103, and its title is respectively LV_A volume, LV_B volume and LV_C volume, number of sectors+127 of the number of sectors+LV_C volume of the number of sectors+LV_B volume of each volume all sector numbers=LV_A volume altogether.Wherein, for obtaining of the shared number of sectors of virtual disk 104 subregions, will hereinafter be described.
The assignment of main guiding record significant notation: be set to 0xaa55, expression partition table end mark.
So far, the virtual Master boot sector assignment of being created finishes.In addition, for other 126 sectors of core buffer, i.e. 2-127 piece sector, its value also is filled to zero, is used for as reserve area.
Obtaining step for the shared number of sectors of virtual disk 104 subregions mentioned above may further comprise the steps:
At first, call linux kernel system function filp_open, open LV volume 103 (LV volume 103 exist with a file mode);
Then, call linux kernel system function i_size_read obtain LV volume 103 shared byte what, i.e. the file size file_length (the file size sum of LV_A and LV_B, LV_C) of LV volume 103; And roll up the shared num_sectors=file_length/512 of number of sectors altogether that 103 file sizes calculate LV volume 103 by LV;
Thereby, calculate virtual disk 104 shared byte what, i.e. shared byte=file_length+127 * 512 of virtual disk 104; And the shared number of sectors=num_sectors+127 that calculates virtual disk 104.Here 127 be virtual disk 104 preceding 127 sectors of being applied for.
Step 202: the sevtor address that begins according to the expression virtual disk partition that provides in the virtual disk partition table is as start address, be about to from the 128th sector of virtual disk, sector actual quantity according to each LV volume carries out calculations of offset, with the 128th later sector storage spatial mappings of virtual disk 104 each storage space to each LV volume 103 that will visit.
Concrete mapping relations of rolling up 103 storage spaces referring to virtual disk 104 storage spaces as shown in Figure 3 and LV, wherein the address of virtual disk 104 is expressed as follows content:
0x00000~0x001FF: i.e. the 1st sector (sector 0) of the expression virtual disk 104 set up of step 201, for the virtual Master boot sector that makes up, form by 512 bytes;
0x00200~0x0FFFF: i.e. the 2nd~127 sector (sector 1--126) of the expression virtual disk 104 set up of step 201, be reserve area, all use zero padding;
0x10000~(0x10000+MAX_A-1): i.e. the first of the data space of the expression virtual disk 104 of this step foundation maps directly to according to man-to-man relation in the storage space of actual LV_A volume; The LV_A volume memory space address that wherein is mapped to is 0~(MAX_A-1);
(0x10000+MAX_A)~(0x10000+MAX_A+MAX_B-1): i.e. the data space second portion of the expression virtual disk 104 of this step foundation maps directly to according to man-to-man relation in the storage space of actual LV_B volume; The LV_B volume memory space address that wherein is mapped to is 0~(MAX_B-1);
(0x10000+MAX_A+MAX_B)~(0x10000+MAX_A+MAX_B+MAX_C-1): i.e. the third part of the data space of the expression virtual disk 104 of this step foundation maps directly to according to man-to-man relation in the storage space of actual LV_C volume; The LV_C volume memory space address that wherein is mapped to is 0~(MAX_C-1).
Step 203: when the described LV of main frame 106 visits that the Windows system is installed rolls up 103 disk 101, the mode of the storage space by the virtual disk 104 set up of visit, the storage space of each LV volume 103 that visit is mapped to, realize to this have the LV volume disk 101 data read or operation such as write.Be that the process that example is visited the disk 101 of LV volume 103 to main frame 106 is elaborated below with the read-write:
When having set up described virtual disk 104, main frame 106 sends READCAPABILITY by usb bus and orders to behind the USB interface layer 105, and USB interface layer 105 returns to main frame with virtual disk 104 shared sector numbers as the largest logical sector number.
The process flow diagram that reads the disk 101 of LV volume 103 as shown in Figure 4 when main frame 106 sends read command by usb bus, is given USB interface layer 105 with the sevtor address that will read and the length of being read; USB interface layer 105 is resolved this order, identifies sevtor address and the length read for read operation and the request of parsing, may further comprise the steps afterwards:
Step 2031: when the sevtor address that the judgement request is read is counted more than or equal to the maximum sector of virtual disk 104, then return the access errors sign indicating number that crosses the border, program is returned, otherwise carries out next step.
Step 2032: when the sevtor address that the judgement request is read equals 0 (being first sector), carry out following operation, otherwise execution in step 2033.
Step 2032a: judge if the length that request is read equals 0 or greater than 127 o'clock, return the access errors sign indicating number function that crosses the border and return; Otherwise carry out next step.
Step 2032b: judge that the length that request is read equals at 1 o'clock, returns to main frame 106 with the virtual disk partition table that constructs; Otherwise carry out next step.
Step 2032c: when carrying out this step, the length of then asking to read is greater than 1 and less than 127, because the virtual disk partition table of first sector (0 sector) for constructing, the content of 1 to 127 sector length is all used zero padding, so 0 data that will fill return to main frame 106.
Step 2033: judge the sevtor address of asking to read greater than 0 and smaller or equal to the sector number 127 that subregion begins, 0 data that then will fill are returned; Otherwise carry out next step.
Step 2034: when carrying out this step, the sevtor address of then asking to read carries out following operation greater than the sector number 127 that subregion begins:
Step 2034a: the sevtor address that sevtor address-virtual disk partition that request is read begins, then its difference be multiply by 512, finally will obtain the start address of actual read access LV_A volume sector;
Step 2034b: according to the start address of actual read access LV_A volume sector, the data that read described length return to main frame 106.
What say here is, the unit of sevtor address n sector for example herein, and the unit of described sector start address is a physical address.
Referring to the process flow diagram of the disk 101 of writing LV volume 103 shown in Fig. 5, when main frame 106 sends write order by usb bus, give USB interface layer 105 with the sevtor address that will write and the data that will write; USB interface layer 105 is resolved this order, identifies sevtor address and the data write for write operation and the request of parsing, may further comprise the steps afterwards:
Step 20301: if when the sevtor address write of request is counted more than or equal to the maximum sector of virtual disk 104, then return the access errors sign indicating number that crosses the border, program is returned; Otherwise carry out next step.
Step 20302-20303: if the sevtor address write of request equal 0 or the sevtor address write of request greater than 0 and smaller or equal to 127 o'clock, USB interface layer 105 is ignored this write operation, program is returned; Otherwise, the following operation of execution in step 20304.
Step 20304a: the sevtor address that sevtor address-virtual disk partition that request is write begins, then its difference be multiply by 512, finally will obtain the start address of the actual LV_A of writing volume sector;
Step 20304b: the data that will write begin to write from the start address of the actual LV_A of writing volume sector.
For a plurality of LV volumes 103, as LV_B, the sector start address of LV_C: actual access LV_B volume=(the maximum sector number of the sevtor address that the sevtor address-virtual disk partition of request visit begins-LV_A volume) * 512; The sector start address of actual access LV_C volume=(the maximum sector number of the maximum sector number of the sevtor address that the sevtor address-virtual disk partition of request visit begins-LV_A volume-LV_B volume) * 512.By that analogy, the actual access address in the time of can calculating a plurality of volumes and exist.
As seen from the above, by the virtual disk 104 set up and LV roll up 103 storage spaces mapping relations, when the main frame of Windows system need be visited the storage space of LV103 volume, the virtual disk 104 that its visit is set up can realize visiting the data of the storage space of the LV103 volume that is mapped to.
The above only is preferred embodiment of the present invention, not in order to restriction the present invention.For example present embodiment describes as embodiment with the equipment that Windows operating system is installed, and also can be the equipment that the operating system of other non-LVM mechanism is installed, as mobile phone, the employed operating system of DVD player etc.
In addition, though more than be that example describes with the USB interface, be to consider that the disk with the LV volume is an example as portable hard drive.Being understood that, also can be other interfaces, as serial ports, parallel port, 1394 fire-wire interfaces etc.Within the spirit and principles in the present invention all, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (9)

1. the operating system access of a non-LVM is characterized in that based on the method for the memory device of LV volume, comprising:
A, structure one virtual disk with Master boot sector;
B, each memory address of virtual disk is mapped to each memory address of the LV volume that to visit;
C, when the memory address of virtual disk is conducted interviews, visit the memory address of the LV volume that this memory address is mapped to.
2. method according to claim 1 is characterized in that, the step of the virtual disk of the described Master boot sector of structure comprises in the steps A:
The core buffer of A1, application specified byte is as the virtual Master boot sector of virtual disk;
A2, the virtual Master boot sector of being created is carried out assignment so that described virtual disk is addressable.
3. method according to claim 2 is characterized in that, steps A 2 is described carries out assignment to the virtual Master boot sector of being created and comprise:
Obtain the Main Boot Record start-up routine and the startup character string of the Main Boot Record sector of LV volume, and assignment starts character string for the Main Boot Record start-up routine of described virtual Master boot sector and Main Boot Record;
According to disk structure the virtual disk partition table is carried out assignment.
4. method according to claim 3 is characterized in that, describedly the virtual disk partition table is carried out assignment comprises:
The byte of the sevtor address that the expression virtual disk partition that comprises begins is set to the sevtor address of representing that virtual disk partition begins;
The byte of total sector number that the expression virtual disk partition that comprises takies is set to the shared sector number sum of core buffer that LV rolls up shared number of sectors and the specified byte of being applied for.
5. method according to claim 4 is characterized in that, describedly the virtual disk partition table is carried out assignment comprises:
The byte of the expression virtual disk partition guide signing that comprises is set to represent inactive partition;
The byte of the expression virtual disk partition start address form that comprises is set to represent non-CHS form;
The byte of the type of the expression virtual disk partition that comprises is set to represent that divisional type is the fat32 file system;
The byte of the expression virtual disk partition end address form that comprises is set to represent non-CHS form.
6. method according to claim 4 is characterized in that, described LV rolls up shared number of sectors and obtains in the following way:
Obtain the shared byte number of LV volume;
Calculate LV according to following formula and roll up shared sector number:
LV rolls up shared byte number/512 of shared sector number=LV volume.
7. according to claim 4,5 or 6 described methods, it is characterized in that described step B comprises:
B1, according to the sevtor address that begins of expression virtual disk partition in the virtual disk partition table as the virtual disk partition start address;
Each LV that B2, basis are obtained rolls up shared number of sectors and calculates the memory address number that each LV rolls up shared memory device;
B3, be side-play amount, each memory address after this start address of virtual disk partition be mapped to successively the memory address of described each LV volume with described virtual disk partition start address.
8. method according to claim 7 is characterized in that, the described visit of step C is when reading, and the step of described visit comprises:
The start address of the LV volume sector of C71, calculating actual access comprises:
Start address=(sevtor address-127 that request is read) * 512 of actual access LV_A volume sector;
C72, by the start address of the actual access LV that calculates volume sector, read according to the byte length that reads in the described reading command.
9. method according to claim 7 is characterized in that, when the described visit of step C was write data, the step of described visit comprised:
The start address of C81, calculating actual access LV volume sector comprises:
Start address=(sevtor address-127 that request is write) * 512 of actual access LV_A volume sector;
C82, by the start address of the actual access LV that calculates volume sector, the data in the write data instruction are write in the LV volume.
CN2009100894751A 2009-07-21 2009-07-21 Method for Non-LVM operating system accessing to storage device based on LV roll Active CN101609393B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009100894751A CN101609393B (en) 2009-07-21 2009-07-21 Method for Non-LVM operating system accessing to storage device based on LV roll

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009100894751A CN101609393B (en) 2009-07-21 2009-07-21 Method for Non-LVM operating system accessing to storage device based on LV roll

Publications (2)

Publication Number Publication Date
CN101609393A true CN101609393A (en) 2009-12-23
CN101609393B CN101609393B (en) 2011-05-25

Family

ID=41483160

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009100894751A Active CN101609393B (en) 2009-07-21 2009-07-21 Method for Non-LVM operating system accessing to storage device based on LV roll

Country Status (1)

Country Link
CN (1) CN101609393B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102214074A (en) * 2010-04-30 2011-10-12 华硕科技(苏州)有限公司 Storage device in computer system and control method of storage device
CN102736858A (en) * 2011-04-01 2012-10-17 柴可 Realization method for embedded virtual USB disk
CN103106159A (en) * 2013-01-31 2013-05-15 武汉天喻信息产业股份有限公司 Method for establishing channel to access intelligent storage device
CN105260323A (en) * 2015-10-21 2016-01-20 华为技术有限公司 Processing method and apparatus for virtual data storage
CN105718377A (en) * 2014-12-05 2016-06-29 华为技术有限公司 Method and apparatus for copying magnetic disk data in virtual application
CN106909441A (en) * 2017-02-28 2017-06-30 焦点科技股份有限公司 The method that a kind of direct I/O of disk based on JVM is accessed

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102214074A (en) * 2010-04-30 2011-10-12 华硕科技(苏州)有限公司 Storage device in computer system and control method of storage device
CN102214074B (en) * 2010-04-30 2014-09-10 华硕科技(苏州)有限公司 Storage device in computer system and control method of storage device
CN102736858A (en) * 2011-04-01 2012-10-17 柴可 Realization method for embedded virtual USB disk
CN103106159A (en) * 2013-01-31 2013-05-15 武汉天喻信息产业股份有限公司 Method for establishing channel to access intelligent storage device
CN103106159B (en) * 2013-01-31 2015-12-23 武汉天喻信息产业股份有限公司 A kind of method setting up channel access intelligent storage equipment
CN105718377A (en) * 2014-12-05 2016-06-29 华为技术有限公司 Method and apparatus for copying magnetic disk data in virtual application
CN105718377B (en) * 2014-12-05 2019-10-25 华为技术有限公司 The method and device of data in magnetic disk is copied in virtualization applications
CN105260323A (en) * 2015-10-21 2016-01-20 华为技术有限公司 Processing method and apparatus for virtual data storage
CN105260323B (en) * 2015-10-21 2019-02-05 华为技术有限公司 A kind of Storage Virtualization data processing method and device
CN106909441A (en) * 2017-02-28 2017-06-30 焦点科技股份有限公司 The method that a kind of direct I/O of disk based on JVM is accessed
CN106909441B (en) * 2017-02-28 2020-10-02 焦点科技股份有限公司 Disk direct I/O access method based on JVM

Also Published As

Publication number Publication date
CN101609393B (en) 2011-05-25

Similar Documents

Publication Publication Date Title
CN101609393B (en) Method for Non-LVM operating system accessing to storage device based on LV roll
CN101727295B (en) Method for writing in and reading out data based on virtual block flash memory address mapping
KR100980905B1 (en) Data storing apparatus
US8572310B2 (en) Invalidating storage area of non-volatile storage medium based on metadata
CN102819408B (en) The implementation method of the RAID 0 of dynamic adjustment stripe depth and system
CN100426259C (en) Virtual access method of storage document data
US20110145489A1 (en) Hybrid storage device
US20140122781A1 (en) Hierarchical flash translation layer
TW201841118A (en) Method and apparatus for providing multi-namespace using mapping memory
US20080229046A1 (en) Unified support for solid state storage
CN104246764A (en) Method and apparatus utilizing non-uniform hash functions for placing records in non-uniform access memory
CN104035729A (en) Block device thin-provisioning method for log mapping
CN103207883A (en) Method For Metadata Persistence
JP2003308240A (en) Data storage device
JPWO2009153982A1 (en) Multiple-partitioned nonvolatile storage device and system
US10649893B2 (en) Namespace planning of non-volatile memory of data storage device
CN103020550A (en) Solid state disk and secure access method thereof as well as solid state disk system
CN101714065A (en) Method for managing mapping information of flash controller
US20110035543A1 (en) Memory drive that can be operated like optical disk drive and method for virtualizing memory drive as optical disk drive
US20120089765A1 (en) Method for performing automatic boundary alignment and related non-volatile memory device
US8239427B2 (en) Disk layout method for object-based storage devices
CN101441596B (en) Method for improving flash memory medium read-write speed
CN101876927A (en) Power-off protection method for realizing FAT32 file system, and device thereof
CN101303667B (en) Method and device for establishing magnetic disk null cluster table and seeking magnetic disk null cluster
US20190114112A1 (en) Data storage management method and data storage system with namespace planning

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
ASS Succession or assignment of patent right

Owner name: DONGGUAN TAIKEV TECHNOLOGY CO., LTD.

Free format text: FORMER OWNER: BEIJING SHUSHUAI TECHNOLOGY CO., LTD.

Effective date: 20120201

C41 Transfer of patent application or patent right or utility model
COR Change of bibliographic data

Free format text: CORRECT: ADDRESS; FROM: 102208 CHANGPING, BEIJING TO: 523528 DONGGUAN, GUANGDONG PROVINCE

TR01 Transfer of patent right

Effective date of registration: 20120201

Address after: 523528 China in Guangdong province Dongguan City Qiaotou Shuikou stone village Lianhu Road No. 2 Binjiang Street

Patentee after: POWER7 (DONGGUAN) TECHNOLOGY COMPANY, LTD.

Address before: 102208 room 402, Dragon Tower, Changping District, Beijing, Huilongguan

Patentee before: Beijing Shushuai Technology Co., Ltd.