教你玩转Linux—磁盘格式化

磁盘分割完毕后天然就是要进行文件系统的格式化,格式化的命令很是的简单,使用 mkfs(make filesystem) 命令

教你玩转Linux—磁盘格式化教你玩转Linux—磁盘格式化

语法:html

mkfs [-t 文件系统格式] 装置文件名

选项与参数:node

-t :能够接文件系统格式,例如 ext3, ext2, vfat 等(系统有支持才会生效)linux

实例 1ide

查看 mkfs 支持的文件格式日志

[root@www ~]# mkfs[tab][tab]
mkfs         mkfs.cramfs  mkfs.ext2    mkfs.ext3    mkfs.msdos   mkfs.vfat

按下两个[tab],会发现 mkfs 支持的文件格式如上所示。orm

实例 2htm

将分区 /dev/hdc6(可指定你本身的分区) 格式化为 ext3 文件系统:blog

[root@www ~]# mkfs -t ext3 /dev/hdc6
mke2fs 1.39 (29-May-2006)
Filesystem label=                < ==这里指的是分割槽的名称(label)
OS type: Linux
Block size=4096 (log=2)          <==block 的大小配置为 4K 
Fragment size=4096 (log=2)
251392 inodes, 502023 blocks     <==由此配置决定的inode/block数量
25101 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=515899392
16 block groups
32768 blocks per group, 32768 fragments per group
15712 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912

Writing inode tables: done
Creating journal (8192 blocks): done <==有日志记录
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 34 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
# 这样就建立起来咱们所须要的 Ext3 文件系统了!简单明了!

本文原创地址:https://www.linuxprobe.com/linux-disk-formatting.htmlget

相关文章
相关标签/搜索