How to adjust the disk partition size without interrupting CentOS

Source: Internet
Author: User
Tags vps providers gparted
In the QQ group a few days ago, a friend asked me how to adjust the disk partition size without loss in Linux. I have also explored this problem during actual use, therefore, we are more concerned about how to adjust the disk partition size without losing data! In Windows, I used BootStar software, through the software to record the hard disk partition ID, you can achieve lossless partition adjustment, interested friends can go to the following address download: Star-ToolsBootStarv8.30 English version

In the QQ group a few days ago, a friend asked me how to adjust the disk partition size without loss in Linux. I have also explored this problem during actual use, therefore, we are more concerned about how to adjust the disk partition size without losing data! In Windows, I have used BootStar software to record the ID of the hard disk partition, so that the partition can be adjusted lossless. if you are interested, you can download it at the following address:

Star-Tools BootStar v8.30 English version

Http://www.ithov.com/soft/19480.shtml

The BootStar tool is very small, but very easy to use. Is there any lossless disk partition adjustment tool in Linux? I searched Baidu and found an ideal solution. I hope you can use it to solve your actual problems.

1. download gparted-LiveCD

The open-source GParted software is mentioned in this solution, as follows:

Http://gparted.sourceforge.net/download.php

Let's take a rough look at this GParted software:

 

GParted is a very powerful partition tool in linux. it is similar to 'Partition magister' in windows and has similar operations and display. GParted allows you to easily create and delete partitions, adjust the partition size, and move the partition location. GParted supports multiple common partition formats in linux, including ext2, ext4, fat, hfs, jfs, reiser4, reiserfs, xfs, and even ntfs. In addition, the official LiveCD and LiveUSB versions of GParted are also provided to facilitate hard disk partitioning without the primary system!

GParted can be used to create, delete, move, adjust, check, and copy partitions. It can be used to adjust the new operating system installed in the partition, and back up a specific partition to another hard disk.

GParted uses libparted to identify and adjust partition tables, and has various file system tools to process file systems on partitions. These file system tools are not necessary, but to process a file system, you must first install the corresponding tools.

GParted is written in C ++ and provides the GTK + interface using gtkmm.

The GParted project also provides a Live CD containing GParted and all file system tools, which can also be made into Live USB or use other media. This Live CD system is based on Debian GNU/Linux. Most other Linux Live CD versions include GParted, such as Knoppix. Let's take a look at how GParted works! The following uses VPS as an example. you can refer to it in actual use!

 

2. use gparted-LiveCD to boot

Note that there are multiple methods to customize the ISO boot.

Some VPS providers allow customers to upload their own ISO files and then guide them from the ISO files;

However, more VPS providers will add maintenance discs with the gparted tool to the VPS control panel. According to tests in the VPS management Encyclopedia, most VPS providers add some gparted tools to the ISO list to enable customers to maintain their own VPS. For details, consult the provider directly.

If you are using a newer version of gparted-LiveCD, the startup screen shown through VNC should be as follows:

 

Press enter to select the first item. Then, depending on the content of the CD, you may have some simple questions (such as the keyboard area and display mode ), generally, press enter to use the default one (I believe a Linux enthusiast is familiar with these settings)

3. boot to gparted-LiveCD and open the gparted tool.

4. maximize the screen with Gparted. Now you can see the partition information.

 

5. select the partition you want to adjust.

I will try to extend sda1 to the entire disk (that is, the simulation partition is not enough, and I applied for some new disk space from the VPS provider ). The figure shows that sda1 currently has 13 GB, and the new 2.8G has not yet been used. Now I want to resize sda1 to 13 + 2.8 = 16 GB.

Click sda1 partition, and then the "Resize/Move" button above will become available. Click "Resize/Move.

 

6. a window is displayed to adjust the sda1 partition size. The window is displayed intuitively, and there is space available on the right side of sda1. For example:

 

So I click the right arrow on the right and drag it to the rightmost. Make the space of sda1 fully occupied by the entire disk. For example:

 

Click the "Resize/Move" button in the window to confirm the operation.

7. we can see that sda1 already has 16 GB space. In this case, you must click "Apply" to save the changes.

 

8. the partition size is being adjusted. (note that you cannot restart the computer or terminate the program. Be patient and wait for the operation to be completed !!! Otherwise, data will be lost !!!)

 

9. Linux partition size adjusted

 

10. disable VPS, bring up ISO, and start from the original disk.

The above operations have been verified by VPS management Encyclopedia in Debian VPS system (Ext3) without causing data loss. For Linux beginners. This site shall not be liable for any losses caused by the operations in accordance with this tutorial.



 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.