CN107193506A - 一种中标麒麟系统根分区扩容的实现方法 - Google Patents

一种中标麒麟系统根分区扩容的实现方法 Download PDF

Info

Publication number
CN107193506A
CN107193506A CN201710481479.9A CN201710481479A CN107193506A CN 107193506 A CN107193506 A CN 107193506A CN 201710481479 A CN201710481479 A CN 201710481479A CN 107193506 A CN107193506 A CN 107193506A
Authority
CN
China
Prior art keywords
new
partition
disk
orders
subregion
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.)
Pending
Application number
CN201710481479.9A
Other languages
English (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.)
Shandong Chaoyue Numerical Control Electronics Co Ltd
Original Assignee
Shandong Chaoyue Numerical Control Electronics 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 Shandong Chaoyue Numerical Control Electronics Co Ltd filed Critical Shandong Chaoyue Numerical Control Electronics Co Ltd
Priority to CN201710481479.9A priority Critical patent/CN107193506A/zh
Publication of CN107193506A publication Critical patent/CN107193506A/zh
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • G06F3/0607Improving or facilitating administration, e.g. storage management by facilitating the process of upgrading existing storage systems, e.g. for improving compatibility between host and storage device
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • G06F3/0631Configuration or reconfiguration of storage systems by allocating resources to storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0644Management of space entities, e.g. partitions, extents, pools
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0674Disk device
    • G06F3/0676Magnetic disk device

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明公开一种中标麒麟系统根分区扩容的实现方法,涉及系统分区管理领域;基于中标麒麟系统,将容量大于系统能够正常启动的分区容量的外加磁盘挂载到系统下,备份MBR主引导记录到外加磁盘,卸载外加磁盘,创建新磁盘分区、逻辑卷和新文件系统,备份/目录和/boot目录到新文件系统,修改启动文件,恢复MBR主引导记录到逻辑卷并修改grub引导,将系统启动引导到新磁盘分区;利用本发明通过Linux的逻辑卷管理功能在无需停机的情况下,利用外加磁盘启动系统进行各个分区大小调整,从根本上对系统的根分区进行了调整,利于系统对存储文件进行管理。

Description

一种中标麒麟系统根分区扩容的实现方法
技术领域
本发明公开一种系统根分区扩容的实现方法,涉及系统分区管理领域,具体地说是一种中标麒麟系统根分区扩容的实现方法。
背景技术
使用Linux操作系统时常遇到的难以决定的问题就是如何正确地评估各分区大小,以分配合适的硬盘空间。普通的磁盘分区管理方式在逻辑分区划分好之后无法改变其大小,当一个逻辑分区存放不下某个文件时,这个文件因为受上层文件系统的限制,也不能跨越多个分区来存放,所以也不能同时放到别的磁盘上。而遇到出现某个分区空间耗尽时,解决的方法通常是使用符号链接,或者使用调整分区大小的工具解决,但这只是暂时解决办法,不能从根本上解决问题。而本发明提供一种中标麒麟系统根分区扩容的实现方法,通过Linux的逻辑卷管理功能在无需停机的情况下,利用外加磁盘启动系统进行各个分区大小调整,从根本上对系统的根分区进行了调整,利于系统对存储文件进行管理。
LVM是Logical Volume Manager,逻辑卷管理的简写,是Linux环境下对磁盘分区进行管理的一种机制,LVM指系统将物理卷管理抽象到更高的层次,常常会形成更简单的管理模式。通过使用 LVM,所有物理磁盘和分区。它由Heinz Mauelshagen在Linux 2.4内核上实现。
发明内容
本发明针对现有技术存在的不足和问题,提供一种中标麒麟系统根分区扩容的实现方法,
本发明提出的具体方案是:
一种中标麒麟系统根分区扩容的实现方法,基于中标麒麟系统,将容量大于系统能够正常启动的分区容量的外加磁盘挂载到系统下,备份MBR主引导记录到外加磁盘,卸载外加磁盘,
创建新磁盘分区、逻辑卷和新文件系统,备份/目录和/boot目录到新文件系统,
修改启动文件,恢复MBR主引导记录到逻辑卷并修改grub引导,将系统启动引导到新磁盘分区。
将创建的新文件系统挂载到系统/mnt目录下。
所述修改启动文件:查看各分区的UUID,修改/mnt/etc/fstab文件,确定根分区指向后chroot 到新分区,并检查相应的分区设置。
所述创建新磁盘分区:使用pvcreate命令创建物理卷,使用vgcreate命令创建卷组。
使用lvcreate命令创建逻辑卷并用mkfs命令格式化逻辑卷,创建新文件系统。
所述的方法使用dump命令备份/目录和/boot目录到新文件系统。
所述的方法,使用dd命令备份MBR主引导记录到外加磁盘。
本发明的有益之处是:
本发明提供一种中标麒麟系统根分区扩容的实现方法,基于中标麒麟系统,将容量大于系统能够正常启动的分区容量的外加磁盘挂载到系统下,备份MBR主引导记录到外加磁盘,卸载外加磁盘,创建新磁盘分区、逻辑卷和新文件系统,备份/目录和/boot目录到新文件系统,修改启动文件,恢复MBR主引导记录到逻辑卷并修改grub引导,将系统启动引导到新磁盘分区;
利用本发明通过Linux的逻辑卷管理功能在无需停机的情况下,利用外加磁盘启动系统进行各个分区大小调整,从根本上对系统的根分区进行了调整,利于系统对存储文件进行管理。
附图说明
图1本发明方法流程示意图。
具体实施方式
本发明提供一种中标麒麟系统根分区扩容的实现方法,基于中标麒麟系统,将容量大于系统能够正常启动的分区容量的外加磁盘挂载到系统下,备份MBR主引导记录到外加磁盘,卸载外加磁盘,创建新磁盘分区、逻辑卷和新文件系统,备份/目录和/boot目录到新文件系统,修改启动文件,恢复MBR主引导记录到逻辑卷并修改grub引导,将系统启动引导到新磁盘分区。
结合附图及具体实施,对本发明做进一步说明。
具体步骤为:
(1) 将容量大于系统能够正常启动的分区容量的外加磁盘挂载到系统下,作为系统能够识别到块设备;
(2)使用dd命令备份MBR主引导记录到外加磁盘;
(3)在系统下卸载外加磁盘,进行新磁盘分区:使用pvcreate命令创建物理卷,使用vgcreate命令创建卷组;
使用lvcreate命令创建逻辑卷并用mkfs命令格式化逻辑卷,创建新文件系统,将新的文件系统挂载到系统/mnt目录下;
(4)使用dump命令备份/目录和/boot目录到/mnt目录下的新文件系统,可以使用restore命令恢复;
(5)修改启动文件:首先查看各分区的UUID,然后修改/mnt/etc/fstab文件,确定根分区指向后chroot 到新的分区里面,然后检查相应的分区设置;
(6)恢复MBR主引导记录到创建的逻辑卷中,修正grub引导,即修改grub文件:boot.cfg,
然后进入新磁盘分区,重新创建/boot目录,保证新磁盘脱离源磁盘的引导,之后重启系统。
验证系统是否能从新的磁盘启动。
利用本发明方法,经过上述过程,通过Linux的逻辑卷管理功能在无需停机的情况下,利用外加磁盘启动系统进行各个分区大小调整,从根本上对系统的根分区进行了调整,利于系统对存储文件进行管理。

Claims (7)

1.一种中标麒麟系统根分区扩容的实现方法,其特征是基于中标麒麟系统,将容量大于系统能够正常启动的分区容量的外加磁盘挂载到系统下,备份MBR主引导记录到外加磁盘,卸载外加磁盘,
创建新磁盘分区、逻辑卷和新文件系统,备份/目录和/boot目录到新文件系统,
修改启动文件,恢复MBR主引导记录到逻辑卷并修改grub引导,将系统启动引导到新磁盘分区。
2.根据权利要求1所述的方法,其特征是将创建的新文件系统挂载到系统/mnt目录下。
3.根据权利要求2所述的方法,其特征是所述修改启动文件:查看各分区的UUID,修改/mnt/etc/fstab文件,确定根分区指向后chroot 到新分区,并检查相应的分区设置。
4.根据权利要求1-3所述的方法,其特征是所述创建新磁盘分区:使用pvcreate命令创建物理卷,使用vgcreate命令创建卷组。
5.根据权利要求4所述的方法,其特征是使用lvcreate命令创建逻辑卷并用mkfs命令格式化逻辑卷,创建新文件系统。
6.根据权利要求5所述的方法,其特征是使用dump命令备份/目录和/boot目录到新文件系统。
7.根据权利要求5或6所述的方法,其特征是使用dd命令备份MBR主引导记录到外加磁盘。
CN201710481479.9A 2017-06-22 2017-06-22 一种中标麒麟系统根分区扩容的实现方法 Pending CN107193506A (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710481479.9A CN107193506A (zh) 2017-06-22 2017-06-22 一种中标麒麟系统根分区扩容的实现方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710481479.9A CN107193506A (zh) 2017-06-22 2017-06-22 一种中标麒麟系统根分区扩容的实现方法

Publications (1)

Publication Number Publication Date
CN107193506A true CN107193506A (zh) 2017-09-22

Family

ID=59879855

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710481479.9A Pending CN107193506A (zh) 2017-06-22 2017-06-22 一种中标麒麟系统根分区扩容的实现方法

Country Status (1)

Country Link
CN (1) CN107193506A (zh)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107885461A (zh) * 2017-10-19 2018-04-06 北京京东尚科信息技术有限公司 一种数据本地存储方法和装置
CN108829351A (zh) * 2018-06-04 2018-11-16 成都傲梅科技有限公司 一种mbr磁盘转gpt磁盘的方法及其系统
CN110321172A (zh) * 2019-06-03 2019-10-11 平安科技(深圳)有限公司 网络块设备的分区识别方法、装置、设备和存储介质
CN110941516A (zh) * 2019-12-06 2020-03-31 深圳市科力锐科技有限公司 操作系统还原方法、装置、设备及存储介质
CN112579360A (zh) * 2020-12-25 2021-03-30 中标软件有限公司 一种基于麒麟操作系统嵌入式平台的系统备份还原方法
CN116028128A (zh) * 2023-03-27 2023-04-28 广东汉为信息技术有限公司 磁盘分区存储方法、操作系统自动化恢复方法和存储介质

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101510143A (zh) * 2009-03-13 2009-08-19 杭州华三通信技术有限公司 动态分配存储空间的方法、系统和存储装置
CN106446275A (zh) * 2016-10-21 2017-02-22 国云科技股份有限公司 一种支持文件系统扩容的容器实现方法

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101510143A (zh) * 2009-03-13 2009-08-19 杭州华三通信技术有限公司 动态分配存储空间的方法、系统和存储装置
CN106446275A (zh) * 2016-10-21 2017-02-22 国云科技股份有限公司 一种支持文件系统扩容的容器实现方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
51CTO: "如何将Linux系统迁移至LVM卷", 《搜狐,HTTPS://WWW.SOHU.COM/A/112997211_185201》 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107885461A (zh) * 2017-10-19 2018-04-06 北京京东尚科信息技术有限公司 一种数据本地存储方法和装置
CN108829351A (zh) * 2018-06-04 2018-11-16 成都傲梅科技有限公司 一种mbr磁盘转gpt磁盘的方法及其系统
CN108829351B (zh) * 2018-06-04 2021-10-12 成都傲梅科技有限公司 一种mbr磁盘转gpt磁盘的方法
CN110321172A (zh) * 2019-06-03 2019-10-11 平安科技(深圳)有限公司 网络块设备的分区识别方法、装置、设备和存储介质
CN110941516A (zh) * 2019-12-06 2020-03-31 深圳市科力锐科技有限公司 操作系统还原方法、装置、设备及存储介质
CN110941516B (zh) * 2019-12-06 2023-02-17 深圳市科力锐科技有限公司 操作系统还原方法、装置、设备及存储介质
CN112579360A (zh) * 2020-12-25 2021-03-30 中标软件有限公司 一种基于麒麟操作系统嵌入式平台的系统备份还原方法
CN116028128A (zh) * 2023-03-27 2023-04-28 广东汉为信息技术有限公司 磁盘分区存储方法、操作系统自动化恢复方法和存储介质

Similar Documents

Publication Publication Date Title
CN107193506A (zh) 一种中标麒麟系统根分区扩容的实现方法
EP2731013B1 (en) Backing up method, device, and system for virtual machine
US9727430B2 (en) Failure recovery method in information processing system and information processing system
US9697093B2 (en) Techniques for recovering a virtual machine
JP5705309B2 (ja) バックアップ・プロセスを処理する方法、システム、及びコンピュータ・プログラム
US10911065B2 (en) Computer system and method including selectively compressing data files and directories based on an operator indication and representing the amount of available free space
AU2014374256B2 (en) Systems and methods for improving snapshot performance
US8291170B1 (en) System and method for event driven backup data storage
US20120254107A1 (en) Hierarchical management storage system and storage system operating method
EP3769224B1 (en) Configurable recovery states
US10757191B2 (en) System and method for client policy assignment in a data storage system
CN105138431A (zh) 一种Linux系统的备份和还原方法
US8321642B1 (en) Information storage system, snapshot acquisition method, and data storage medium
US11221927B2 (en) Method for the implementation of a high performance, high resiliency and high availability dual controller storage system
US8769334B1 (en) Techniques for providing instant disaster recovery
US10445183B1 (en) Method and system to reclaim disk space by deleting save sets of a backup
US10922183B2 (en) In-place disk unformatting

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20170922

RJ01 Rejection of invention patent application after publication