{"id":649,"date":"2015-06-19T17:05:46","date_gmt":"2015-06-19T09:05:46","guid":{"rendered":"http:\/\/www.yusian.com\/blog\/?p=649"},"modified":"2020-12-01T19:16:50","modified_gmt":"2020-12-01T11:16:50","slug":"649","status":"publish","type":"post","link":"https:\/\/www.yusian.com\/blog\/centos\/2015\/06\/19\/170546649.html","title":{"rendered":"Linux\u4e0b\u6dfb\u52a0\u65b0\u786c\u76d8\u5e76\u6302\u8f7d\u4f7f\u7528"},"content":{"rendered":"<p><strong>1\u3001 \u67e5\u770b\u65b0\u78c1\u76d8\u4fe1\u606f<\/strong><\/p>\n<pre line=\"1\">\n[root@Crayfish ~]# fdisk -l\n\nDisk \/dev\/xvda: 21.5 GB, 21474836480 bytes\n255 heads, 63 sectors\/track, 2610 cylinders\nUnits = cylinders of 16065 * 512 = 8225280 bytes\nSector size (logical\/physical): 512 bytes \/ 512 bytes\nI\/O size (minimum\/optimal): 512 bytes \/ 512 bytes\nDisk identifier: 0x00060953\n\n    Device Boot      Start         End      Blocks   Id  System\n\/dev\/xvda1   *           1        2611    20970496   83  Linux\n\nDisk \/dev\/xvdb: 21.5 GB, 21474836480 bytes\n255 heads, 63 sectors\/track, 2610 cylinders\nUnits = cylinders of 16065 * 512 = 8225280 bytes\nSector size (logical\/physical): 512 bytes \/ 512 bytes\nI\/O size (minimum\/optimal): 512 bytes \/ 512 bytes\nDisk identifier: 0x00000000<\/pre>\n<p><strong>2\u3001\u786c\u76d8\u5206\u533a<\/strong><\/p>\n<p>2.1\u3001\u8fdb\u5165fdisk\u6a21\u5f0f<\/p>\n<pre line=\"1\">[root@Crayfish ~]# fdisk \/dev\/xvdb\nDevice contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel\nBuilding a new DOS disklabel with disk identifier 0xc233737d.\nChanges will remain in memory only, until you decide to write them.\nAfter that, of course, the previous content won't be recoverable.\n\nWarning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)\n\nWARNING: DOS-compatible mode is deprecated. It's strongly recommended to\n         switch off the mode (command 'c') and change display units to\n         sectors (command 'u').<\/pre>\n<p>2.2\u3001\u8f93\u5165n\u8fdb\u884c\u5206\u533a<br \/>\n<!--more--><\/p>\n<pre line=\"1\" highlight=\"1\">Command (m for help): n\nCommand action\n   e   extended\n   p   primary partition (1-4)<\/pre>\n<p>2.3\u3001\u9009\u62e9\u5206\u533a\u7c7b\u578b\uff0cp\u4e3a\u4e3b\u5206\u533a\uff0clinux\u4e0a\u4e3b\u5206\u533a\u6700\u591a\u80fd\u67094\u4e2a\uff1be\u4e3a\u6269\u5c55\u5206\u533a\uff0c\u6269\u5c55\u5206\u533a linux\u4e0a\u6269\u5c55\u5206\u533a\u53ea\u80fd\u67091\u4e2a\uff0c\u6269\u5c55\u5206\u533a\u521b\u5efa\u540e\u4e0d\u80fd\u76f4\u63a5\u4f7f\u7528\uff0c\u8fd8\u8981\u5728\u6269\u5c55\u5206\u533a\u4e0a\u521b\u5efa\u903b\u8f91\u5206\u533a\u3002\u8fd9\u91cc\u9009\u62e9p<\/p>\n<pre line=\"1\">p<\/pre>\n<p>2.4\u3001\u9009\u62e9\u5206\u533a\u4e2a\u6570\uff0c\u6700\u591a\u53ef\u4ee5\u52064\u4e2a\u533a\uff0c\u8fd9\u91cc\u5c31\u53ea\u5206\u4e00\u4e2a\u4e86\u3002<\/p>\n<pre line=\"1\">Partition number (1-4): 1<\/pre>\n<p>2.5\u3001\u8bbe\u7f6e\u67f1\u9762\uff0c\u8fd9\u91cc\u9009\u62e9\u9ed8\u8ba4\u503c\u5c31\u53ef\u4ee5<\/p>\n<pre line=\"1\">First cylinder (1-2610, default 1): \nUsing default value 1<\/pre>\n<p>2.6\u3001\u8bbe\u7f6e\u67f1\u9762\uff0c\u8fd9\u91cc\u9009\u62e9\u9ed8\u8ba4\u503c\u5c31\u53ef\u4ee5<\/p>\n<pre line=\"1\">Last cylinder, +cylinders or +size{K,M,G} (1-2610, default 2610): \nUsing default value 2610<\/pre>\n<p>2.7\u3001\u8f93\u5165w\uff0c\u5199\u5165\u5206\u533a\u8868\uff0c\u8fdb\u884c\u5206\u533a<\/p>\n<pre line=\"1\">Command (m for help): w\nThe partition table has been altered!\n\nCalling ioctl() to re-read partition table.\nSyncing disks.\n[root@Crayfish ~]# <\/pre>\n<p><strong>3\u3001\u683c\u5f0f\u5316\u5206\u533a<\/strong><\/p>\n<p>\u5982\u679c\u521b\u5efa\u7684\u662f\u4e3b\u5206\u533a<\/p>\n<pre line=\"1\">[root@Crayfish ~]# mkfs -t ext3  \/dev\/xvdb <\/pre>\n<p><strong>4\u3001\u6302\u8f7d\u786c\u76d8 <\/strong><\/p>\n<p>4.1\u3001\u521b\u5efa\u6302\u8f7d\u70b9<br \/>\n\u5728\u6839\u76ee\u5f55\u4e0b\u521b\u5efastorage\u76ee\u5f55<\/p>\n<pre line=\"1\">[root@Crayfish ~]#mkdir \/storage <\/pre>\n<p>4.2\u3001\u5c06\/dev\/sdb1\u6302\u8f7d\u5230\/storage\u4e0b<\/p>\n<pre line=\"1\">[root@Crayfish ~]#mount \/dev\/xvdb  \/storage<\/pre>\n<p><strong>5\u3001\u8bbe\u7f6e\u5f00\u673a\u542f\u52a8\u81ea\u52a8\u6302\u8f7d <\/strong><\/p>\n<p>\u65b0\u521b\u5efa\u7684\u5206\u533a\u4e0d\u80fd\u5f00\u673a\u81ea\u52a8\u6302\u8f7d\uff0c\u6bcf\u6b21\u91cd\u542f\u673a\u5668\u90fd\u8981\u624b\u52a8\u6302\u8f7d\u3002<br \/>\n\u8bbe\u7f6e\u5f00\u673a\u81ea\u52a8\u6302\u8f7d\u9700\u8981\u4fee\u6539\/etc\/fstab\u6587\u4ef6<\/p>\n<pre line=\"1\">[root@Crayfish ~]#vi \/etc\/fstab <\/pre>\n<p>\u5728\u6587\u4ef6\u7684\u6700\u540e\u589e\u52a0\u4e00\u884c<\/p>\n<pre line=\"1\">\/dev\/sdb5 \/storage ext3 defaults 1 2 <\/pre>\n","protected":false},"excerpt":{"rendered":"<p>1\u3001 \u67e5\u770b\u65b0\u78c1\u76d8\u4fe1\u606f [root@Crayfish ~]# fdisk -l Disk \/dev\/xvda: 21.5 GB, 21474836480 bytes 255 heads, 63 sectors\/track, 2610 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical\/physical): 512 bytes \/ 512 bytes I\/O size (minimum\/optimal): 512 bytes \/ 512 bytes Disk identifier: 0x00060953 Device Boot Start End Blocks Id System \/dev\/xvda1 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21],"tags":[8],"class_list":["post-649","post","type-post","status-publish","format-standard","hentry","category-centos","tag-linux"],"_links":{"self":[{"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/posts\/649","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/comments?post=649"}],"version-history":[{"count":0,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/posts\/649\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/media?parent=649"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/categories?post=649"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/tags?post=649"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}