Expand the Linux Root partition (forward expansion)
Source: Internet
Author: User
Expand the Linux Root partition (extended forward)-Linux Enterprise Application-Linux server application information. For details, see the following. List the commands:
View the mount partitions in linux:
Mount
View partition size and usage
Df-h
View information displayed in 1 K partition segments
Df
View detailed partition information
Fdisk-l/dev/sda [records detailed partition information, including block numbers]
Start with partitioning. For example, if there are too many/partitions, And the/opt partition is not enough.
/Dev/sda6 --->/20G
/Dev/sda7 -->/opt 1G
Start Division:
Modify system partition
Umount/dev/sda6/dev/sda7
E2fsck-f/dev/sda6
Resize2fs/dev/sda6 15G
Reboot
Modify the physical partition of a disk
Fdisk/dev/sda
P records the starting position of the partition 30294
D
6
P
N input: 30294
+ 15 GB
P
N
+ 2G [set the partition size. The capacity of the new partition must be greater than or equal to the original/dev/sda7]
Now we have multiple partitions, sda8.
P
X
F
R
P
W
Copy partition sda8 <原来的sda7> To sda7 <新生成的硬盘空间> :
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