First, create a file system mkfs, mkswap command
mkfs command
Role: Create a file system (format)
Format: mkfs -t type file system partition device
Common options:
-t: Specifies the type of file format
-b: Specifies block size in bytes
-I: inode size
-U: set the UUID number
-q: does not display any information when performing
Create a FAT32 file system: mkfs -t vfat -F 32 / dev / sdb6
xfs_growfs: Refresh xfs file system type
mkswap command
Role: Creating a swap file system
Format; the mkswap partition device
swapn: open partition
swapoff: Close partition
control output based on the input file dd
dd if = / dev / zero of = 112233 (arbitrarily named) bs = 1M count = 500
Second, mount a file system, ISO image, Mount command
Action: mount a file system, ISO image
Format: mount [-t type] storage device mounted directory
mount -o -loop ISO image file mount point directory
mount view the current mount
mount -a mount the / etc / fstab to mount all recorded in
Third, in order to uninstall the mounted file systems umount command
Role: Uninstall with mounted file system
Format: umount storage location
umount mount point directory
umount -a uninstall all / etc / fstab recorded mount
Fourth, view disk usage situation condition df command
Role: View disk usage
Format: df [options] [file]
Common options:
-h: display more readable unit of capacity
-T: display corresponding to the type of the file system
-i: Displays the number of inode
Fifth, view the partition number of the UUID command blkid
Format: blkid partition device
First, LVM logical volume management
1, Lvm Overview
LVM, Logical Volume Management
Role: Dynamic adjustment disk capacity, disk management to improve flexibility
Note: / boot partition for storing boot files can not be created on LVM
2, LVM basic concepts
(1) PV, physical volume
The entire hard drive, or use tools such as fdisk partition to establish common
(2) VG volume group
(3) LV logical volume
Separation space from the volume group, for establishing a file system
3, common management commands LVM
4, commonly used commands:
(1) command to create a physical volume pcareate
Format: pvcreate apparatus 1 [Device 2]
(2) create a volume group command vgcreate
Format: vgcreate physical volume name of the volume group name of the physical volume 1 ... 2 -s option specifies PE size (M)
(3) create a logical volume lvcreate command
Format: lvcreate -L capacity size (-l number designated PE) -n logical name of the volume group name
(4) extending the logical volume command lvextend
Format: lvextend -L + write directly the final size or size increase after the / dev / vgname / logical volume name
format:
mkfs -t xfs / dev / logical group
File system type: xfs, ext4
mkdir / abc (create a directory)
Mount:
mount / dev / logical / abc
(1) adjustment (refresh) logical partition size
Format: resize2fs / dev / volume group names, logical names
Refresh (adjustment) file system:
xfs_growfs command