1. fdisk -l: detect and confirm a new hard disk
Output information Description
Device: device file name of the partition
boot: whether the boot partition
stat / end: the partition start / end position
blocks: block default size 1024 bytes
Id: the system ID number corresponding to the partition. 83 represents the EXT4 partition in Linux, 8e represents LVM logical volume, 82 denotes swap, fd indicates the RAID
System: partition type
2. fdisk: managing disk partitions in an interactive operating environment
Common options:
m: View help information operation instruction
p: List View partition information
n: New Partition
d: delete partition
t: Change Partition Type
w: Daily News partitioning setup and leave
q: give up the partition settings and exit
Ctrl + backspace: delete character input error
3. mkfs: Create a file system (format)
-t: develop a format file types
-b: Specifies block size in bytes
-I: inode size
-U: set the UUID number
-q: does not display any information when performing
4. mkswap: create a swap file system
Format: mkswap partition device
eg: [root@www~]#mkswap /dev/sd__
5. swapon: Open swap
swapon -s View memory
free -m view memory
cat / proc / meminfo | grep -i "swaptotal" View Memory
6. swapoff: Close swap
7. dd: copy a file with the specified block size, and the designated conversion simultaneous copies.
1. if = file name: Enter the file name, the default is standard input. That is, to specify the source file. <If = input file>
2. of = filename: output file name defaults to the standard output. That is, specify the destination file. <Of = output file>
Parted 8. : more than 2G size of the partition plan
9. partprobe: Load Partition Table
eg : partprobe /dev/sd *
10. Partx: on a disk or partition table type, attempts to resolve the partition table. Can be added or deleted partitions. But not fdisk, add, delete partition resulting in changes to the disk, just tell the kernel current disk partition.
partx [-a|-d|-l] [--type TYPE] [--nr M-N] [partition] disk
-a increase the development of new partitions or read disk partitions
-d delete all partitions or develop
-l List partition
--type specify the partition type. dos, bsd, solaris, unix, or GPT
--NR range specified partition the MN
Mount 11. : View current mount
mount -a mount / etc / fstab recorded all mounted
mount -o loop ISO image file mount point directory
12. unmount: unmount mounted file system
umount -a uninstall all / etc mount / fstab have been recorded
13. df: View disk usage
Format: df [options] [file]
-h: display more readable unit of capacity
-T: display corresponding to the type of the file system
-i: Displays the number of inode
14. xfs_growfs
15.resize2fs
16. blkid: view the partition of the UUID number
Format: blkid partition device
17. Lvm logical volume
(Scan scan, to establish create, display display, delete remove, extend extend, reduce reduce)
pvscan: Scan physical volume vgscan: scanning volume group lvscan: scanning logical volume
P vcreate: establishing physical volume vgcreate: establishing volume group lvcreate: establishing logical
pvdisplay: displaying physical volume vgdisplay: Display the volume group lvdisplay: Display logical volume pvremove: physically removed volume vgremove: Remove a volume group lvremove: Removing a logical volume
vgextend: Extended volume group lvextend: Extending a Logical Volume
vgreduce: reducing the volume group lvreduce: reducing logical volume