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.