TW201118740A - Capacity extending method for virtual hard disk - Google Patents

Capacity extending method for virtual hard disk Download PDF

Info

Publication number
TW201118740A
TW201118740A TW98140891A TW98140891A TW201118740A TW 201118740 A TW201118740 A TW 201118740A TW 98140891 A TW98140891 A TW 98140891A TW 98140891 A TW98140891 A TW 98140891A TW 201118740 A TW201118740 A TW 201118740A
Authority
TW
Taiwan
Prior art keywords
hard disk
virtual
virtual hard
capacity
target file
Prior art date
Application number
TW98140891A
Other languages
Chinese (zh)
Other versions
TWI441082B (en
Inventor
Shuo Yan
Tom Chen
Original Assignee
Inventec Corp
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 Inventec Corp filed Critical Inventec Corp
Priority to TW98140891A priority Critical patent/TWI441082B/en
Publication of TW201118740A publication Critical patent/TW201118740A/en
Application granted granted Critical
Publication of TWI441082B publication Critical patent/TWI441082B/en

Links

Abstract

A capacity extending method for virtual hard disk (VHD) is adapted to extend the capacity of a first VHD of a virtual machine (VM) allocated by a first physical hard disk. The capacity extending method for VHD includes the steps of providing a second physical hard disk that the capacity of the second physical hard disk is not smaller than a total extending capacity; stopping the accessing to the first VHD; creating a second VHD with the total extending capacity on the second physical hard disk; connecting the storage space of the second VHD and the first VHD; and executing a virtual machine manager (VMM) to assign the second VHD to the VM, recovering the accessing of VM to the second VHD as well.

Description

201118740 六、發明說明: 【發明所屬之技術領域】 特別是一種虛擬硬 本發明係關於一種硬碟的容量擴展方法 碟的容量擴展方法。 【先前技術】 虛擬機(Virtual Machine,VM )以芬承 α 及雲端運算(Cloud201118740 VI. Description of the Invention: [Technical Field to Be Invented by the Invention] In particular, a virtual hard disk is a method for expanding a capacity of a hard disk. [Prior Art] Virtual Machine (VM) with Fencheng α and Cloud Computing (Cloud

Computing)等將實體資源虛擬化後提供給使用者的技術、盆 所帶來的利益’正受到全世界的注目。其中帝 一 運昇係為一種新 的基於網關路〇nt咖)的方式,魏透過贿網路上不 同的服務為個人或企業的使用者提供所需運算。带 連异的資源 是虛擬化的’實體資源被虛擬化後透過網際網路提供终使用者 使用者不需要了解「雲端」中實體資源及其相關配置的細節,不 必具有相應的專業知識’也無需對實體資源直接進行控制。使用 者可以只關注自己真正需要什麼樣的資源以及如何透過網路來得 到相應的服務。 而虛擬機係將一個或多個處理器、記憶體或是儲存裝置等實 體資源集合起來後,在實體資源上被建立的虛擬平台。虛擬機亦 可Jr乂被視為在實體資源的電腦平台和終端用戶的使用者之間建立 一種環境。使用者基於這個虛擬平台所建立的環境來進行所需的 運算或是執行應用程式(Application)。架構在相同實體資源上的 每一個虛擬機都可以用有自己的虛擬資源,例如虛擬的運算單元 或虛擬硬碟(Virtual Hard Disk ’ VHD;K虛擬機亦可像具有實體之 201118740 普通的電腦一樣執行程式,或用有自己的作業系統(〇perating System ’ OS)以及應用程式。 然而既然虛擬機是架構在實體資源上,使用者在使用虛擬機 時亦可能遇到(虛擬)資源不足的情形。也就是說,使用者可能 會遇到虛擬硬碟不敷使用等情況。在實體硬碟(physical Hard Disk ) 等資源還足夠的時候,擴展使用者之虛擬硬碟的做法很簡單,只 要將剩餘的實體硬碟分配給使用者即可。然而當實體硬碟本身的 •剩餘容量亦不敷使用時,為使用者擴展虛擬硬碟的方法或變的複 雜且f時許多。傳統的減方法係需在添加新的實體硬碟後,將 使用者原絲㈣㈣難到新的實體㈣錢虛擬硬碟。當使 用者的資料係以兆位元組(Terabyte,TB)為單位或是更大時,傳 統的擴展方法需耗f極為漫長的喃^龐大的資·搬移的過程 中不但有可能會產生損失;當搬移的過財發生任何錯誤時,都 會對使用者造成莫大的傷害。 •【發明内容】 為了解決上述問題,本發明提供一種虛擬硬碟(Virtual細 Disk,VHD)的容量擴展方法,其制以擴展—第—實體硬碟 (physical hard disk)巾被指派給—虛擬機(Virtual施比⑹,彻) 的一第-虛擬硬碟的容量。虛擬硬碟的容量擴展方法包括:提供 2二實體硬碟’其巾第二實體硬碟的利容量科於—擴充總 今里士止對第-虛擬硬碟的存取操作;於第二實體硬碟上建立 谷置為擴展總容量的-第二虛擬硬碟;連結第二虛擬硬碟與第了。 201118740 虛擬硬碟的儲存空間;以及運行一虛擬機管理器(VirtualMachine Manager,VlvlM)程序,以將第二虛擬硬碟指派給虛擬機,並恢 .復虛擬機對第二虛擬硬碟的存取操作。 較佳的是,其中第一虛擬硬碟的容量加上第一實體硬碟剩餘 的可用容量小於擴展總容量。 為了刪除原先存放於第一虛擬硬碟的資料,根據本發明之虛 擬更碟的谷昼擴展方法在「運行虛擬機管理器程序」的步驟之後 另可包括:接收一刪除命令,其中刪除命令指定僅存在於第一虛 擬硬碟中的-刪除目標齡;以及刪除第—虛擬硬射的刪除目 標權案,或是刪除目標檔案與第二虛擬硬碟的連結。 而為了在「運行虛擬機管理器程序」的步驟之後新增檔案, f擬硬碟的容量擴展方法另可包括:魏-新增命令,其中新增 P 7包括-新增目標檔案;以及將新增目標檔案新增於第二虛擬 硬碟。也就是說’容量擴展之後,新增的資料係被存放於第二虛 擬硬碟。 疮根據本發明之—實施範例,在「將新增目標槽案新增於第二 虛擬硬碟」的步驟之後,另可句拓· 命令指定第1擬麟其怖改 一 〇=第-虛擬硬碟中的一修改目_案,修改命令中並包括 一修改資料;以及依據修改資料修改修改目標楷案。 而在 將新增目標槽案新增於第二虛擬硬碟」的步驟之後, :目=收刪除命令’其中刪除命令指定第二虛擬硬針的 棺案’以及由第二虛擬硬射刪除此刪除目標播案。 201118740 、句話4新增於第二虛擬硬碟的資料係可以被直接存取 以、修改或是刪除。 根據本發明之—實施範例,為了修改原先存放於第-虛擬硬 碟咐料’根據本發明之虛擬硬碟的容量擴展方法在「運行虛擬 ^官理器程序」的錄之後另可包括:接收修改命令,其中修改 命^指定第-虛擬硬碟巾的修改目標難,修改命令並包括修改 資料;以及·改資料新增於第二虛擬硬碟,並將修改資料作為 修改目標齡的—部份與修改目標職相連接。其中修改資料係 為目標檑案被改過的部分,且僅有修改·的部分被儲存於第二 虛擬硬碟。 為了《貝取上述因被修改過而被分開存放於第一虛擬硬碟以及 第二虛擬硬碟的資料,在「將修改資料新增於第二虛擬硬碟,並 將修改資料作為修改目標檔案的-部份與修改目標檔案相連接」 的步驟之後,另可包括:接收一讀取命令,其中讀取命令指定一 讀取目標檔案,且讀取目標檔案係部分存在於第一虛擬硬碟以及 第二虛擬硬碟;讀取第一虛擬硬碟以及第二虛擬硬碟中的讀取目 標檔案;以及合併並輸出由第一虛擬硬碟以及第二虛擬硬碟中讀 取的讀取目標檔案。 最後,為了刪除上述因被修改過而被分開存放於第一虛擬硬 碟以及第二虛擬硬碟的資料,在「將修改資料新增於第二虛擬磽 碟’並將修改資料作為修改目標檔案的一部份與傪改目標檔案相 連接」的步驟之後,亦可包括:接收刪除命令,其中刪除命令指 201118740 定删除目標檔案,且刪除目护 芬楚心 謂U案係部分仔在於第-虛擬硬碟以 及弟:顧硬碟;以及以擬硬碟中_除目標檔案,以及删 除目払檔案與第一虛擬硬碟的連結。 、τ'上所述’本發明所提供的虛擬硬翻容量擴展方法係可把 展指派給趣_第—麵_量,讀擬硬铜容量擴^ 方法並不需搬移第—虛擬硬碟_有的:#料 後’用戶端亦能-如往常地讀取、新增、修改或二= 些作業林轉料_触鄕_有的諸轉去第二虛擬硬 【實施方式】 以下在實施方式中詳細敘述本發明之詳細特徵以及優點,其 内谷足以使任何Α習相關技藝者了解本發明之技術内容並據以實 施,且根據本說明書所揭露之内容、申請專利範圍及圖式,任何 熟習相關技藝者可㈣地轉本發明侧之目的及優點。 本發明係提供一種虛擬硬碟的容 置擴展方法其係用以擴展一第一實體硬碟(phySicai har(j disk) 中被指派給一虛擬機(Virtual Machine,VM)的一第一虛擬硬碟 的容量。請參閱「第1圖」,其係為根據本發明一實施範例之虛擬 機之方塊示意圖。如圖所示,用戶端10可透過一虛擬管理器 (Virtual Machine Manager ’ VMM) 30 與遠端的虛擬機 32 連線。 其中每一個虛擬機32都具有至少一虛擬硬碟34,而虛擬硬碟34 係建立於一儲存池2〇中的第一實體硬碟22。 201118740 本碟22係為架構虛擬機32所需的實體硬體設備(即 ^儲存設備,可關如是硬碟、固態硬碟 ls,)或是磁碟陣列(Re—dantAiray0fIndependentDisks, 咖)。而儲存池20則為提供給虛擬機32使用 的集合。儲存池2G除了包括第—實體硬碟22之外,另可H 他的貫體硬碟以供虛擬機32使用。 為了架構虛擬機32,在第-實體硬碟μ等實體資源上可先架 構-虛擬平台(h〇st,未繪示),再於虛擬平台上建立這些虛擬機 32、。▲更詳細地說,—個虛擬平台上係可被配置至少—個虛擬機^, 且攻些虛擬機32均由架構虛擬平台之實體#源運行。每—個虛擬 機32都可具有自己的虛擬資源,以提供給連線的用戶端使用。 用戶端10可以將連線的虛擬機32視為一個具有處理器與儲存裝 置的普通的電腦,在虛擬機32中安裝—作㈣統(〇pe論gComputing, such as the benefits of technologies and basins that provide virtualized resources to users, is attracting worldwide attention. Among them, Emperor Yisheng is a new way of gateway-based communication, and Wei provides the necessary calculations for users of individuals or enterprises through different services on the bribery network. The different resources are virtualized. 'The physical resources are virtualized and the end users are provided through the Internet. The user does not need to know the details of the physical resources in the "cloud" and their related configurations, and does not have to have corresponding expertise. There is no need to directly control entity resources. Users can focus only on what resources they really need and how they can get the service through the Internet. A virtual machine is a virtual platform that is built on physical resources after a collection of physical resources such as one or more processors, memory, or storage devices. The virtual machine can also be considered as an environment between the computer platform of the physical resource and the user of the end user. The user performs the required operations or executes the application based on the environment established by the virtual platform. Each virtual machine on the same physical resource can use its own virtual resources, such as virtual computing units or virtual hard disks (Virtual Hard Disk 'VHD; K virtual machine can also be like the computer with entity 201118740 ordinary Execute the program, or use your own operating system (OS) and the application. However, since the virtual machine is built on the physical resources, the user may encounter insufficient (virtual) resources when using the virtual machine. That is to say, the user may encounter the situation that the virtual hard disk is not enough. When the resources such as the physical hard disk are enough, it is very simple to expand the user's virtual hard disk. The remaining physical hard disk can be assigned to the user. However, when the remaining capacity of the physical hard disk itself is not enough, the method of expanding the virtual hard disk for the user may become complicated and f-time. The conventional subtraction method After adding a new physical hard disk, it is difficult to add the user's original silk (4) (four) to the new entity (4) money virtual hard disk. When the user's data system When the terabytes (Terabytes, TB) are units or larger, the traditional expansion method requires a very long time. The huge amount of money is not only likely to cause losses in the process of moving; In the case of any error, it will cause great harm to the user. [Invention] In order to solve the above problems, the present invention provides a capacity expansion method for a virtual hard disk (VHD), which is extended to the first entity. A physical hard disk towel is assigned to the capacity of a virtual virtual disk (Virtual Schiff (6), Tear). The capacity expansion method of the virtual hard disk includes: providing a 2 physical hard disk 'the towel The second physical hard disk's profit capacity is used to expand the access of the current virtual memory to the first virtual hard disk; the second physical hard disk is set to expand the total capacity of the second virtual hard disk; The second virtual hard disk and the first. 201118740 virtual hard disk storage space; and run a virtual machine manager (VirtualMachine Manager, VlvlM) program to assign the second virtual hard disk to the virtual machine, and restore the virtual Preferably, the capacity of the first virtual hard disk plus the remaining available capacity of the first physical hard disk is less than the expanded total capacity. In order to delete the original virtual storage in the first virtual hard disk The data of the disc, the method for expanding the virtual disc of the virtual disc according to the present invention may further include: receiving a delete command, wherein the delete command designates only in the first virtual hard disk after the step of running the virtual machine manager program - delete the target age; and delete the delete target of the first virtual hard shot, or delete the link between the target file and the second virtual hard disk. In order to add a file after the step of "running the virtual machine manager" The f-hard disk capacity expansion method may further include: a Wei-new command, in which a new P7 includes - a new target file; and a new target file is added to the second virtual hard disk. That is to say, after the capacity expansion, the newly added data is stored on the second virtual hard disk. According to the embodiment of the present invention, after the step of "adding a new target slot to the second virtual hard disk", another sentence can be ordered to specify the first analogy to change its 〇 = first virtual A modified object in the hard disk, the modification command includes a modified data; and the modified target file is modified according to the modified data. After the step of adding the new target slot to the second virtual hard disk, the destination delete command "the delete command specifies the second virtual hard pin" and the second virtual hard shot deletes the Delete the target broadcast. 201118740, sentence 4 The data added to the second virtual hard disk can be directly accessed, modified or deleted. According to the embodiment of the present invention, in order to modify the capacity expansion method of the virtual hard disk according to the present invention, the method for expanding the capacity of the virtual hard disk according to the present invention may further include: receiving after the recording of the "run virtual program" Modify the command, where the modification command specifies that the modification target of the first-virtual hard disk towel is difficult, the modification command includes the modification of the data; and the modified data is added to the second virtual hard disk, and the modified data is used as the target of the modification target. Link to the revised target position. The modified data is the part of the target file that has been changed, and only the modified part is stored in the second virtual hard disk. In order to "take the above-mentioned data that has been separately stored on the first virtual hard disk and the second virtual hard disk, the modified data is added to the second virtual hard disk, and the modified data is used as the modified target file. After the step of connecting to the modified target file, the method further includes: receiving a read command, wherein the read command specifies a read target file, and the read target file portion is present on the first virtual hard disk and a second virtual hard disk; reading the first virtual hard disk and the read target file in the second virtual hard disk; and merging and outputting the read target file read by the first virtual hard disk and the second virtual hard disk . Finally, in order to delete the above-mentioned data that has been separately stored on the first virtual hard disk and the second virtual hard disk, the "add modified data to the second virtual virtual disk" and modify the data as the modified target file After the step of connecting a part of the target file with the tampering target file, the method may also include: receiving a delete command, wherein the delete command refers to the deletion of the target file in 201118740, and the deletion of the eye protection system means that the U case system is in the first part - The virtual hard disk and the younger brother: the hard disk; and the target file in the hard disk, and the link between the target file and the first virtual hard disk. The method of expanding the virtual hard flip capacity provided by the present invention can assign the exhibition to the interesting _ _ _ _ amount, read the hard copper capacity expansion method does not need to move the first virtual hard disk _ Some: #料后'Users can also - as usual to read, add, modify or two = some of the work forest transfer _ touch _ some turn to the second virtual hard [implementation] The following is implemented The detailed features and advantages of the present invention are described in detail in the accompanying claims. Any person skilled in the art can (4) transfer the purpose and advantages of the present invention. The present invention provides a method for accommodating and expanding a virtual hard disk, which is used to extend a first virtual hard disk (a first virtual hard disk assigned to a virtual machine (VM) in a phySicai har (j disk). The capacity of the disc is referred to as "figure 1", which is a block diagram of a virtual machine according to an embodiment of the present invention. As shown, the client 10 can pass through a virtual machine (Virtual Machine Manager 'VMM) 30. Connected to the remote virtual machine 32. Each of the virtual machines 32 has at least one virtual hard disk 34, and the virtual hard disk 34 is the first physical hard disk 22 built in a storage pool 2, 2011. 22 is a physical hardware device (ie, a storage device, such as a hard disk, a solid-state hard disk ls) or a disk array (Re-dantAiray0fIndependentDisks, coffee) required for the virtual machine 32. The storage pool 20 In order to provide the set for use by the virtual machine 32. The storage pool 2G can be used by the virtual machine 32 in addition to the first physical hard disk 22. In order to construct the virtual machine 32, the first entity Hard disk μ and other physical resources can be first Architecture - virtual platform (h〇st, not shown), then create these virtual machines 32 on the virtual platform. ▲ In more detail, a virtual platform can be configured with at least a virtual machine ^, and attack The virtual machines 32 are all run by the entity # source of the architecture virtual platform. Each virtual machine 32 can have its own virtual resources for use by the connected client. The client 10 can connect the connected virtual machines 32. Think of it as a normal computer with a processor and storage device, installed in the virtual machine 32 - (four) system

System ’ 〇s)各式各樣的應用程式(Applicati〇n)並使用之。換 句話說’虛擬機32之間是可以互相獨立的。架構在同一個實體資 源上的虛擬機32甚至可以安裝不同的作業系統例如視窗 jw_ws)作業系統或是Linux作業系統。且對於用戶端1〇而 。,每一個虛擬機32都擁有自己的虛擬硬碟34可以使用。 接下來將詳述本發明所提供之虛擬凌碟的容量擴展方法,以 說明如何擴展帛-虛擬硬碟的容量。請先參照「第2圖」,其係 為根據本發明一實施範例之容量擴展前之虛擬硬碟之對應示意 圖。 如「第2圖」所示,儲存池2〇中的第.一實體硬碟22之所有 201118740 的可用空間可被分割成多個部分(虛擬硬碟 :給不同的虛擬機32使用。其中第一虛擬硬碟%係:== 使用,而其餘的虛擬硬碟34則分配給其他的虛擬機3^ ^本發I實施細,第—實物22係:2 比較緊張的狀態。當使用者覺得第一雜硬碟% _存 而J要擴展容量時,使用者想要擴展的容量大於第 剩餘的可用空間(意即尚未被配置為虛擬硬碟^_碟= 用者要將原先的第—虛擬硬碟36的總容』為= 展似谷1,而第-虛擬硬碟36的總容量加上第一麻-… 剩餘的可用容量係小於使用者指定的擴展總容量/…2的 請同時參閲「第3圖」以及「第4圖」,其分 於 明-實施範例之虛擬硬碟的容量擴展方法之一主圍· X X f後之細硬叙_示_。於趣硬 實體硬碟的可用容量不小於擴充總容量。 第一 拖由於擴展第一虛擬硬碟36時,第一虛擬硬碟%益法接受卢 擬機32a任何的存取,耻需先停止虛 %的存取操作(步驟⑽)。為了雜 1虛擬硬碟 新增的第二實體硬碟24上建立容量為擴展總容量的一 1=硬碟38 (步驟_。以u皿讀·•她(應用_ /、為例’可建立-個勸格式輕白檔案 -,並對這個空白播案配置相關的數據。得到咖^ 201118740 的第二虛擬硬碟38後’連結第二虛擬硬碟38與第一虛擬硬碟% 的儲存空間(步驟S140)。也就是說,僅需將第二虛擬硬碟兇 與第一虛擬硬碟36的儲存空間產生連結,而不需將第一虛擬硬碟 36中的資料移轉至第二虛擬硬碟38中。 以Linux的VHEMitil為例,當虛擬硬34式文件類型時,步驟 S130以及步驟S140可以下述的指令範例實施之。 vhd-util create -name=VD2 -size=20G -parent=VDl ^ 步驟S130以及步驟8140以可以用例如邏輯塊管理器(LogicalSystem ’ 〇s) A variety of applications (Applicati〇n) and use them. In other words, the virtual machines 32 are independent of each other. Virtual machines 32 that are architected on the same physical resource can even be installed with different operating systems such as Windows jw_ws operating systems or Linux operating systems. And for the user side. Each virtual machine 32 has its own virtual hard drive 34 that can be used. Next, the capacity expansion method of the virtual volume disc provided by the present invention will be described in detail to explain how to expand the capacity of the virtual disk. Please refer to FIG. 2, which is a corresponding schematic diagram of a virtual hard disk before capacity expansion according to an embodiment of the present invention. As shown in "Figure 2", all of the 201118740 free space of the first physical hard disk 22 in the storage pool 2 can be divided into multiple parts (virtual hard disk: used by different virtual machines 32. A virtual hard disk % system: == use, and the remaining virtual hard disk 34 is assigned to other virtual machines 3 ^ ^ This is a fine implementation, the first - physical 22 series: 2 relatively tight state. When the user feels The first hard disk % _ save and J to expand the capacity, the user wants to expand the capacity is greater than the remaining free space (meaning that has not been configured as a virtual hard disk ^_disc = the user wants to the original - The total capacity of the virtual hard disk 36 is = display valley 1, and the total capacity of the first virtual hard disk 36 plus the first hemp -... The remaining available capacity is less than the user-specified total expansion capacity /...2 At the same time, please refer to "3rd" and "4th", which are divided into one of the capacity expansion methods of the virtual hard disk of the implementation example - the circumstance of the XX f. The available capacity of the hard disk is not less than the total capacity of the expansion. The first drag is due to the expansion of the first virtual hard disk 36, the first virtual hard disk Yifa accepts any access to Lubo 32a, and it is necessary to stop the virtual % access operation first (step (10)). To increase the total capacity of the second physical hard disk 24 added to the hybrid 1 virtual hard disk One 1 = hard disk 38 (step _. read with u dish · • she (application _ /, for example) can be established - a persuasive format light white file - and configure the relevant data for this blank broadcast. Get the coffee ^ The second virtual hard disk 38 of 201118740 is followed by 'connecting the second virtual hard disk 38 with the storage space of the first virtual hard disk% (step S140). That is, only the second virtual hard disk is required to be fierce with the first virtual hard disk. The storage space of the disc 36 is linked without transferring the data in the first virtual hard disk 36 to the second virtual hard disk 38. Taking the VHEMitil of Linux as an example, when the virtual hard type 34 file type is used, step S130 And step S140 can be implemented by the following instruction example: vhd-util create -name=VD2 -size=20G -parent=VDl ^ Step S130 and step 8140 to use, for example, a logical block manager (Logical)

Volume Manager,LVM)之邏輯塊 a〇gicalVolume,LM,或稱 為塊設備)類型實作,指令的範例如下。 .lvcreate -name=lvd2 -size=20G VG-Storage2 vhd-util create -name=/dev/VG-Storage2/lvd2 -size=20G -parent=lvdl 最後,再運行一虛擬機管理器程序,以將第二虛擬硬碟38指 派給虛擬機32a,並恢復虛擬機32a對第二虛擬硬碟38的存取操 • 作(步驟S150)。虛擬機管理器程序係為運行於虛擬機管理器3〇 的程序,其餘步驟S150中將第二虛擬硬碟38連結與虛擬機32&, 以讓用戶端ίο能夠使用。而就用戶端1〇看起來,虛擬機32係僅 對應於容量為擴充總容量的第二虛擬硬碟38,且第二虛擬硬碟% 的儲存空間是連續的。 接下來將說明用戶端1〇如何以虛擬機似來讀取、新增、修 改或刪除存放於第-虛擬硬碟36與第二虛擬硬碟38中的槽案或 資料。較佳的是’數據(data ’亦即上述之資料)祕存是以固定 長度的塊(block)為單位。存放在於第二虛擬硬碟%上的數據t 11 201118740 以第二虛擬硬碟38上為準;而於第_ 據塊,則以第-虛擬硬碟36為準虛挺硬碟38上不存在的數 先為了在擴觀量之後騎鰣,虛擬硬铜容量擴展方 法另可包括:接收一新增命令,A 、 查.m w 、中新增命々包括一新增目標檔 及簡增目微麟增於第二虛擬硬碟%。也就是說,容 彻目雜撕侧吻係被存放於 /於第-虛擬硬碟38新增了新增目標之後,被新增的槽案 係可供虛擬機32a直接由第二虛擬硬碟%中讀取、修改或删除了 因此虛擬硬碟的容量擴展方法另可包括··接收一修改命令, 其中修改命令指定第二虛擬硬碟π中的一修改目標楷案,修改命 令中並包括-修改資料;以及依據修改資料修改修改目標槽案。 且虛擬硬碟的容量紐方法亦可包括:魏―刪除命令,其 令刪除命令指定第二虛擬硬碟38中的刪除目標檔案;以及由第二 虛擬硬碟38中刪除此刪除目標檔案。 而於6改原先存放於第一虛擬硬碟36的資料時,在容量擴展 之後虡擬硬碟的容4懸綠另可包括··接收修改命令,其^修 改命令指定第-虛擬硬碟36巾的修改目標檔案,修改命令並包括 0改貝料’以及將修改貧料新增於第二虛擬硬碟%。其中修改資 料係為修改目標檔隸改過的部分,也就是壯版本與修改後的 版=的差異。換句話說M皮修改過之原先存放於第一虛擬硬碟% 的身料會齡為兩部分,其巾财修改雜被存放在第二虛擬硬 12 201118740 碟38,而原先存放於第一虛擬硬碟36的部分並不會被修改。 為了讀取上述因被修改過而被分開存放於第一虛擬硬碟36以 及苐二虛擬硬確38的資料,可接收一讀取命令,其中讀取命令指 疋一瀆取目標檔案。且讀取目標槽案係已被修改過而部分存在於 第一虛擬硬碟36以及第二虛擬硬碟38。讀取分別存放於第一虛擬 硬碟36以及第二虛擬硬碟38中的讀取目標檔案後,接著合併由 第一虛擬硬碟36以及第二虛擬硬碟38中讀取的讀取目標檔案, • 並輸出給用戶端10。 且刪除上述因被修改過而被分開存放於第一虛擬硬碟%以及 第二虛擬硬碟38的資料時’虛擬硬碟的容量擴展方法亦可包括: 接收刪除命令,其巾刪除命令指定刪除目標儲,且刪除目標槽 案係部分存在於第二虛擬硬碟38 ;以及,刪除第二虛擬硬碟'田8 中的刪除目標檔案,以及刪除目標檔案與第—虛擬硬碟%的連結。 更詳細的說 弟二虚擬硬碟38中可維護一檔案配置表(取 A11〇catiGnT舰,FAT),其帽麵絲與第二歧硬㈣ 除目標檔案之間的連結〇ink)欄位被刪除。且被分開存放於第一 虛擬硬碟36以及第二虛擬硬碟38的刪除目標檀案之中,第 擬硬碟36以及第二虛擬硬碟38間的連結亦被刪除。第二虛擬硬 刪除㈣姆所包括醜據塊可·初始化,也就是可用 工的數據塊將縣刪除目標檔案所㈣的數據塊覆 卿不會再輪嶋目罐。的_ 2 資料(即存放於第—卢 甲席有的 亚硬碟36中的部分的刪除目標檔案)可以 Γ Γ-» Ί 13 201118740 不被刪除。 士取後要刪除第一虛擬硬碟%中在擴展容量前所存放的資料 時可直接刪除第-虛擬硬碟36上的刪除目標標案,亦可僅刪除 刪除目標難與第二虛擬節8之_連結。也就是說,虛擬硬 碟的容量擴展枝另可包括:接_除命令,其中刪除命令指定 僅存在於第-虛擬硬碟36中_除目標以及刪除第一虛擬 硬碟36中的刪除目標,或是刪除目標檔案與第二虛擬硬碟38 的連結。删除目標儲與第二虛擬硬碟%的連結之後,雖存放於 苐-虛擬硬碟36 .中刪除目標檔案未被刪除,亦可使得用戶端10 不會再讀取到刪除目標槽案。 ,>τ'上所述’本㈣峨供的虛擬硬麵容量擴展方法係可 第-實體硬碟的儲存空間不足時,擴展架構於第一實體硬碟上 =虛擬硬碟的谷且虛擬硬碟的容量擴展方法並不需搬移 一虛擬硬翻原有的資料,而能夠非常快速地提個戶端第二 ^硬碟。此外’在擴展版後,㈣絲-如財地讀^ ::改或刪除槽案’·且這些作業亦不需要將第一 原有的資料搬移去第二虛擬硬碟。 磲 雖然本發明以前述之較佳實施例揭露如上,然其並非用以— 春發明’任何熟習相像技藝者,在不麟本發明之精神和: 备可作些許之更動與潤飾,因 明書所附之㈣專概_狀者本^之專聰視本說 f圖式簡單說明】 201118740 ^圖齡為根據本發明—實施範例之虛擬機之方塊示意圖; 弟2圖所;κ為根據本發明—實施範例之容量擴展前之虛擬硬 碟之對應示意圖; 第3圖所不為根據本發明一實施範例之虛擬硬碟的容量擴展 方法之流程示意圖;以及 第4圖所禾為根據本發明一實施範例之容量擴展後之虛擬硬 碟之對應示意圖。 ®【主要元件符號說明】 10 用戶端 20 儲存池 22 第一實體硬碟 24 第二實體硬碟 30 虛擬機管理器 32 ’ 32a 虛擬機 34 虛擬硬碟 36 .第一虛擬硬碟 38 弟一虛擬硬碟 15Volume Manager, LVM) Logic block a〇gicalVolume, LM, or block device type implementation, examples of instructions are as follows. .lvcreate -name=lvd2 -size=20G VG-Storage2 vhd-util create -name=/dev/VG-Storage2/lvd2 -size=20G -parent=lvdl Finally, run a virtual machine manager program to The second virtual hard disk 38 is assigned to the virtual machine 32a, and the access operation of the virtual hard disk 32 to the second virtual hard disk 38 is resumed (step S150). The virtual machine manager program is a program running in the virtual machine manager 3. In the remaining step S150, the second virtual hard disk 38 is connected to the virtual machine 32& to enable the user terminal to use. As for the user terminal 1, the virtual machine 32 only corresponds to the second virtual hard disk 38 whose capacity is the expanded total capacity, and the storage space of the second virtual hard disk % is continuous. Next, it will be explained how the client side reads, adds, modifies or deletes the slot or data stored in the first virtual hard disk 36 and the second virtual hard disk 38 as a virtual machine. Preferably, the 'data (also referred to as the above data) secret is in units of fixed length blocks. The data stored on the second virtual hard disk % t 11 201118740 is determined on the second virtual hard disk 38; and in the first data block, the first virtual hard disk 36 is used as the virtual hard disk 38 does not exist. The number of virtual hard copper capacity expansion methods may include: receiving a new command, A, checking .mw, adding new life command including a new target file and simplifying the increase. Lin increased to the second virtual hard disk%. That is to say, after the addition of the new target is added to the first virtual hard disk 38, the newly added slot is available for the virtual machine 32a directly from the second virtual hard disk. The % expansion method of reading, modifying, or deleting the virtual hard disk may further include receiving a modification command, wherein the modification command specifies a modification target file in the second virtual hard disk π, and the modification command includes - Modify the data; and modify the modified target slot based on the revised information. The virtual hard disk capacity method may further include: a Wei-delete command, which causes the delete command to specify the delete target file in the second virtual hard disk 38; and the delete target file is deleted from the second virtual hard disk 38. When the data originally stored in the first virtual hard disk 36 is changed, the capacity of the virtual hard disk after the capacity expansion may include the receiving modification command, and the modification command specifies the first virtual hard disk 36. Modify the target file of the towel, modify the command and include 0 to change the bedding 'and add the modified poor material to the second virtual hard disk %. The modification information is the part that the target file has been modified, that is, the difference between the strong version and the modified version=. In other words, the M-skin modification was originally stored in the first virtual hard disk%. The body age is two parts, and the tobacco modification is stored in the second virtual hard 12 201118740 disc 38, which was originally stored in the first virtual The portion of the hard disk 36 is not modified. In order to read the above-mentioned data that has been separately stored on the first virtual hard disk 36 and the second virtual hard disk 38, a read command may be received, wherein the read command refers to a target file. And the read target slot file has been modified and partially exists on the first virtual hard disk 36 and the second virtual hard disk 38. After reading the read target files respectively stored in the first virtual hard disk 36 and the second virtual hard disk 38, the read target files read by the first virtual hard disk 36 and the second virtual hard disk 38 are merged. , • and output to the client 10. And deleting the above-mentioned data that is separately stored in the first virtual hard disk % and the second virtual hard disk 38 because of the modification, the capacity expansion method of the virtual hard disk may also include: receiving the delete command, and the towel delete command designating deletion The target storage, and the deletion target slot portion is present on the second virtual hard disk 38; and the deletion target file in the second virtual hard disk 'Tian 8' is deleted, and the link between the target file and the first virtual hard disk % is deleted. More detailed, the second virtual hard disk 38 can maintain a file configuration table (take A11〇catiGnT ship, FAT), its cap surface silk and the second ambiguity (four) in addition to the target file link 〇ink) field is delete. And being stored separately in the deletion target of the first virtual hard disk 36 and the second virtual hard disk 38, the connection between the first hard disk 36 and the second virtual hard disk 38 is also deleted. The second virtual hard delete (4) includes the ugly block that can be initialized, that is, the available data block will delete the data file block of the county (4) and the data block will not be rounded again. The _ 2 data (that is, the deletion target file of the part stored in the hard disk 36 of the first Lu may be) Γ »-» Ί 13 201118740 Not deleted. After deleting the data stored in the first virtual hard disk % before the expansion capacity, the deletion target target on the first virtual hard disk 36 can be directly deleted, or only the deleted target difficulty and the second virtual node 8 can be deleted. _ link. That is to say, the capacity extension of the virtual hard disk may further include: a command to delete, wherein the deletion command specifies that only the first virtual hard disk 36 is present, and the deletion target in the first virtual hard disk 36 is deleted. Or delete the link between the target file and the second virtual hard disk 38. After deleting the link between the target storage and the second virtual hard disk %, although the deleted target file is not deleted in the virtual hard disk 36, the user terminal 10 may not read the delete target slot. , the above-mentioned (four) 的 virtual hard surface capacity expansion method can be extended when the storage space of the first physical hard disk is insufficient, the expansion architecture is on the first physical hard disk = virtual hard disk valley and virtual The capacity expansion method of the hard disk does not need to move a virtual hard copy of the original data, and can quickly bring up a second hard disk of the terminal. In addition, after the extended version, (4) silk - such as financial reading ^ :: change or delete the slot case '· and these operations do not need to move the first original data to the second virtual hard disk. Although the present invention has been disclosed above in the preferred embodiment of the foregoing, it is not intended to be used as a spring inventor of any familiar artisan, and in the spirit of the invention, it is possible to make some changes and refinements, as the bookstore Attached to (4) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ - a schematic diagram of a virtual hard disk before the capacity expansion of the embodiment; FIG. 3 is a schematic flowchart of a capacity expansion method of the virtual hard disk according to an embodiment of the present invention; and FIG. 4 is a diagram according to the present invention Corresponding schematic diagram of the virtual hard disk after the capacity expansion of the implementation example. ® [Main component symbol description] 10 Client 20 Storage pool 22 First physical hard disk 24 Second physical hard disk 30 Virtual machine manager 32 ' 32a Virtual machine 34 Virtual hard disk 36. First virtual hard disk 38 Brother-virtual Hard disk 15

Claims (1)

201118740 七、申請專利範圍: 1. 一種虛擬硬碟的容量擴展方法,用以擴展一也 貝、體硬碟中; 指派給一虛擬機的一第一虛擬硬碟的容量,該方a ’、 2:不小於 提供一第二實體硬碟,該第二實體硬碟的可^^^ . 一擴充總容量; 各 停止對該第一虛擬硬碟的存取操作; 的一第二虛 於該第二實體硬碟上建立容量為該擴展總容量 擬硬碟; 連結該第二虛擬硬碟與該第_虛擬硬碟的儲存空間.以及 運行-虛擬機管龄程序,以將該第二虛擬派給該 虛擬機,並恢復該虛擬機對該第二虛擬硬碟的存取操作。 2.如申請專概_ 1 _狀虛擬销的容量擴展方法,其中 在該運行該虛擬機管理器程序的步驟之後另包括: 接收新增命々,其中該新增命令包括“新增目標播案; 以及 ' 將該新增目標檔案新增於該第二虛擬硬碟。 3.如申請專利範圍第2項所述之虛擬硬碟的容量擴展方法,其中 在該將該新增目標_新增於該第二施硬碟的步驟之後,另 包括: 接收-修改命令,其中該修改命令指定該第二虛擬硬碟中 的一修改目標财’該修改命令並包括-修改資料;以及 依據該修改資料修改該修改目標檔案。 16 201118740 4.如申明專利$色圍第2項所述之虛擬硬碟的容量擴展方法,其中 在該將該新增目標槽案新增於該第二虛擬硬碟的步驟之後,另 包括: 接收-#i除命令,其巾制除命令缺該第二虛擬硬碟中 的一刪除目標檔案;以及 由該第二虛擬硬碟中删除該刪除目標檔案。 5‘如申請專概圍第丨項所述之虛擬硬碟的容量擴展方法,其中 鲁 在該運行該虛擬機管理器程序的步驟之後另包括: 接收-修改命令,其中該修改命令指定該第一虛擬硬碟中 的一修改目標檔案,該修改命令並包括一修改資料;以及 將該修改資料新增於該第二虛擬硬碟,並將該修改資料作 為該修改目標檔案的一部份與該修改目標擋案相連接。 6.如申請專概圍第5項所述之虛擬硬碟的容量擴展方法,其中 在該將該修改資料新增於該第二虛擬硬碟,並將該修改資料作 為該修改目標檔案的-部份與該修改目標檔案相連接的步驟 之後,另包括: .接收-讀取命令,其中該讀取命令指定一讀取目標槽案, 錢讀目標檔案係部分存在於該第一虛擬硬碟以及該第二 虛擬硬碟; 讀取該第-虛擬硬碟以及該第二虛擬硬碟中的該讀取目標 檔案;以及 $ 合併並輸出由該第一虛擬硬碟以及該第二虛擬硬碟中讀笋 17 201118740 的該讀取目標檔案。 7·如+ 專_®第5獅述之虛擬硬碟的容量擴展方法,其中 在該將該修改資料新增於該第二虛擬硬碟,並將該修改資料作 為該修改目標檔案的一部份與該修改目標檔案相連接的步驟 之後’另包括: 接收一刪除命令,其+該刪除命令指定一删除目標檔案, 且該刪除目標姆係較存在於料—虛擬㈣以及該第二 虛擬硬碟;以及 刪除該該第二虛擬硬碟中的該刪除目標檔案,以及該刪除 目標檑案與該第-虛擬硬碟的連結。 8.201118740 VII. Patent application scope: 1. A method for expanding the capacity of a virtual hard disk, which is used to expand the capacity of a first virtual hard disk assigned to a virtual machine, the party a ', 2: not less than providing a second physical hard disk, the second physical hard disk may be ^^^. an expanded total capacity; each stop accessing the first virtual hard disk; The second physical hard disk is configured to have a capacity for the extended total capacity of the hard disk; the second virtual hard disk and the storage space of the first virtual hard disk are connected; and the running-virtual machine management program is used to the second virtual The virtual machine is dispatched and the virtual machine is restored to the second virtual hard disk. 2. The method for requesting the capacity expansion of the _1 _ virtual thread, wherein after the step of running the virtual machine manager program, the method further comprises: receiving a new life command, wherein the new command includes “adding a target broadcast” And adding the new target file to the second virtual hard disk. 3. The method for expanding the capacity of the virtual hard disk as described in claim 2, wherein the new target is new After the step of adding the second hard disk, the method further includes: a receiving-modifying command, wherein the modifying command specifies a modification target in the second virtual hard disk, the modification command includes: - modifying data; Modify the data to modify the modified target file. 16 201118740 4. The method for expanding the capacity of the virtual hard disk according to claim 2, wherein the new target slot is added to the second virtual hard After the step of the disc, the method further includes: receiving -#i in addition to the command, the towel deleting command deletes a deleted target file in the second virtual hard disk; and deleting the deleted target file from the second virtual hard disk. ' The method for expanding the capacity of the virtual hard disk described in the above item, wherein the step of running the virtual machine manager program further comprises: receiving-modifying a command, wherein the modifying command specifies the first virtual hard a modified target file in the disc, the modified command includes a modified data; and the modified data is added to the second virtual hard disk, and the modified data is used as part of the modified target file and the modified target 6. The method for expanding the capacity of the virtual hard disk according to Item 5, wherein the modified data is added to the second virtual hard disk, and the modified data is used as the After the step of modifying the - part of the target file to be connected to the modified target file, the method further includes: a receive-read command, wherein the read command specifies a read target slot, and the money read target file portion exists in the a first virtual hard disk and the second virtual hard disk; reading the first virtual hard disk and the read target file in the second virtual hard disk; and merging and outputting by the first The virtual hard disk and the second virtual hard disk read the read target file of the 2011 17180. 7·such as the + _ _ 5th lion's virtual hard disk capacity expansion method, where the modified information After adding to the second virtual hard disk and connecting the modified data as part of the modified target file to the modified target file, the method further includes: receiving a delete command, the + delete command specifies a delete a target file, and the deleted target is more present in the virtual (four) and the second virtual hard disk; and deleting the deleted target file in the second virtual hard disk, and the deleted target file and the first - The link to the virtual hard drive. 如申請專利範圍第1項所述之虛擬硬碟的容量擴展方法,其中 在該運行該虛擬機管理器程序的步驟之後另包括: 接收-刪除命令,其中該刪除命令指定僅存在於該第一虛 擬硬碟中的—刪除目雜案;以及The method for expanding a capacity of a virtual hard disk according to claim 1, wherein the step of running the virtual machine manager program further comprises: a receive-delete command, wherein the delete command specifies that only the first On the virtual hard drive - delete the miscellaneous case; and 刪除該第-虛擬硬碟中的該刪除目簡案,或是删除該目 標檔案與該第二虛擬硬碟的連結。 9. 如申請專利翻第丨麟述之錢的容量擴展方法,盆中 虛擬硬翻容量加上該第—實體硬铜可用容量祕 該擴展總容量 18Delete the deletion file in the first virtual hard disk, or delete the connection between the target file and the second virtual hard disk. 9. If you apply for a patent to expand the capacity expansion method of the first cypress, the virtual hard-turn capacity in the basin plus the capacity of the first-hard copper available capacity.
TW98140891A 2009-11-30 2009-11-30 Capacity extending method for virtual hard disk TWI441082B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW98140891A TWI441082B (en) 2009-11-30 2009-11-30 Capacity extending method for virtual hard disk

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW98140891A TWI441082B (en) 2009-11-30 2009-11-30 Capacity extending method for virtual hard disk

Publications (2)

Publication Number Publication Date
TW201118740A true TW201118740A (en) 2011-06-01
TWI441082B TWI441082B (en) 2014-06-11

Family

ID=44935827

Family Applications (1)

Application Number Title Priority Date Filing Date
TW98140891A TWI441082B (en) 2009-11-30 2009-11-30 Capacity extending method for virtual hard disk

Country Status (1)

Country Link
TW (1) TWI441082B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10209899B2 (en) 2015-11-06 2019-02-19 Microsoft Technology Licensing, Llc Storage virtualization offload

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10209899B2 (en) 2015-11-06 2019-02-19 Microsoft Technology Licensing, Llc Storage virtualization offload

Also Published As

Publication number Publication date
TWI441082B (en) 2014-06-11

Similar Documents

Publication Publication Date Title
US10209910B2 (en) Copy-redirect on write
US9959074B1 (en) Asynchronous in-memory data backup system
US8966476B2 (en) Providing object-level input/output requests between virtual machines to access a storage subsystem
US20180329646A1 (en) Distributed storage system virtual and storage data migration
US8782335B2 (en) Latency reduction associated with a response to a request in a storage system
US9959207B2 (en) Log-structured B-tree for handling random writes
US7792918B2 (en) Migration of a guest from one server to another
US9069487B2 (en) Virtualizing storage for WPAR clients using key authentication
US10983913B2 (en) Securing exclusive access to a copy of a metadata track via a process while the metadata track is held in a shared mode by another process
US9792075B1 (en) Systems and methods for synthesizing virtual hard drives
JP2012527704A (en) Shortcut I / O in virtual machine system
US9940293B1 (en) Method for efficient storage and backup of data via SCSI transport
US10725966B1 (en) Block level incremental backup for QCOW2 virtual disks
US11010295B2 (en) Asynchronous update of metadata tracks in response to a cache hit generated via an i/o operation over a bus interface
US20140201481A1 (en) Domain protection and virtualization for sata
US20150356108A1 (en) Storage system and storage system control method
US11263183B2 (en) Integrating virtual machine file system into a native file explorer
US9575658B2 (en) Collaborative release of a virtual disk
US10705752B2 (en) Efficient data migration in hierarchical storage management system
TW201118740A (en) Capacity extending method for virtual hard disk
US11003391B2 (en) Data-transfer-based RAID data update system
US10831520B2 (en) Object to object communication between hypervisor and virtual machines
US11977785B2 (en) Non-volatile memory device-assisted live migration of virtual machine data
US11782619B1 (en) In-place conversion of virtual disk formats with VM powered on
CN110019013A (en) Mirrored storage method, apparatus and computer readable storage medium

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees