I. Indexed file system features
sector: Minimum physical storage unit,
superblock: Records the entire file system information, including the Inode, block total, usage, Remaining Amount and file system format and other information;
inode: Log file attributes and point to the BLOKCK number that the file actually stores;
Block: Store the contents of the file, a block can only store the contents of the same file, block size is like to put a cube in the cylinder, the smaller the cube will put more, but access speed is slower;
Second, Disk Management
A), view disk and partition status
[[email protected] ~]# lsblkname MAJ:MIN RM SIZE RO TYPE MOUNTPOINTsda 8:0 0 20G 0 disk ├─sda1 8:1 0 2m 0 part ├─sda2 8:2 0 500M 0 part /boot└─sda3 8:3 0 19.5G 0 part ├─centos_a-root 253:0 0 10g 0 lvm /&nbSp; ├─centos_a-swap 253:1 0 1g 0 lvm [swap] └─centos_a-home 253:2 0 8.5g 0 lvm /homesr0 11:0 1 1024m 0 rom[[email protected] ~ ]# parted /dev/sda print ## #查看分割表Model: vmware, vmware virtual S (SCSI) disk /dev/sda: 21.5gbsector size (logical/physical): 512b/ 512bpartition table: msdosdisk flags: number start end Size Type File system Flags 1 1049kB 3146kB 2097kB Primary 2 &nbsP; 3146kb 527mb 524mb primary xfs boot 3 527mb 21.5gb 20.9gb primary lvm
II), Disk segmentation
MBR uses FDISK,GPT using Gdisk, which use the same basic. Split a 5M partition
[[Email protected] ~]# fidsk /dev/sdabash: fidsk: command not found ... similar command is: ' fdisk ' [[email protected] ~]# fdisk /dev/sda Welcome to fdisk (util-linux 2.23.2). changes will remain in memory only, until you decide to Write them. Be careful before using the write command. command (m for help): n # #新建一个分区Partition type: p primary (3 primary, 0 extended, 1 free) e extendedSelect (default e): # #msdos最多只能有4个分区, so establish an extended partition using default response eSelected partition 4First sector (41934848-41943039, default 41934848): # #默认即可Using &NBSP;DEFAULT&NBSP;VALUE&NBSP;41934848&NBSP;&NBSP;&NBsp; ##↓ input partition size last sector, +sectors or +size{k, m,g} (41934848-41943039, default 41943039): +10mvalue out of range. last sector, +sectors or +size{k,m,g} (41934848-41943039, default 41943039) : using default value 41943039partition 4 of type extended and of size 4 MiB is setCommand (m for help): p ## View Partition disk /dev/sda: 21.5 gb, 21474836480 bytes, 41943040 sectorsunits = sectors of 1 * 512 = 512 bytesSector size (logical/physical ): 512 bytes / 512 bytesi/o size (minimum/optimal): 512 bytes / 512 bytesdisk label type: dosdisk identifier: 0x0007947d device boot Start End Blocks Id System/dev/sda1 2048 6143 2048 83 Linux/dev/sda2 * 6144 1030143 512000 83 Linux/dev/sda3 1030144 41934847 20452352 8e Linux LVM/dev/sda4 41934848 41943039 4096 5 extendedcommand (M&NBSP;FOR&NBSP;HELP) : w ## #写入分区表The partition table has been altered! Calling ioctl () to re-read partition table. warning: re-reading the partition table failed with error 16: Device or resource busy. The kernel still uses the old table. the new table will be used atthe next reboot or after you run partprobe (8) or kpartx (8) syncing disks. [[email protected] ~]# partprobe -s # #更新分区表/dev/sda: msdos Partitions 1 2 3 4 <>
III), formatted partition
[Email protected] ~]# mkfs. # #格式化类型mkfs. Btrfs mkfs.ext2 mkfs.ext4 Mkfs.minix mkfs.vfat Mkfs.cramfs mkfs.ext3 mkfs.fat Mkfs.msdos MKFS.XFS [[email protected] ~]# MKFS.EXT4/DEV/SDA4 # #可以使用-D specify block size MKE2FS 1.42.9 (28-dec-2013) mkfs.ext4:inode_size * Inodes_count (0) Too big for a filesystem with 0 blocks, specify higher inode_ratio (-i) or lower in Ode Count (-N).
IV), Mount
[Email protected] ~]# Mount/dev/sda4/ui # #挂载到目录 [[email protected] ~]# Vim/etc/fstab # #追加, boot Mount/dev/sda4 /FL etx4 Defaults 0 0
Linux under Disk Management