{"id":3434,"date":"2012-09-09T18:37:14","date_gmt":"2012-09-09T10:37:14","guid":{"rendered":"http:\/\/jpuyy.com\/?p=3434"},"modified":"2013-01-18T13:54:32","modified_gmt":"2013-01-18T05:54:32","slug":"linux-parted-mkfs-mount-fstab-usage","status":"publish","type":"post","link":"https:\/\/jpuyy.com\/?p=3434","title":{"rendered":"linux\u7684\u5206\u533a\u683c\u5f0f\u5316\uff0c\u6302\u8f7d"},"content":{"rendered":"<p>\u5728\u670d\u52a1\u5668\u4f7f\u7528\u8fc7\u7a0b\u4e2d\uff0c\u67d0\u5206\u533a\u4e0d\u591f\u7528\uff0c\u670d\u52a1\u5668\u53ea\u6709\u4e00\u4e2a\u786c\u76d8\uff0c\u5f53\u65f6\u88c5\u7cfb\u7edf\u4e4b\u65f6\uff0c\u6709\u4e00\u4e2asda3\u5206\u533a\u672a\u4f7f\u7528\u3002<\/p>\n<p>\u73b0\u5c06\u5176\u683c\u5f0f\u5316\u4e3aext3\u683c\u5f0f\uff0c\u6302\u8f7d\u5230\/data\u4e0b\u9762\uff0c\u5e76\u4e14\u5f00\u673a\u8981\u81ea\u52a8\u6302\u8f7d\u3002<\/p>\n<p>\u8fd9\u91cc\u5148\u4f7f\u7528parted\uff0c\u5b83\u662f\u4e00\u4e2a\u8c03\u6574\u5206\u533a\u7684\u5de5\u5177\uff0c\u4e0d\u8fc7\u73b0\u5728\u4f7f\u7528\u5b83\u7684\u663e\u793a\u529f\u80fd\uff0c\u5e76\u4e0d\u5bf9\u786c\u76d8\u505a\u4fee\u6539\u3002p \u4ee3\u8868print \uff0c\u67e5\u770b\u5f53\u524d\u5206\u533a\u60c5\u51b5\uff1a<\/p>\n<p>#parted<\/p>\n<p>GNU Parted 2.1<br \/>\nUsing \/dev\/sda<br \/>\nWelcome to GNU Parted! Type &#8216;help&#8217; to view a list of commands.<\/p>\n<p>(parted) p<\/p>\n<p>Model: ATA ST31000528AS (scsi)<br \/>\nDisk \/dev\/sda: 1000GB<br \/>\nSector size (logical\/physical): 512B\/512B<br \/>\nPartition Table: msdos<\/p>\n<p>Number Start End Size Type File system Flags<br \/>\n1 1049kB 211MB 210MB primary ext3 boot<br \/>\n2 211MB 2358MB 2147MB primary linux-swap(v1)<br \/>\n3 2358MB 1000GB 998GB primary<\/p>\n<p>(parted) quit<\/p>\n<p>\u53ef\u4ee5\u53d1\u73b0sda3\u6ca1\u6709\u663e\u793afile system\uff0c\u8bf4\u660e\u672a\u683c\u5f0f\u5316\uff0c\u73b0\u4f7f\u7528<code>mkfs.ext3<\/code>\u6765\u628asda3\u683c\u5f0f\u5316<\/p>\n<pre>mkfs.ext3 \/dev\/sda3<\/pre>\n<p>mke2fs 1.41.12 (17-May-2010)<br \/>\nFilesystem label=<br \/>\nOS type: Linux<br \/>\nBlock size=4096 (log=2)<br \/>\nFragment size=4096 (log=2)<br \/>\nStride=0 blocks, Stripe width=0 blocks<br \/>\n60907520 inodes, 243614264 blocks<br \/>\n12180713 blocks (5.00%) reserved for the super user<br \/>\nFirst data block=0<br \/>\nMaximum filesystem blocks=4294967296<br \/>\n7435 block groups<br \/>\n32768 blocks per group, 32768 fragments per group<br \/>\n8192 inodes per group<br \/>\nSuperblock backups stored on blocks:<br \/>\n32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,<br \/>\n4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,<br \/>\n102400000, 214990848<\/p>\n<p>Writing inode tables: done<br \/>\nCreating journal (32768 blocks): done<br \/>\nWriting superblocks and filesystem accounting information: done<\/p>\n<p>This filesystem will be automatically checked every 33 mounts or<br \/>\n180 days, whichever comes first. Use tune2fs -c or -i to override.<\/p>\n<p>\u73b0\u5728\u91cd\u65b0\u67e5\u770b\u5206\u533a\u60c5\u51b5\uff0c\u5df2\u7ecf\u662fext3<\/p>\n<pre>3 2358MB 1000GB 998GB primary ext3<\/pre>\n<p>\u521b\u5efa\u76ee\u5f55\/data\uff0c\u4f5c\u4e3asda3\u7684\u6302\u8f7d\u70b9<\/p>\n<pre>mkdir \/data\r\nmount -v \/dev\/sda3 \/data\/<\/pre>\n<p>\u4e3a\u4e86\u4e4b\u540e\u5f00\u673a\u6302\u8f7d\uff0c\u5728\/etc\/fstab\u5199\u5165\u5982\u4e0b\u4e00\u884c<\/p>\n<pre>\/dev\/sda3 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \/data \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 ext3 \u00a0 \u00a0defaults \u00a0 \u00a0 \u00a0 \u00a01 1<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u670d\u52a1\u5668\u4f7f\u7528\u8fc7\u7a0b\u4e2d\uff0c\u67d0\u5206\u533a\u4e0d\u591f\u7528\uff0c\u670d\u52a1\u5668\u53ea\u6709\u4e00\u4e2a\u786c\u76d8\uff0c\u5f53\u65f6\u88c5\u7cfb\u7edf\u4e4b\u65f6\uff0c\u6709\u4e00\u4e2asda3\u5206\u533a\u672a\u4f7f\u7528\u3002 \u73b0\u5c06\u5176\u683c\u5f0f\u5316\u4e3aext3\u683c\u5f0f\uff0c\u6302\u8f7d\u5230\/data\u4e0b\u9762\uff0c\u5e76\u4e14\u5f00\u673a\u8981\u81ea\u52a8\u6302\u8f7d\u3002 \u8fd9\u91cc\u5148\u4f7f\u7528parted\uff0c\u5b83\u662f\u4e00\u4e2a\u8c03\u6574\u5206\u533a\u7684\u5de5\u5177\uff0c\u4e0d\u8fc7\u73b0\u5728\u4f7f\u7528\u5b83\u7684\u663e\u793a\u529f\u80fd\uff0c\u5e76\u4e0d\u5bf9\u786c\u76d8\u505a\u4fee\u6539\u3002p \u4ee3\u8868print \uff0c\u67e5\u770b\u5f53\u524d\u5206\u533a\u60c5\u51b5\uff1a #parted GNU Parted 2.1 Using \/dev\/sda Welcome to GNU Parted! Type &#8216;help&#8217; to view a list of commands. (parted) p Model: ATA ST31000528AS (scsi) Disk \/dev\/sda: 1000GB Sector size (logical\/physical): 512B\/512B Partition Table: msdos Number Start End Size Type File system Flags 1 1049kB 211MB 210MB primary ext3 boot 2 [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-3434","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/posts\/3434","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/jpuyy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3434"}],"version-history":[{"count":7,"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/posts\/3434\/revisions"}],"predecessor-version":[{"id":4625,"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/posts\/3434\/revisions\/4625"}],"wp:attachment":[{"href":"https:\/\/jpuyy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3434"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jpuyy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3434"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jpuyy.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3434"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}