Centos6.2 adjust the home partition size

Source: Internet
Author: User
1. First check the disk usage

DF-H

Filesystem size used avail use % mounted on/dev/mapper/vg-lv_root 50g 8.9g 378g 18%/tmpfs 1.9g 112 K 1.9g 1%/dev/SHM/dev/sda1 485 m 64 M 396 M 14%/boot/dev/mapper/vg-lv_home 390g 7.5g 40g 2%/home
2. Uninstall/home

Umount/home if the system prompts that the process cannot be uninstalled, the process occupies/home. Run the following command to terminate the process: Fuser-m-v-I-k/home.

3. Adjust the partition size

Resize2fs-P/dev/mapper/VG-LVHome 50g if you are prompted to run "e2fsck-F/dev/mapper/VG-LV"Home, then run the relevant command: e2fsck-F/dev/mapper/VG-LVHome and then run the command again: resize2fs-P/dev/mapper/VG-LVHome 50g

4. Mount/home to view disk usage

Mount/home
DF-H

5. Idle Space

The 1000g in the lvreduce-l1000g/dev/mapper/vg-lv_home command is the space size, which is set as needed.

You can use the vgdisplay command to check the size of the operation. You can also run the fdisk-l command to view details.

6. Hanging idle space in the root directory

Lvextend-L + 1000g/dev/mapper/VG-LVRoot
Execute resize2fs
/Dev/mapper/VG
Voip-lv_root
Use DF to view the information.

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.