{"id":2691,"date":"2019-05-28T23:52:25","date_gmt":"2019-05-28T15:52:25","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=2691"},"modified":"2022-06-10T16:54:04","modified_gmt":"2022-06-10T08:54:04","slug":"mkfs","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/mkfs","title":{"rendered":"mkfs\u547d\u4ee4 – \u5bf9\u8bbe\u5907\u8fdb\u884c\u683c\u5f0f\u5316\u6587\u4ef6\u7cfb\u7edf\u64cd\u4f5c"},"content":{"rendered":"\n

mkfs\u547d\u4ee4\u6765\u81ea\u4e8e\u82f1\u6587\u8bcd\u7ec4\u201cmake file system\u201d\u7684\u7f29\u5199\uff0c\u5176\u529f\u80fd\u662f\u7528\u4e8e\u5bf9\u8bbe\u5907\u8fdb\u884c\u683c\u5f0f\u5316\u6587\u4ef6\u7cfb\u7edf\u64cd\u4f5c\u3002\u5728\u6302\u8f7d\u4f7f\u7528\u786c\u76d8\u7a7a\u95f4\u524d\u7684\u6700\u540e\u4e00\u6b65\uff0c\u8fd0\u7ef4\u4eba\u5458\u9700\u8981\u5bf9\u6574\u5757\u786c\u76d8\u6216\u6307\u5b9a\u5206\u533a\u8fdb\u884c\u683c\u5f0f\u5316\u6587\u4ef6\u7cfb\u7edf\u64cd\u4f5c\uff0cLinux\u7cfb\u7edf\u652f\u6301\u7684\u6587\u4ef6\u7cfb\u7edf\u5305\u542bext2\u3001ext3\u3001ext4\u3001xfs\u3001fat\u3001msdos\u3001vfat\u3001minix\u7b49\u591a\u79cd\u683c\u5f0f\u3002<\/p>\n\n\n\n

\u8bed\u6cd5\u683c\u5f0f\uff1a<\/strong> mkfs [\u53c2\u6570] \u8bbe\u5907\u540d<\/p>\n\n\n\n

\u5e38\u7528\u53c2\u6570\uff1a<\/strong> <\/p>\n\n\n\n

-V <\/td>\u8be6\u7ec6\u663e\u793a\u6a21\u5f0f <\/td><\/tr>
-t <\/td>\u7ed9\u5b9a\u6863\u6848\u7cfb\u7edf\u7684\u578b\u5f0f<\/td><\/tr>
-c <\/td>\u68c0\u67e5\u8be5\u8bbe\u5907\u662f\u5426\u6709\u635f\u574f<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n

\u53c2\u8003\u5b9e\u4f8b<\/strong><\/p>\n\n\n\n

\u5bf9\u6307\u5b9a\u7684\u786c\u76d8\u8fdb\u884c\u683c\u5f0f\u5316\u6587\u4ef6\u7cfb\u7edf\u64cd\u4f5c\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# mkfs -t ext4 \/dev\/sdb<\/strong>\r\nmke2fs 1.44.3 (10-July-2018)\r\nCreating filesystem with 5242880 4k blocks and 1310720 inodes\r\nFilesystem UUID: 84e96bc0-42bf-4531-9554-97fb04c9b47b\r\nSuperblock backups stored on blocks: \r\n\t32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, \r\n\t4096000\r\n\r\nAllocating group tables: done                            \r\nWriting inode tables: done                            \r\nCreating journal (32768 blocks): done\r\nWriting superblocks and filesystem accounting information: done   <\/pre>\n\n\n\n

\u5bf9\u6307\u5b9a\u7684\u786c\u76d8\u8fdb\u884c\u683c\u5f0f\u5316\u6587\u4ef6\u7cfb\u7edf\u64cd\u4f5c\uff0c\u5e76\u8f93\u51fa\u8be6\u7ec6\u8fc7\u7a0b\u4fe1\u606f\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# mkfs -V -t xfs \/dev\/sdb<\/strong>\r\nmkfs from util-linux 2.32.1\r\nmkfs.xfs \/dev\/sdb \r\nmeta-data=\/dev\/sdb               isize=512    agcount=4, agsize=1310720 blks\r\n         =                       sectsz=512   attr=2, projid32bit=1\r\n         =                       crc=1        finobt=1, sparse=1, rmapbt=0\r\n         =                       reflink=1\r\ndata     =                       bsize=4096   blocks=5242880, imaxpct=25\r\n         =                       sunit=0      swidth=0 blks\r\nnaming   =version 2              bsize=4096   ascii-ci=0, ftype=1\r\nlog      =internal log           bsize=4096   blocks=2560, version=2\r\n         =                       sectsz=512   sunit=0 blks, lazy-count=1\r\nrealtime =none                   extsz=4096   blocks=0, rtextents=0\r<\/pre>\n","protected":false},"excerpt":{"rendered":"

mkfs\u547d\u4ee4\u6765\u81ea\u4e8e\u82f1\u6587\u8bcd\u7ec4\u201cmake file system\u201d\u7684\u7f29\u5199\uff0c\u5176\u529f\u80fd\u662f\u7528\u4e8e\u5bf9\u8bbe\u5907\u8fdb\u884c\u683c\u5f0f\u5316\u6587\u4ef6\u7cfb\u7edf\u64cd\u4f5c […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[5],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/2691"}],"collection":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/comments?post=2691"}],"version-history":[{"count":12,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/2691\/revisions"}],"predecessor-version":[{"id":10268,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/2691\/revisions\/10268"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=2691"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=2691"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=2691"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}