CentOS7 disk mount

1, first check the system disk information, the command is: fdisk -l

Check the system disk information

2, using ext4 format the mounted disk (careful! Careful! Careful!)

Use the command format need to mount the disk

File system name Introduction Feature Advantage
ext The first generation of extended file system is a file system, published in April 1992, it is the first file system done for linux core. Using the Unix File System (UFS) metadata structure to overcome the poor MINIX file system performance problems. It is on linux, first using a virtual file system to achieve a file system MINIX file system to overcome the problems of poor performance
ext2 The second generation extended file system LINUX kernel is used by the file system. It starts designed by Rémy Card, to replace ext, in January 1993 to join the core support in linux. ext2 classic drive to achieve LINUX kernel ext2fs file system, maximum support 2TB file system, when the linux kernel to version 2.6, can be expanded to support 32TB. An ext2 file system, the inode from the file (with a file containing all the information) to uniquely identify. A file may correspond to multiple file names, and only after all file names are deleted, the file will be deleted. In addition, the same file is opened and store the corresponding inode is different from the disk by the kernel is responsible for synchronization. Highly efficient and stable file system
ext3 EXT3 is the third generation of extended file system (English: Third extended filesystem, abbreviated as ext3), is a journaling file system, commonly used in the Linux operating system. .Ext3 file system directly from Ext2 file system evolved, the current ext3 file system has been very stable and reliable. It is fully compatible with ext2 file system. The user can smoothly transition to a logging file system to sound. 1, high availability: the system uses the ext3 file system, even in non-normal shutdown, the system does not need to check the file system. 2, data integrity: avoid unexpected downtime damage to the file system. 3, the speed of the file system: ext3 journaling since the head of the disk drive is optimized. Therefore, read and write performance than the file system and file system Ext2, the performance did not decrease. 4, the data conversion:. "Converted by ext2 file system is very easy to ext3 file system 5, a variety of log mode
ext4 EXT4是第四代扩展文件系统(英语:Fourth extended filesystem,缩写为 ext4)是Linux系统下的日志文件系统,是ext3文件系统的后继版本。Ext4是由Ext3的维护者Theodore Tso领导的开发团队实现的,并引入到Linux2.6.19内核中。 Ext4是Ext3的改进版,修改了Ext3中部分重要的数据结构,而不仅仅像Ext3对Ext2那样,只是增加了一个日志功能而已。Ext4可以提供更佳的性能和可靠性,还有更为丰富的功能 1.与Ext3兼容:执行若干条命令,就能从Ext3在线迁移到Ext4,而无须重新格式化磁盘或重新安装系统。 2.更大的文件系统和更大的文件:较之Ext3目前所支持的最大16TB文件系统和最大2TB文件,Ext4分别支持1EB(1,048,576TB,1EB=1024PB,1PB=1024TB)的文件系统,以及16TB 的文件。3.无限数量的子目录:Ext3目前只支持32,000个子目录,而Ext4支持无限数量的子目录。 4.Extents:Ext4引入了现代文件系统中流行的extents概念,每个 extent 为一组连续的数据块,相比Ext3采用间接块映射,提高了不少效率。5.多块分配:Ext4 的多块分配器“multiblock allocator”(mballoc) 支持一次调用分配多个数据块。 6.延迟分配 7.快速 fsck 8.日志校验 9.“无日志”(No Journaling)模式 10.在线碎片整理 11.inode 相关特性:较之Ext3默认的inode大小128字节,ext4默认inode大小为256字节

3、创建新的目录用来挂载磁盘

在系统根目录下创建一个新的文件夹:	mkdir /data

4、使用命令完成磁盘挂载

挂载命令:	 mount /dev/vdb /data

5、修改fstal文件,实现开机加载磁盘信息

打开fstal文件:	 vi /etc/fstab
添加内容:	/dev/vdb /data  ext4 defaults 0 0 

6、用命令 sync 将缓存写入服务器

同步命令:sync 

7、快速重启服务器

重启命令:init 6

Linux system reboot command of several levels Description:
0 - system down the HALT)
1 - Single-user mode (the MODE Rescue)
2 - Multi-user, does not support NFS
3 - full multi-user mode (normal operating level)
4 - not used
5 - GUI mode, X11 (Xwindow)
. 6 - reboot system reboot

8, check the mounted disk results

查看命令:df -lh
Released four original articles · won praise 6 · views 1761

Guess you like

Origin blog.csdn.net/m0_46422300/article/details/104684538