Linux increases root partition size

Source: Internet
Author: User

The following operations run as Root

1. Add a new partition (from the original hard disk, or add a new hard disk and partition Fdisk)
Formatted as EXT4 (MKFS.EXT4/DEV/SDB1, assumed to be/DEV/SDB1)

2. Mount the new partition to a temporary directory, such as:/mnt/tmp
Mount/dev/sdb1/mnt/tmp

3.du-sh/
Look at the size of each directory in a root directory and choose a directory of the right size
such as:/usr directory
Cp-r/usr/*/mnt/tmp

4. Modify/etc/fstab
/DEV/SDB1/USR ext3 defaults 0 0
5. Restart, if the system is operating normally, the new line in the/etc/fstab comment out, then after restarting/usr to change back to the original location, delete the rm-rf/usr/*; if not, find the reason

6. Modify the/etc/fstab, remove the comments, restart the

Linux increases root partition size

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.