Hard disk space is insufficient. What should I do?

Source: Internet
Author: User

What should I do if I find that the hard disk space is insufficient today.

1) First, this partition is LVM, so check whether the previous user has left space for it.

Enter LVM to enter the LVM prompt

2) Input pvscan. It's a day, and our predecessors have reserved 1.78tb. Is it true?

LVM> pvscan
PV/dev/sdg1 VG volgroup lvm2 [1.82 tib/1.78 Tib free]

3) lvscan: I need to give/dev/volgroup/logvol02 a "warehouse upgrade" because it is mounted under the root directory. I need this space to enlarge a little bit.

LVM> lvscan
Active '/dev/volgroup/logvol00' [5.00 gib] inherit
Active '/dev/volgroup/logvol01' [5.00 gib] inherit
Active '/dev/volgroup/logvol02' [10.00 gib] inherit
Active '/dev/volgroup/logvol03' [5.00 gib] inherit
Active '/dev/volgroup/logvol04' [10.00 gib] inherit

4) When lvextend is 1 TB in, am I greedy?

LVM & gt; lvextend-L + 1000g/dev/volgroup/logvol02

5) Exit LVM and run resize2fs to recognize the disk.

Run resize2fs/dev/volgroup/logvol02

The result is as follows:

Filesystem at/dev/volgroup/logvol02 is mounted on/; on-line resizing required
Old desc_blocks = 1, new_desc_blocks = 64
Ming an on-line resize of/dev/volgroup/logvol02 to 265764864 (4 K) blocks.
The filesystem on/dev/volgroup/logvol02 is now 265764864 blocks long.

6) Look at DF-ah.

System capacity in use available % mount point
/Dev/mapper/VolGroup-LogVol02
998 GB 1.7g 946g 1%/

Haha, the disk space has been increased.

This story tells us the truth, because the machine is not installed by us. Don't worry about it, we don't know, and it's hard to trace who installed the machine, so I can only find it myself.

Hi, of course, you must have the root permission. Otherwise, everything is useless.

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.