File System Management

Source: Internet
Author: User
Tags disk usage
Monitor disk usage
Meaning of BDF-related fields
Filesystem Kbytes used avail % used mounted on
/Dev/vg00/lvol3 2097152 410664 1673360 20%/
/Dev/vg00/lvol1 1014648 54992 858184 6%/stand
/Dev/vg00/lvol8 20971520 1647352 19173232 8%/var
/Dev/vg00/lvol7 10485760 1786792 8631064 17%/usr
/Dev/vg00/lvol6 2097152 414480 1670264 20%/tmp
/Dev/vg00/lvol5 20971520 12382832 8521608 59%/OPT
/Dev/vg00/lvol4 5242880 3376 5198608 0%/home
/Dev/vgdata/lvol1 71680000 17502544 53754264 25%/Data
Filesystem file system block Device Files
Kbytes File System Disk Space KB
Used used disk space KB
Avail file system available disk space KB
% Used percentage of disk space occupied by the file
Mounted on file system suspended directory
-The I option adds three columns related to the I node to the output.
Number of I nodes in use on the iused File System
Number of available I nodes on the ifree File System
% Percentage of I nodes in the iuse File System Used
Du: check how much space is used in a directory. By default, the number of blocks with a size of 512 bytes is displayed.
-KB is used in the-K output.
-S only displays the comprehensive information used by the disk in the specified directory
Du-SK *

Daily Management
Reduce log files
/Var file systems often obtain information that the file system is full.
Clear log files
You cannot use RM to delete log files.

Delete core files
The core file is generally used as a result of a serious error or a quit signal, and is generated when the process is terminated abnormally.
Find/-name core-exec ll {}/;
Find/-name core-exec RM {}/;

Large and old files
Find/tmp-atime + 30-size + 1000c-exec ll-ud {}/;

Scale-up group
Vgextend vg01/dev/DSK/c0t5d0

Expand logical volume
Lvextend-l 32/dev/vg01/myfs2/dev/DSK/c0t5d0
File System Expansion

Expand an HFS File System
Assume that/dev/vg01/myfs2 has been expanded
Extendfs-f hfs/dev/vg01/rmyfs2
Expand a JFS File System (offline)
Extendfs-F vxfs/dev/vg01/rmyfs2
Expand a JFS File System (online)
Fsadm-F vxfs-B 32768/myfs2

LVM command Summary
Extendfs offline File System Expansion
Lvchange changes the attributes of a logical volume.
Lvcreate creates a logical volume in the volume group
Lvdisplay displays logical volume information
Lvextend adds the number of physical areas allocated to the logical volume
Lvlnboot sets logical volume as startup, swap, or memory image volume
Lvmerge combines the volumes of previous images into a logical volume
Lvreduce reduces the number of physical areas allocated to logical volumes
Lvremove remove one or more logical volumes from the volume group
Lvrmboot deletes the logical volume that is connected to the boot, swap, Or? village image volume.
Lvsplit divides the logical volume of the image into two logical volumes.
Lvsync synchronizes logical volume images on one or more Invalid logical volumes
Pvchange changes the properties of physical volumes in a volume group.
Pvcreate creates a physical volume that can be used by the volume group.
Pvdisplay displays information about one or more physical volumes in a volume group.
Pvmove transfers the allocated physical area from one physical volume to another.
Vgcfgbackup saves the LVM configuration of the volume group
Vgcfgrestore restores LVM configurations to the volume group
Status of the vgchange switch volume group
Vgcreate creates a volume group
Vgdisplay displays the volume group information
Vgextend extends a volume group by adding a vrono volume
Vgexport outputs a volume group from the system
Vgimport input a volume group to the System
System physical volume of the vgscan volume group
Vgreduce reduces the volume group by deleting one or more physical volumes
Vgremove deletes the definition of one or more volume groups from the system.
Logical volume images synchronized by vgsync to one or more failed volume groups

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: 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.