{"id":55962,"date":"2025-08-14T10:24:31","date_gmt":"2025-08-14T02:24:31","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/55962.html"},"modified":"2025-08-14T10:24:31","modified_gmt":"2025-08-14T02:24:31","slug":"%e6%b7%b1%e5%85%a5%e5%89%96%e6%9e%90linux%e7%b3%bb%e7%bb%9f%e7%a3%81%e7%9b%98%e7%ae%a1%e7%90%86","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/55962.html","title":{"rendered":"\u6df1\u5165\u5256\u6790Linux\u7cfb\u7edf\u78c1\u76d8\u7ba1\u7406"},"content":{"rendered":"<p id=\"main-toc\">\u76ee\u5f55<\/p>\n<p id=\"%E4%B8%80%E3%80%81%E7%A1%AC%E7%9B%98%E4%BB%8B%E7%BB%8D-toc\" style=\"margin-left:40px\">\u4e00\u3001\u786c\u76d8\u4ecb\u7ecd<\/p>\n<p id=\"1%E3%80%81%E7%A3%81%E7%9B%98%E7%9A%84%E7%89%A9%E7%90%86%E7%BB%93%E6%9E%84-toc\" style=\"margin-left:80px\">1\u3001\u78c1\u76d8\u7684\u7269\u7406\u7ed3\u6784<\/p>\n<p id=\"1.1%E3%80%81%E7%A1%AC%E7%9B%98%E7%BB%93%E6%9E%84-toc\" style=\"margin-left:120px\">1.1\u3001\u786c\u76d8\u7ed3\u6784<\/p>\n<p id=\"1.2%E3%80%81%E7%A3%81%E5%A4%B4%E6%95%B0%E3%80%81%E7%A3%81%E9%81%93%E3%80%81%E6%9F%B1%E9%9D%A2%E3%80%81%E6%89%87%E5%8C%BA-toc\" style=\"margin-left:120px\">1.2\u3001\u78c1\u5934\u6570\u3001\u78c1\u9053\u3001\u67f1\u9762\u3001\u6247\u533a<\/p>\n<p id=\"2%E3%80%81CHS%E7%BC%96%E5%8F%B7-toc\" style=\"margin-left:80px\">2\u3001CHS\u7f16\u53f7<\/p>\n<p id=\"2.1%E3%80%81%E7%A3%81%E9%81%93%E7%BC%96%E5%8F%B7%E8%A7%84%E5%88%99-toc\" style=\"margin-left:120px\">2.1\u3001\u78c1\u9053\u7f16\u53f7\u89c4\u5219<\/p>\n<p id=\"2.2%E3%80%81%E6%89%87%E5%8C%BA%E7%BC%96%E5%8F%B7%E8%A7%84%E5%88%99-toc\" style=\"margin-left:120px\">2.2\u3001\u6247\u533a\u7f16\u53f7\u89c4\u5219<\/p>\n<p id=\"2.3%E3%80%81%E9%80%9A%E8%BF%87CHS%E8%AE%A1%E7%AE%97%E7%A1%AC%E7%9B%98%E5%AE%B9%E9%87%8F-toc\" style=\"margin-left:120px\">2.3\u3001\u901a\u8fc7CHS\u8ba1\u7b97\u786c\u76d8\u5bb9\u91cf<\/p>\n<p id=\"3.%E3%80%81%E7%A3%81%E7%9B%98%E5%AD%98%E5%82%A8%E5%88%92%E5%88%86-toc\" style=\"margin-left:80px\">3.\u3001\u78c1\u76d8\u5b58\u50a8\u5212\u5206<\/p>\n<p id=\"3.1%E3%80%81%E7%AC%AC%E4%B8%80%E4%B8%AA%E6%89%87%E5%8C%BA%E5%AD%98%E5%82%A8%E7%9A%84%E6%95%B0%E6%8D%AE-toc\" style=\"margin-left:120px\">3.1\u3001\u7b2c\u4e00\u4e2a\u6247\u533a\u5b58\u50a8\u7684\u6570\u636e<\/p>\n<p id=\"3.2%E3%80%81%E7%A1%AC%E7%9B%98%E5%88%86%E5%8C%BA-toc\" style=\"margin-left:120px\">3.2\u3001\u786c\u76d8\u5206\u533a<\/p>\n<p id=\"4%E3%80%81%E5%BC%80%E6%9C%BA%E6%B5%81%E7%A8%8B-toc\" style=\"margin-left:80px\">4\u3001\u5f00\u673a\u6d41\u7a0b<\/p>\n<p id=\"5%E3%80%81%E8%A6%81%E7%82%B9-toc\" style=\"margin-left:80px\">5\u3001\u8981\u70b9<\/p>\n<p id=\"6%E3%80%81%E7%A3%81%E7%9B%98%E5%AD%98%E5%82%A8%E6%95%B0%E6%8D%AE%E7%9A%84%E5%BD%A2%E5%BC%8F-toc\" style=\"margin-left:80px\">6\u3001\u78c1\u76d8\u5b58\u50a8\u6570\u636e\u7684\u5f62\u5f0f<\/p>\n<p id=\"%E4%BA%8C%E3%80%81Linux%E6%96%87%E4%BB%B6%E7%B3%BB%E7%BB%9F-toc\" style=\"margin-left:40px\">\u4e8c\u3001Linux\u6587\u4ef6\u7cfb\u7edf<\/p>\n<p id=\"1%E3%80%81%E6%A0%B9%E6%96%87%E4%BB%B6%E7%B3%BB%E7%BB%9F-toc\" style=\"margin-left:80px\">1\u3001\u6839\u6587\u4ef6\u7cfb\u7edf<\/p>\n<p id=\"2%E3%80%81%E8%99%9A%E6%8B%9F%E6%96%87%E4%BB%B6%E7%B3%BB%E7%BB%9F-toc\" style=\"margin-left:80px\">2\u3001\u865a\u62df\u6587\u4ef6\u7cfb\u7edf<\/p>\n<p id=\"3%E3%80%81%E7%9C%9F%E6%96%87%E4%BB%B6%E7%B3%BB%E7%BB%9F-toc\" style=\"margin-left:80px\">3\u3001\u771f\u6587\u4ef6\u7cfb\u7edf<\/p>\n<p id=\"4%E3%80%81%E4%BC%AA%E6%96%87%E4%BB%B6%E7%B3%BB%E7%BB%9F-toc\" style=\"margin-left:80px\">4\u3001\u4f2a\u6587\u4ef6\u7cfb\u7edf<\/p>\n<p id=\"%E4%B8%89%E3%80%81%E7%A3%81%E7%9B%98%E5%88%86%E5%8C%BA%E4%B8%8E%E6%8C%82%E8%BD%BD-toc\" style=\"margin-left:40px\">\u4e09\u3001\u78c1\u76d8\u5206\u533a\u4e0e\u6302\u8f7d<\/p>\n<p id=\"1%E3%80%81%E7%A3%81%E7%9B%98%E5%88%86%E5%8C%BA%E6%96%B9%E5%BC%8F-toc\" style=\"margin-left:80px\">1\u3001\u78c1\u76d8\u5206\u533a\u65b9\u5f0f<\/p>\n<p id=\"2%E3%80%81%E5%88%86%E5%8C%BA%E5%91%BD%E4%BB%A4-toc\" style=\"margin-left:80px\">2\u3001\u5206\u533a\u547d\u4ee4<\/p>\n<p id=\"3%E3%80%81%E6%A0%BC%E5%BC%8F%E5%8C%96%E5%91%BD%E4%BB%A4-toc\" style=\"margin-left:80px\">3\u3001\u683c\u5f0f\u5316\u547d\u4ee4<\/p>\n<p id=\"4%E3%80%81%E6%8C%82%E8%BD%BD%E5%91%BD%E4%BB%A4-toc\" style=\"margin-left:80px\">4\u3001\u6302\u8f7d\u547d\u4ee4<\/p>\n<p id=\"%E5%9B%9B%E3%80%81LVM%E9%80%BB%E8%BE%91%E5%8D%B7-toc\" style=\"margin-left:40px\">\u56db\u3001LVM\u903b\u8f91\u5377<\/p>\n<p id=\"1%E3%80%81%E6%A6%82%E8%BF%B0-toc\" style=\"margin-left:80px\">1\u3001\u6982\u8ff0<\/p>\n<p id=\"2%E3%80%81%E7%AE%A1%E7%90%86%E5%91%BD%E4%BB%A4-toc\" style=\"margin-left:80px\">2\u3001\u7ba1\u7406\u547d\u4ee4<\/p>\n<p id=\"3%E3%80%81%E9%85%8D%E7%BD%AE%E6%A1%88%E4%BE%8B-toc\" style=\"margin-left:80px\">3\u3001\u914d\u7f6e\u6848\u4f8b<\/p>\n<p id=\"%E4%BA%94%E3%80%81%E7%A3%81%E7%9B%98%E9%85%8D%E9%A2%9D-toc\" style=\"margin-left:40px\">\u4e94\u3001\u78c1\u76d8\u914d\u989d<\/p>\n<p id=\"1%E3%80%81%E6%A6%82%E8%BF%B0-toc\" style=\"margin-left:80px\">1\u3001\u6982\u8ff0<\/p>\n<p id=\"2%E3%80%81%E9%85%8D%E7%BD%AE%E5%91%BD%E4%BB%A4-toc\" style=\"margin-left:80px\">2\u3001\u914d\u7f6e\u547d\u4ee4<\/p>\n<p id=\"3%E3%80%81xfs%E9%85%8D%E9%A2%9D-toc\" style=\"margin-left:80px\">3\u3001xfs\u914d\u989d<\/p>\n<p id=\"4%E3%80%81ext4%E9%85%8D%E9%A2%9D%EF%BC%88%E4%BA%86%E8%A7%A3%EF%BC%89-toc\" style=\"margin-left:80px\">4\u3001ext4\u914d\u989d&#xff08;\u4e86\u89e3&#xff09;<\/p>\n<p id=\"%E5%85%AD%E3%80%81%E7%A3%81%E7%9B%98%E6%A3%80%E6%B5%8B%E4%B8%8E%E4%BF%AE%E5%A4%8D-toc\" style=\"margin-left:40px\">\u516d\u3001\u78c1\u76d8\u68c0\u6d4b\u4e0e\u4fee\u590d<\/p>\n<p id=\"1%E3%80%81fsck%E5%91%BD%E4%BB%A4%EF%BC%88%E5%9F%BA%E4%BA%8Eext4)-toc\" style=\"margin-left:80px\">1\u3001fsck\u547d\u4ee4&#xff08;\u57fa\u4e8eext4)<\/p>\n<p id=\"2%E3%80%81xfs_repair%E5%91%BD%E4%BB%A4-toc\" style=\"margin-left:80px\">2\u3001xfs_repair\u547d\u4ee4<\/p>\n<p id=\"%E4%B8%83%E3%80%81%E6%96%87%E4%BB%B6%E7%B3%BB%E7%BB%9F%E5%A4%87%E4%BB%BD%E4%B8%8E%E6%81%A2%E5%A4%8D-toc\" style=\"margin-left:40px\">\u4e03\u3001\u6587\u4ef6\u7cfb\u7edf\u5907\u4efd\u4e0e\u6062\u590d<\/p>\n<p id=\"1%E3%80%81xfsdump%E5%91%BD%E4%BB%A4-toc\" style=\"margin-left:80px\">1\u3001xfsdump\u547d\u4ee4<\/p>\n<p id=\"2%E3%80%81xfsrestore%E5%91%BD%E4%BB%A4-toc\" style=\"margin-left:80px\">2\u3001xfsrestore\u547d\u4ee4<\/p>\n<\/p>\n<h3 id=\"%E4%B8%80%E3%80%81%E7%A1%AC%E7%9B%98%E4%BB%8B%E7%BB%8D\">\u4e00\u3001\u786c\u76d8\u4ecb\u7ecd<\/h3>\n<p>\u6587\u4ef6\u7cfb\u7edf\u662fLinux\u7cfb\u7edf\u7684\u6838\u5fc3&#xff0c;\u5728Linux\u7cfb\u7edf\u4e2d&#xff0c;\u4e00\u5207\u7686\u6587\u4ef6\u3002\u6587\u4ef6\u6700\u7ec8\u662f\u5b58\u50a8\u5728\u78c1\u76d8\u4e0a&#xff0c;\u6587\u4ef6\u7684\u5b58\u53d6&#xff0c;\u6700\u7ec8\u662f\u8bfb\u5199\u78c1\u76d8\u3002<\/p>\n<h4 id=\"1%E3%80%81%E7%A3%81%E7%9B%98%E7%9A%84%E7%89%A9%E7%90%86%E7%BB%93%E6%9E%84\">1\u3001\u78c1\u76d8\u7684\u7269\u7406\u7ed3\u6784<\/h4>\n<h5 id=\"1.1%E3%80%81%E7%A1%AC%E7%9B%98%E7%BB%93%E6%9E%84\">1.1\u3001\u786c\u76d8\u7ed3\u6784<\/h5>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"474\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250814022429-689d48dd95cd0.png\" width=\"474\" \/><\/p>\n<ul>\n<li>\n<p>\u6bcf\u4e2a\u76d8\u7247\u6709\u4e24\u9762&#xff0c;\u4e24\u9762\u90fd\u53ef\u4ee5\u5b58\u50a8\u6570\u636e\u3002<\/p>\n<\/li>\n<li>\n<p>\u6bcf\u4e2a\u76d8\u9762\u90fd\u6709\u4e00\u4e2a\u78c1\u5934&#xff0c;\u7528\u4e8e\u5b58\u53d6\u6570\u636e\u3002<\/p>\n<\/li>\n<li>\n<p>\u6240\u6709\u78c1\u5934\u90fd\u662f\u56fa\u5b9a\u7684&#xff0c;\u4e00\u8d77\u505a\u7269\u7406\u79fb\u52a8\u3002\u4f46\u662f\u6bcf\u6b21\u53ea\u6709\u4e00\u4e2a\u78c1\u5934\u6267\u884c\u5b58\u53d6\u6570\u636e\u7684\u4efb\u52a1&#xff0c;\u9009\u62e9\u4f7f\u7528\u54ea\u4e2a\u78c1\u5934\u662f\u7531\u7cfb\u7edf\u63a7\u5236\u7684\u3002\u78c1\u5934\u95f4\u7684\u5207\u6362\u975e\u5e38\u8fc5\u901f&#xff0c;\u800c\u78c1\u5934\u6446\u52a8\u5bfb\u9053\u5219\u6bd4\u8f83\u6162\u3002<\/p>\n<\/li>\n<li>\n<p>\u78c1\u5934\u6446\u52a8&#xff0c;\u627e\u5230\u8981\u8bfb\u53d6\u6570\u636e\u6240\u5728\u7684\u78c1\u9053&#xff1b;\u76d8\u7247\u901a\u8fc7\u8f6c\u52a8&#xff0c;\u5c06\u6570\u636e\u201c\u9001\u5230\u201d\u78c1\u5934\u4e0b\u3002<\/p>\n<\/li>\n<\/ul>\n<h5 id=\"1.2%E3%80%81%E7%A3%81%E5%A4%B4%E6%95%B0%E3%80%81%E7%A3%81%E9%81%93%E3%80%81%E6%9F%B1%E9%9D%A2%E3%80%81%E6%89%87%E5%8C%BA\">1.2\u3001\u78c1\u5934\u6570\u3001\u78c1\u9053\u3001\u67f1\u9762\u3001\u6247\u533a<\/h5>\n<ul>\n<li>\n<p>\u78c1\u5934\u6570&#xff1a; \u6bcf\u4e2a\u76d8\u9762\u90fd\u6709\u4e00\u4e2a\u78c1\u5934&#xff0c;\u56e0\u6b64\u78c1\u5934\u6570 &#061; \u76d8\u9762\u6570\u3002<\/p>\n<\/li>\n<li>\n<p>\u78c1\u9053&#xff1a; \u4e0a\u4ee5\u76d8\u7247\u8f74\u5fc3\u4e3a\u5706\u5fc3&#xff0c;\u4e0d\u540c\u534a\u5f84\u7684\u540c\u5fc3\u5706\u79f0\u4e3a\u78c1\u9053&#xff0c;\u78c1\u9053\u4e0d\u662f\u771f\u6b63\u8089\u773c\u53ef\u770b\u89c1\u7684\u4e00\u9053\u4e00\u9053\u201c\u5751\u201d&#xff0c;\u800c\u662f\u88ab\u78c1\u76d8\u4e0a\u88ab\u78c1\u5316\u7684\u533a\u57df&#xff0c;\u78c1\u9053\u4e4b\u95f4\u6709\u4e00\u5b9a\u7684\u95f4\u9699&#xff0c;\u4ee5\u514d\u78c1\u9053\u4e4b\u95f4\u78c1\u4ecb\u8d28\u76f8\u4e92\u5f71\u54cd\u3002<\/p>\n<\/li>\n<li>\n<p>\u6247\u533a&#xff1a; \u6bcf\u4e2a\u78c1\u9053\u88ab\u7b49\u5206\u4e3a\u82e5\u5e72\u4e2a\u5f27\u6bb5&#xff08;\u6247\u533a&#xff09;&#xff0c;\u6bcf\u4e2a\u6247\u533a\u53ef\u4ee5\u5b58\u653e512\u4e2a\u5b57\u8282\u7684\u6570\u636e\u3002\u6247\u533a\u662f\u78c1\u76d8\u9a71\u52a8\u5668\u5411\u78c1\u76d8\u8bfb\u5199\u6570\u636e\u7684\u6700\u5c0f\u5355\u5143\u3002<\/p>\n<\/li>\n<li>\n<p>\u67f1\u9762&#xff1a; \u4e0d\u540c\u76d8\u7247\u534a\u5f84\u76f8\u540c\u7684\u78c1\u9053\u7ec4\u6210\u7684\u4e00\u4e2a\u201c\u67f1\u9762\u201d\u3002<\/p>\n<\/li>\n<\/ul>\n<h4 id=\"2%E3%80%81CHS%E7%BC%96%E5%8F%B7\">2\u3001CHS\u7f16\u53f7<\/h4>\n<p>\u786c\u76d8\u7684CHS&#xff0c;\u5373Cylinder&#xff08;\u67f1\u9762&#xff09;\u3001Head&#xff08;\u78c1\u5934&#xff09;\u3001Sector&#xff08;\u6247\u533a&#xff09;\u3002\u6bcf\u4e2a\u67f1\u9762\u3001\u78c1\u5934\u3001\u6247\u533a\u90fd\u6709\u81ea\u5df1\u7684\u7f16\u53f7\u3002<\/p>\n<h5 id=\"2.1%E3%80%81%E7%A3%81%E9%81%93%E7%BC%96%E5%8F%B7%E8%A7%84%E5%88%99\">2.1\u3001\u78c1\u9053\u7f16\u53f7\u89c4\u5219<\/h5>\n<ul>\n<li>\n<p>\u78c1\u5934\u7f16\u53f7&#xff1a; \u4ece\u4e0a\u5230\u4e0b&#xff0c;\u5206\u522b\u4e3a\u78c1\u59340\u53f7&#xff0c;\u78c1\u59341\u53f7&#8230;&#8230;<\/p>\n<\/li>\n<li>\n<p>\u67f1\u9762\u7f16\u53f7&#xff1a; \u6700\u5916\u5708\u7684\u67f1\u9762\u7f16\u53f7\u4e3a0&#xff0c;\u5f80\u91cc\u4f9d\u6b21\u9012\u589e1&#xff0c;2&#xff0c;3&#8230;..<\/p>\n<\/li>\n<\/ul>\n<h5 id=\"2.2%E3%80%81%E6%89%87%E5%8C%BA%E7%BC%96%E5%8F%B7%E8%A7%84%E5%88%99\">2.2\u3001\u6247\u533a\u7f16\u53f7\u89c4\u5219<\/h5>\n<ul>\n<li>\n<p>\u7edd\u5bf9\u6247\u533a&#xff1a; \u7531\u67f1\u9762\u53f7\/\u78c1\u5934\u53f7\/\u6247\u533a\u53f7\u552f\u4e00\u786e\u5b9a\u3002<\/p>\n<\/li>\n<li>\n<p>DOS&#xff08;Disk Operating System&#xff09;\u6247\u533a&#xff08;\u903b\u8f91\u6247\u533a&#xff09;&#xff1a; \u78c1\u76d8\u64cd\u4f5c\u7cfb\u7edf\u4e3a\u4e86\u7ba1\u7406\u65b9\u4fbf&#xff0c;\u4f1a\u5c06\u67f1\u9762\u53f7\/\u78c1\u5934\u53f7\/\u6247\u533a\u53f7\u786e\u5b9a\u7684\u6247\u533a\u7f16\u53f7\u8f6c\u6362\u4e3a\u6613\u4e8e\u7ba1\u7406\u548c\u8ba1\u7b97\u7684\u5355\u4e00\u6570\u5b57\u7f16\u53f7&#xff0c;\u79f0\u4e3a\u76f8\u5bf9\u6247\u533a\u7f16\u53f7\u6216\u903b\u8f91\u6247\u533a\u7f16\u53f7\u3002DOS\u6247\u533a\u7f16\u53f7\u662f\u4ece\u67f1\u97620\/\u78c1\u59340\/\u6247\u533a1\u5f00\u59cb\u7684&#xff0c;\u7f16\u53f7\u4e3a0&#xff0c;\u4f9d\u6b21\u9012\u589e&#xff0c;\u5373\u67f1\u97620\/\u78c1\u59340\/\u6247\u533a18\u7684DOS\u6247\u533a\u7f16\u53f7\u4e3a18&#xff1b;\u67f1\u97620\/\u78c1\u59341\/\u6247\u533a1\u7684DOS\u6247\u533a\u7f16\u53f7\u4e3a19&#8230;\u3002\u6bcf\u4e2a\u5206\u533a\u7684\u7b2c\u4e00\u4e2a\u6247\u533a\u7684\u903b\u8f91\u6247\u533a\u7f16\u53f7\u4e3a0\u3002<\/p>\n<\/li>\n<\/ul>\n<h5 id=\"2.3%E3%80%81%E9%80%9A%E8%BF%87CHS%E8%AE%A1%E7%AE%97%E7%A1%AC%E7%9B%98%E5%AE%B9%E9%87%8F\">2.3\u3001\u901a\u8fc7CHS\u8ba1\u7b97\u786c\u76d8\u5bb9\u91cf<\/h5>\n<ul>\n<li>\u786c\u76d8\u5b58\u50a8\u5bb9\u91cf&#xff1d;\u78c1\u5934\u6570\u00d7\u67f1\u9762\u6570\u00d7\u6bcf\u4e2a\u78c1\u9053\u6247\u533a\u6570\u00d7\u6bcf\u4e2a\u6247\u533a\u5b57\u8282\u6570<\/li>\n<\/ul>\n<h4 id=\"3.%E3%80%81%E7%A3%81%E7%9B%98%E5%AD%98%E5%82%A8%E5%88%92%E5%88%86\">3.\u3001\u78c1\u76d8\u5b58\u50a8\u5212\u5206<\/h4>\n<h5 id=\"3.1%E3%80%81%E7%AC%AC%E4%B8%80%E4%B8%AA%E6%89%87%E5%8C%BA%E5%AD%98%E5%82%A8%E7%9A%84%E6%95%B0%E6%8D%AE\">3.1\u3001\u7b2c\u4e00\u4e2a\u6247\u533a\u5b58\u50a8\u7684\u6570\u636e<\/h5>\n<p>\u786c\u76d8\u7684\u7b2c\u4e00\u4e2a\u6247\u533a&#xff08;\u903b\u8f91\u7f16\u53f7\u4e3a0&#xff09;\u53ef\u4ee5\u8bf4\u662f\u6574\u4e2a\u786c\u76d8\u6700\u91cd\u8981\u6247\u533a\u4e86&#xff0c;\u5b83\u4e3b\u8981\u5b58\u50a8\u4e24\u5927\u4fe1\u606f&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u4e3b\u5f15\u5bfc\u5206\u533a&#xff08;Master Boot Record&#xff0c;MBR&#xff09;&#xff1a; \u5b58\u653e\u5f15\u5bfc\u52a0\u8f7d\u7a0b\u5e8f&#xff0c;\u5927\u5c0f\u4e3a446\u5b57\u8282\u3002<\/p>\n<\/li>\n<li>\n<p>\u5206\u533a\u8868&#xff08;partition table&#xff09;&#xff1a; \u8bb0\u5f55\u6574\u5757\u786c\u76d8\u5206\u533a\u7684\u72b6\u6001&#xff0c;\u536064\u5b57\u8282&#xff0c;\u6bcf\u4e00\u4e2a\u5206\u533a\u4fe1\u606f\u536016\u4e2a\u5b57\u8282\u3002<\/p>\n<\/li>\n<\/ul>\n<h5 id=\"3.2%E3%80%81%E7%A1%AC%E7%9B%98%E5%88%86%E5%8C%BA\">3.2\u3001\u786c\u76d8\u5206\u533a<\/h5>\n<p>\u5206\u533a\u7684\u6700\u5c0f\u5355\u4f4d\u4e3a\u67f1\u9762&#xff08;Cylinder&#xff09;&#xff0c;\u4e5f\u5c31\u662f\u8bf4&#xff0c;\u5206\u533a\u5176\u5b9e\u5c31\u662f\u6307\u5b9a\u4ece\u7b2c\u51e0\u4e2a\u67f1\u9762\u5230\u7b2c\u51e0\u4e2a\u67f1\u9762\u5c5e\u4e8e\u54ea\u4e2a\u533a\u3002<\/p>\n<p>\u5047\u8bbe\u786c\u76d8\u6709400\u4e2a\u67f1\u9762&#xff0c;\u5e73\u5747\u5206\u4e3a4\u4e2a\u533a&#xff08;C\u3001D\u3001E\u3001F\u76d8&#xff09;&#xff0c;\u5219\u7b2c\u56db\u4e2a\u5206\u533aF\u7684\u67f1\u9762\u8303\u56f4\u662f\u7b2c301\u53f7\u5230\u7b2c400\u53f7\u67f1\u9762\u3002<\/p>\n<p>\u5206\u533a\u8868\u4e2d&#xff0c;\u8bb0\u5f55\u7684\u5c31\u662f\u5c31\u662f\u6bcf\u4e2a\u5206\u533a\u7684\u8d77\u59cb\u67f1\u9762\u53f7\u548c\u7ed3\u675f\u67f1\u9762\u53f7\u3002\u56e0\u4e3a\u5206\u533a\u8868\u53ea\u670964\u5b57\u8282&#xff0c;\u56e0\u6b64\u6700\u591a\u53ea\u80fd\u5bb9\u7eb34\u4e2a\u5206\u533a\u7684\u8bb0\u5f55&#xff08;\u786c\u76d8\u9ed8\u8ba4&#xff09;&#xff0c;\u8981\u60f3\u5206\u66f4\u591a\u7684\u53bb&#xff0c;\u5219\u9700\u8981\u901a\u8fc7\u6269\u5c55\u5206\u533a\u6765\u521b\u5efa\u903b\u8f91\u5206\u533a\u3002<\/p>\n<h4 id=\"4%E3%80%81%E5%BC%80%E6%9C%BA%E6%B5%81%E7%A8%8B\">4\u3001\u5f00\u673a\u6d41\u7a0b<\/h4>\n<p>1\u3001\u52a0\u8f7dBIOS:BIOS\u662f\u786c\u4ef6\u5382\u5546\u5199\u5165\u5230\u4e3b\u677fROM\u91cc\u7684\u4e00\u4e2a\u7a0b\u5e8f&#xff0c;\u7535\u8111\u5f00\u673a\u65f6&#xff0c;\u4f1a\u6700\u5148\u6267\u884cBIOS\u3002<\/p>\n<p>2\u3001MBR&#xff1a; BIOS\u5728\u6267\u884c\u7684\u8fc7\u7a0b\u4e2d&#xff0c;\u4f1a\u6839\u636e\u7528\u6237\u8bbe\u7f6e&#xff08;\u5373\u5728BIOS\u7684Boot\u754c\u9762\u9009\u62e9\u7684\u4f18\u5148\u542f\u52a8\u9879&#xff0c;U\u76d8\/\u786c\u76d8\/\u5149\u9a71&#xff09;&#xff0c;\u5982\u679c\u786c\u76d8\u7684\u4f18\u5148\u7ea7\u6700\u9ad8&#xff0c;\u5219\u8ba1\u7b97\u673a\u4f1a\u4ece\u786c\u76d8\u7684\u7b2c\u4e00\u4e2a\u6247\u533a\u7684MBR\u4e2d\u7684\u8bfb\u53d6\u5f15\u5bfc\u52a0\u8f7d\u7a0b\u5e8f&#xff08;Boot Loader&#xff09;\u3002\u548cBIOS\u4e00\u6837&#xff0c;\u4e3b\u5f15\u5bfc\u5206\u533aMBR\u662f\u786c\u4ef6\u672c\u8eab\u4f1a\u652f\u6301\u7684\u4e1c\u897f\u3002<\/p>\n<p>3\u3001\u5f15\u5bfc\u52a0\u8f7d\u7a0b\u5e8f&#xff1a;\u5f15\u5bfc\u52a0\u8f7d\u7a0b\u5e8f&#xff08;Boot Loader&#xff09;\u662f\u7528\u4e8e\u8bfb\u53d6\u64cd\u4f5c\u7cfb\u7edf\u5185\u6838\u6587\u4ef6\u7684\u4e00\u4e2a\u5c0f\u8f6f\u4ef6&#xff0c;\u4e0d\u540c\u7684\u64cd\u4f5c\u7cfb\u7edf\u6709\u5404\u81ea\u7684\u5f15\u5bfc\u52a0\u8f7d\u7a0b\u5e8f\u3002\u6bcf\u4e2a\u5206\u533a\u90fd\u53ef\u4ee5\u6709\u81ea\u5df1\u7684\u6587\u4ef6\u7cfb\u7edf&#xff0c;\u6709\u81ea\u5df1\u7684\u5f15\u5bfc\u6247\u533a&#xff0c;\u5728\u542f\u52a8\u7684\u8fc7\u7a0b\u4e2d&#xff0c;\u7528\u6237\u53ef\u4ee5\u9009\u62e9\u662f\u76f4\u63a5\u52a0\u8f7d\u5f15\u5bfc\u7a0b\u5e8f\u6240\u5728\u5206\u533a\u7684\u64cd\u4f5c\u7cfb\u7edf&#xff0c;\u8fd8\u662f\u5c06\u5f15\u5bfc\u52a0\u8f7d\u529f\u80fd\u4ea4\u7ed9\u5404\u5206\u533a\u5f15\u5bfc\u6247\u533a\u4e2d\u7684\u52a0\u8f7d\u7a0b\u5e8f\u3002boot loader\u7684\u529f\u80fd\u4e3b\u8981\u6709&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u63d0\u4f9b\u83dc\u5355&#xff1a;\u8ba9\u7528\u6237\u9009\u62e9\u4e0d\u540c\u7684\u5f00\u673a\u9009\u9879&#xff0c;\u662f\u591a\u91cd\u5f15\u5bfc\u7684\u91cd\u8981\u529f\u80fd\u3002<\/p>\n<\/li>\n<li>\n<p>\u8f7d\u5165\u5185\u6838\u6587\u4ef6&#xff1a;\u76f4\u63a5\u6307\u5411\u53ef\u5f00\u673a\u7684\u7a0b\u5e8f\u533a\u6bb5&#xff0c;\u5f00\u59cb\u64cd\u4f5c\u7cfb\u7edf\u3002<\/p>\n<\/li>\n<li>\n<p>\u8f6c\u4ea4\u5176\u4ed6loader: \u5c06\u5f15\u5bfc\u52a0\u8f7d\u529f\u80fd\u8f6c\u4ea4\u7ed9\u5176\u4ed6loader\u8d1f\u8d23\u3002<\/p>\n<\/li>\n<\/ul>\n<p>4\u3001\u64cd\u4f5c\u7cfb\u7edf\u5185\u6838\u6587\u4ef6&#xff1a;\u6700\u540e&#xff0c;\u5f15\u5bfc\u52a0\u8f7d\u7a0b\u5e8f\u52a0\u8f7d\u64cd\u4f5c\u7cfb\u7edf\u7684\u5185\u6838\u6587\u4ef6&#xff0c;\u542f\u52a8\u64cd\u4f5c\u7cfb\u7edf&#xff01;<\/p>\n<h4 id=\"5%E3%80%81%E8%A6%81%E7%82%B9\">5\u3001\u8981\u70b9<\/h4>\n<p>1\u3001\u6bcf\u4e2a\u5206\u533a\u90fd\u6709\u81ea\u5df1\u7684\u5f15\u5bfc\u6247\u533a&#xff08;boot sector&#xff09;\u3002<\/p>\n<p>2\u3001\u5b9e\u9645\u53ef\u5f00\u673a\u7684\u64cd\u4f5c\u7cfb\u7edf\u5185\u6838\u6587\u4ef6\u662f\u5b58\u653e\u5728\u5404\u4e2a\u5206\u533a\u5185\u7684&#xff0c;\u5982\u5728C\u76d8\u5b89\u88c5Windows\u7cfb\u7edf&#xff0c;\u5728D\u76d8\u5b89\u88c5Linux\u64cd\u4f5c\u7cfb\u7edf\u3002<\/p>\n<p>3\u3001\u5f15\u5bfc\u52a0\u8f7d\u7a0b\u5e8f&#xff08;boot loader&#xff09;\u53ea\u4f1a\u8ba4\u8bc6\u81ea\u5df1\u6240\u5728\u5206\u533a\u5185\u7684\u53ef\u5f00\u673a\u5185\u6838\u6587\u4ef6&#xff0c;\u4ee5\u53ca\u5176\u4ed6boot loader&#xff08;\u76f8\u5f53\u4e8e\u4e00\u4e2a\u6307\u9488&#xff0c;\u6307\u5411\u5176\u4ed6loader&#xff09;\u3002<\/p>\n<p>4\u3001loader\u53ef\u4ee5\u76f4\u63a5\u6307\u5411\u6216\u8005\u95f4\u63a5\u5730\u5c06\u7ba1\u7406\u6743\u4ea4\u7ed9\u5176\u4ed6loader\u3002<\/p>\n<p>\u6ce8\u610f&#xff1a;\u5982\u679c\u8981\u5b89\u88c5\u591a\u7cfb\u7edf&#xff0c;\u6700\u597d\u5148\u5b89\u88c5Windows&#xff0c;\u540e\u5b89\u88c5Linux\u3002\u56e0\u4e3aWindows\u4f1a\u5f3a\u5236\u8986\u76d6MBS&#xff0c;\u4e5f\u5c31\u662f\u8bf4&#xff0c;\u5982\u679c\u4f60\u5148\u88c5Linux\u518d\u88c5Windows&#xff0c;MBR\u4e2d\u5c31\u53ea\u6709Windows\u7684\u76f8\u5173\u9009\u9879&#xff08;Linux\u7684\u88ab\u8986\u76d6\u6389\u4e86&#xff09;\u3002\u800cLinux\u5219\u4e0d\u4f1a\u5f3a\u5236\u8986\u76d6MBR&#xff0c;\u4f60\u53ef\u4ee5\u9009\u62e9\u5c06Linux\u7684\u5f15\u5bfc\u7a0b\u5e8f\u5b89\u88c5\u5728MBR\u6216\u8005\u5176\u6240\u5728\u5206\u533a\u7684\u5f15\u5bfc\u6247\u533a\u4e2d&#xff1b;\u4f60\u4e5f\u53ef\u4ee5\u5728Linux\u7684\u5f15\u5bfc\u7a0b\u5e8f\u4e2d\u8bbe\u7f6eWindows\u7684\u5f00\u673a\u9009\u9879\u3002<\/p>\n<h4 id=\"6%E3%80%81%E7%A3%81%E7%9B%98%E5%AD%98%E5%82%A8%E6%95%B0%E6%8D%AE%E7%9A%84%E5%BD%A2%E5%BC%8F\">6\u3001\u78c1\u76d8\u5b58\u50a8\u6570\u636e\u7684\u5f62\u5f0f<\/h4>\n<p>\u78c1\u76d8\u4ee5\u4e8c\u8fdb\u5236\u7684\u5f62\u5f0f\u5b58\u50a8\u6570\u636e\u3002\u4e8c\u8fdb\u5236\u4e2d\u76840&#xff0c;\u5bf9\u5e94\u78c1\u76d8\u4e0a\u7684\u4e00\u4e2a\u201c\u51f9\u201d\u70b9&#xff0c;1\u5bf9\u5e94\u78c1\u76d8\u4e0a\u7684\u4e00\u4e2a\u201c\u51f8\u201d\u70b9\u3002<\/p>\n<h3 id=\"%E4%BA%8C%E3%80%81Linux%E6%96%87%E4%BB%B6%E7%B3%BB%E7%BB%9F\">\u4e8c\u3001Linux\u6587\u4ef6\u7cfb\u7edf<\/h3>\n<p>\u6587\u4ef6\u7cfb\u7edf\u7684\u672c\u8d28&#xff1a;\u4e00\u79cd\u65b9\u4fbf\u7ba1\u7406\u3001\u7ec4\u7ec7\u3001\u8bbf\u95ee\u6570\u636e\u7684\u8f6f\u4ef6\u3002<\/p>\n<ul>\n<li>\n<p>\u5bf9\u4e8e\u7ba1\u7406\u6765\u8bf4&#xff0c;\u4e3b\u8981\u662f\u78c1\u76d8\u7a7a\u95f2\u7a7a\u95f4\u7684\u7ba1\u7406<\/p>\n<\/li>\n<li>\n<p>\u5bf9\u4e8e\u7ec4\u7ec7\u6765\u8bf4&#xff0c;\u4e3b\u8981\u662f\u901a\u8fc7\u5f15\u5165\u6587\u4ef6&#xff08;inode&#xff09;\u3001\u6811\u5f62\u76ee\u5f55&#xff08;dentry&#xff09;\u6765\u7ec4\u7ec7\u7528\u6237\u7684\u6570\u636e\u3002\u6587\u4ef6\u5305\u542b\u7528\u6237\u7684\u6570\u636e\u3001\u6811\u5f62\u4e3a\u7528\u6237\u63d0\u4f9b\u4e86\u4e00\u4e2a\u5bf9\u6570\u636e\u8fdb\u884c\u5206\u7c7b\u7684\u529f\u80fd\u3002<\/p>\n<\/li>\n<li>\n<p>\u5bf9\u4e8e\u8bbf\u95ee\u6765\u8bf4&#xff0c;\u901a\u8fc7\u76ee\u5f55&#043;\u6587\u4ef6\u540d\u7684\u65b9\u5f0f\u8fdb\u884c\u6587\u4ef6\u521b\u5efa\u3001\u5220\u9664\u3001\u8bfb\u3001\u5199&#xff08;\u4e5f\u5c31\u662f\u6240\u8c13\u7684\u589e\u3001\u5220\u3001\u67e5\u3001\u6539&#xff09;\u3002<\/p>\n<\/li>\n<\/ul>\n<h4 id=\"1%E3%80%81%E6%A0%B9%E6%96%87%E4%BB%B6%E7%B3%BB%E7%BB%9F\">1\u3001\u6839\u6587\u4ef6\u7cfb\u7edf<\/h4>\n<p>\u2003\u6839\u6587\u4ef6\u7cfb\u7edf&#xff08;rootfs&#xff09;\u662f\u5185\u6838\u542f\u52a8\u65f6\u6240 mount(\u6302\u8f7d)\u7684\u7b2c\u4e00\u4e2a\u6587\u4ef6\u7cfb\u7edf&#xff0c;\u5185\u6838\u4ee3\u7801\u6620\u50cf\u6587\u4ef6\u4fdd\u5b58\u5728\u6839\u6587\u4ef6\u7cfb\u4e2d&#xff0c;\u800c\u7cfb\u7edf\u5f15\u5bfc\u542f\u52a8\u7a0b\u5e8f\u4f1a\u5728\u6839\u6587\u4ef6\u7cfb\u7edf\u6302\u8f7d\u4e4b\u540e\u4ece\u4e2d\u628a\u4e00\u4e9b\u57fa\u672c\u7684\u521d\u59cb\u5316\u811a\u672c\u548c\u670d\u52a1\u7b49\u52a0\u8f7d\u5230\u5185\u5b58\u4e2d\u53bb\u8fd0\u884c\u3002<\/p>\n<h4 id=\"2%E3%80%81%E8%99%9A%E6%8B%9F%E6%96%87%E4%BB%B6%E7%B3%BB%E7%BB%9F\">2\u3001\u865a\u62df\u6587\u4ef6\u7cfb\u7edf<\/h4>\n<p>\u865a\u62df\u6587\u4ef6\u7cfb\u7edfVFS\u8f6f\u4ef6\u62bd\u8c61\u5c42\u4e3a\u7528\u6237\u5c4f\u853d\u4e86\u5e95\u5c42\u6587\u4ef6\u7cfb\u7edf\u7684\u5dee\u5f02&#xff0c;\u5411\u4e0a\u5c42\u63d0\u4f9b\u4e86\u7edf\u4e00\u5730\u8bbf\u95ee\u63a5\u53e3\u3002<\/p>\n<h4 id=\"3%E3%80%81%E7%9C%9F%E6%96%87%E4%BB%B6%E7%B3%BB%E7%BB%9F\">3\u3001\u771f\u6587\u4ef6\u7cfb\u7edf<\/h4>\n<p>\u771f\u6587\u4ef6\u7cfb\u7edf\u5176\u5b9e\u662f\u5b9e\u9645\u5b58\u50a8\u8bbe\u5907\u7684\u6587\u4ef6\u7cfb\u7edf&#xff0c;\u6302\u8f7d\u4e8eEEPROM\u3001 Nor FLASH\u3001 NAND FLASH\u3001 eMMC \u7b49\u5b58\u50a8\u5668\u4e2d\u3002<\/p>\n<p>3.1\u3001ext4<\/p>\n<p>EXT4\u662f\u7b2c\u56db\u4ee3\u6269\u5c55\u6587\u4ef6\u7cfb\u7edf&#xff08;Fourth extended filesystem&#xff0c;\u7f29\u5199\u4e3a ext4&#xff09;\u662fLinux\u7cfb\u7edf\u4e0b\u7684\u65e5\u5fd7\u6587\u4ef6\u7cfb\u7edf,\u4f7f\u752864\u4f4d\u7a7a\u95f4\u8bb0\u5f55\u5757\u6570\u91cf\u548ci-\u8282\u70b9\u6570\u91cf\u3002<\/p>\n<p>3.2\u3001xfs<\/p>\n<p>XFS\u6700\u65e9\u9488\u5bf9IRIX\u64cd\u4f5c\u7cfb\u7edf\u5f00\u53d1&#xff0c;\u662f\u4e00\u4e2a\u9ad8\u6027\u80fd\u7684\u65e5\u5fd7\u578b\u6587\u4ef6\u7cfb\u7edf&#xff0c;\u80fd\u591f\u5728\u65ad\u7535\u4ee5\u53ca\u64cd\u4f5c\u7cfb\u7edf\u5d29\u6e83\u7684\u60c5\u51b5\u4e0b\u4fdd\u8bc1\u6587\u4ef6\u7cfb\u7edf\u6570\u636e\u7684\u4e00\u81f4\u6027\u3002\u5b83\u662f\u4e00\u4e2a64\u4f4d\u7684\u6587\u4ef6\u7cfb\u7edf&#xff0c;\u540e\u6765\u8fdb\u884c\u5f00\u6e90\u5e76\u4e14\u79fb\u690d\u5230\u4e86Linux\u64cd\u4f5c\u7cfb\u7edf\u4e2d&#xff0c;\u76ee\u524dCentOS 7\u5c06XFS&#043;LVM\u4f5c\u4e3a\u9ed8\u8ba4\u7684\u6587\u4ef6\u7cfb\u7edf\u3002\u636e\u5b98\u65b9\u6240\u79f0&#xff0c;XFS\u5bf9\u4e8e\u5927\u6587\u4ef6\u7684\u8bfb\u5199\u6027\u80fd\u8f83\u597d\u3002<\/p>\n<h4 id=\"4%E3%80%81%E4%BC%AA%E6%96%87%E4%BB%B6%E7%B3%BB%E7%BB%9F\">4\u3001\u4f2a\u6587\u4ef6\u7cfb\u7edf<\/h4>\n<p>Linux\u5185\u6838\u63d0\u4f9b\u4e86sysfs\u3001procfs\u3001devtmpfs\u7b49\u4f2a\u6587\u4ef6\u7cfb\u7edf&#xff0c;\u4f2a\u6587\u4ef6\u7cfb\u7edf\u5b58\u5728\u4e8e\u5185\u5b58&#xff0c;\u4e0d\u5360\u7528\u786c\u76d8\u3002\u4ee5\u6587\u4ef6\u5730\u5f62\u5f0f\u5411\u7528\u6237\u63d0\u4f9b\u4e00\u4e9b\u7cfb\u7edf\u4fe1\u606f&#xff0c;\u7528\u6237\u8bfb\u5199\u8fd9\u4e9b\u6587\u4ef6\u5c31\u53ef\u4ee5\u8bfb\u53d6\u3001\u4fee\u6539\u7cfb\u7edf\u7684\u4e00\u4e9b\u4fe1\u606f\u3002<\/p>\n<p>4.1\u3001procfs<\/p>\n<p>\u2003procfs\u662f \u8fdb\u7a0b\u6587\u4ef6\u7cfb\u7edf\u7684\u7f29\u5199&#xff0c;\u5305\u542b\u4e00\u4e2a\u4f2a\u6587\u4ef6\u7cfb\u7edf&#xff08;\u542f\u52a8\u65f6\u52a8\u6001\u751f\u6210\u7684\u6587\u4ef6\u7cfb\u7edf&#xff09;&#xff0c;\u7528\u4e8e\u901a\u8fc7\u5185\u6838\u8bbf\u95ee\u8fdb\u7a0b\u4fe1\u606f\u3002\u8fd9\u4e2a\u6587\u4ef6\u7cfb\u7edf\u901a\u5e38\u88ab\u6302\u8f7d\u5230 \/proc \u76ee\u5f55\u3002<\/p>\n<p>\u2003\u2003\u7531\u4e8e \/proc \u4e0d\u662f\u4e00\u4e2a\u771f\u6b63\u7684\u6587\u4ef6\u7cfb\u7edf&#xff0c;\u5b83\u4e5f\u5c31\u4e0d\u5360\u7528\u5b58\u50a8\u7a7a\u95f4&#xff0c;\u53ea\u662f\u5360\u7528\u6709\u9650\u7684\u5185\u5b58\u3002<\/p>\n<p>4.2\u3001devtmpfs<\/p>\n<p>devtmpfs \u7684\u529f\u7528\u662f\u5728 Linux \u6838\u5fc3 \u542f\u52a8\u65e9\u671f\u5efa\u7acb\u4e00\u4e2a\u521d\u6b65\u7684 \/dev&#xff0c;\u4ee4\u4e00\u822c\u542f\u52a8\u7a0b\u5e8f\u4e0d\u7528\u7b49\u5f85 udev&#xff08;udev \u662fLinux kernel 2.6\u7cfb\u5217\u7684\u8bbe\u5907\u7ba1\u7406\u5668\u3002\u5b83\u4e3b\u8981\u7684\u529f\u80fd\u662f\u7ba1\u7406\/dev\u76ee\u5f55\u5e95\u4e0b\u7684\u8bbe\u5907\u8282\u70b9\u3002&#xff09;&#xff0c;\u7f29\u77ed GNU\/Linux \u7684\u5f00\u673a\u65f6\u95f4\u3002<\/p>\n<p>\u2003\u2003\u5982\u679c\u5c06\u4e00\u4e2a\u8bbe\u5907\u8fde\u63a5\u5230Linux\u7cfb\u7edf\u65f6&#xff0c;\u901a\u5e38\u9700\u8981\u4e00\u4e2a\u8bbe\u5907\u9a71\u52a8\u7a0b\u5e8f\u624d\u80fd\u6b63\u5e38\u5de5\u4f5c\u3002\u6b64\u65f6\u901a\u8fc7\u8bbe\u5907\u6587\u4ef6\u6216\u8bbe\u5907\u8282\u70b9\u4e0e\u8bbe\u5907\u9a71\u52a8\u7a0b\u5e8f\u4ea4\u4e92&#xff0c;\u8fd9\u4e9b\u662f\u770b\u8d77\u6765\u50cf\u666e\u901a\u6587\u4ef6\u7684\u7279\u6b8a\u6587\u4ef6\u3002\u7531\u4e8e\u8fd9\u4e9b\u8bbe\u5907\u6587\u4ef6\u5c31\u50cf\u666e\u901a\u6587\u4ef6\u4e00\u6837&#xff0c;\u6240\u4ee5\u53ef\u4ee5\u4f7f\u7528ls\u3001cat\u7b49\u7a0b\u5e8f\u4e0e\u5b83\u4eec\u4ea4\u4e92\u3002\u8fd9\u4e9b\u8bbe\u5907\u6587\u4ef6\u4e00\u822c\u5b58\u653e\u5728\/dev\u76ee\u5f55\u4e0b\u3002<\/p>\n<p>4.3\u3001sysfs<\/p>\n<p>sysfs\u662f\u4e00\u4e2a\u57fa\u4e8e\u5185\u5b58\u7684\u6587\u4ef6\u7cfb\u7edf&#xff0c;\u5b83\u7684\u4f5c\u7528\u662f\u5c06\u5185\u6838\u4fe1\u606f\u4ee5\u6587\u4ef6\u7684\u65b9\u5f0f\u63d0\u4f9b\u7ed9\u7528\u6237\u7a0b\u5e8f\u4f7f\u7528\u3002sysfs \u6587\u4ef6\u7cfb\u7edf\u88ab\u6302\u8f7d\u5728 \/sys \u6302\u8f7d\u70b9\u4e0a\u3002<\/p>\n<p>\u2003\u2003Sysfs\u7684\u76ee\u7684\u662f\u66f4\u597d\u5730\u7ba1\u7406\u7cfb\u7edf\u4e0a\u7684\u8bbe\u5907&#xff0c;\u76f8\u6bd4\/dev\u76ee\u5f55\u65e0\u6cd5\u505a\u5230\u8fd9\u4e00\u70b9\u3002Sysfs\u662f\u4e00\u4e2a\u865a\u62df\u6587\u4ef6\u7cfb\u7edf&#xff0c;\u901a\u5e38\u6302\u8f7d\u5728\/sys\u76ee\u5f55\u4e0b\u3002\u5b83\u4e3a\u6211\u4eec\u63d0\u4f9b\u4e86\u6bd4\u5728\/dev\u76ee\u5f55\u4e2d\u80fd\u591f\u770b\u5230\u7684\u66f4\u8be6\u7ec6\u7684\u4fe1\u606f\u3002\u76ee\u5f55\/sys\u548c\/dev\u5728\u67d0\u4e9b\u65b9\u9762\u770b\u8d77\u6765\u975e\u5e38\u76f8\u4f3c&#xff0c;\u4f46\u5b83\u4eec\u786e\u5b9e\u6709\u5f88\u5927\u7684\u4e0d\u540c\u3002\u57fa\u672c\u4e0a&#xff0c;\/dev\u76ee\u5f55\u5f88\u7b80\u5355&#xff0c;\u5b83\u5141\u8bb8\u5176\u4ed6\u7a0b\u5e8f\u8bbf\u95ee\u8bbe\u5907\u672c\u8eab&#xff0c;\u800c\/sys\u6587\u4ef6\u7cfb\u7edf\u7528\u4e8e\u67e5\u770b\u4fe1\u606f\u548c\u7ba1\u7406\u8bbe\u5907\u3002<\/p>\n<p>\u2003\u2003\/sys\u6587\u4ef6\u7cfb\u7edf\u57fa\u672c\u4e0a\u5305\u542b\u4e86\u7cfb\u7edf\u4e2d\u6240\u6709\u8bbe\u5907\u7684\u6240\u6709\u4fe1\u606f&#xff0c;\u6bd4\u5982\u5236\u9020\u5546\u548c\u578b\u53f7\u3001\u8bbe\u5907\u63d2\u5165\u7684\u4f4d\u7f6e\u3001\u8bbe\u5907\u7684\u72b6\u6001\u3001\u8bbe\u5907\u7684\u5c42\u6b21\u7ed3\u6784\u7b49\u7b49\u3002\u5728\u8fd9\u91cc\u770b\u5230\u7684\u6587\u4ef6\u4e0d\u662f\u8bbe\u5907\u8282\u70b9&#xff0c;\u56e0\u6b64\u5b9e\u9645\u4e0a\u5e76\u4e0d\u662f\u5728\/sys\u76ee\u5f55\u4e0b\u4e0e\u8bbe\u5907\u4ea4\u4e92&#xff0c;\u800c\u662f\u5728\u7ba1\u7406\u8bbe\u5907\u3002<\/p>\n<h3 id=\"%E4%B8%89%E3%80%81%E7%A3%81%E7%9B%98%E5%88%86%E5%8C%BA%E4%B8%8E%E6%8C%82%E8%BD%BD\">\u4e09\u3001\u78c1\u76d8\u5206\u533a\u4e0e\u6302\u8f7d<\/h3>\n<h4 id=\"1%E3%80%81%E7%A3%81%E7%9B%98%E5%88%86%E5%8C%BA%E6%96%B9%E5%BC%8F\">1\u3001\u78c1\u76d8\u5206\u533a\u65b9\u5f0f<\/h4>\n<p>MBR<\/p>\n<p>\u4e3b\u5f15\u5bfc\u8bb0\u5f55&#xff0c;\u652f\u6301\u56db\u4e2a\u4e3b\u5206\u533a\u6216\u4e09\u4e3b\u4e00\u6269\u5c55\u591a\u4e2a\u903b\u8f91&#xff0c;\u6bcf\u5206\u533a\u6700\u59272TB&#xff0c;\u517c\u5bb9\u6027\u597d\u3002<\/p>\n<p>GPT<\/p>\n<p>\u00a0\u00a0\u662fGUID\u5206\u533a\u8868&#xff08;GUID Partition Table&#xff09;\u7684\u7f29\u5199; \u542b\u4e49\u4e3a\u201c\u5168\u5c40\u552f\u4e00\u6807\u8bc6\u78c1\u76d8\u5206\u533a\u8868\u201d&#xff0c;\u662f\u4e00\u4e2a\u5b9e\u4f53\u786c\u76d8\u7684\u5206\u533a\u8868\u7684\u7ed3\u6784\u5e03\u5c40\u7684\u6807\u51c6\u3002 \u81ea\u7ea0\u9519\u80fd\u529b\u5f3a&#xff0c;\u4e00\u5757\u78c1\u76d8\u4e0a\u4e3b\u5206\u533a\u6570\u91cf\u4e0d\u53d7&#xff08;4\u4e2a\u7684&#xff09;\u9650\u5236&#xff0c;\u652f\u6301\u5927\u4e8e18EB\u7684\u603b\u5bb9\u91cf&#xff0c; \u51e0\u4e4e\u6ca1\u6709\u4e0a\u9650&#xff0c;\u6700\u5927\u652f\u6301\u5230128\u4e2a\u5206\u533a&#xff0c;\u5206\u533a\u5927\u5c0f\u652f\u6301\u5230256TB\u3002<\/p>\n<h4 id=\"2%E3%80%81%E5%88%86%E5%8C%BA%E5%91%BD%E4%BB%A4\">2\u3001\u5206\u533a\u547d\u4ee4<\/h4>\n<p>#\u78c1\u76d8\u70ed\u626b\u63cf&#xff1a;(\u78c1\u76d8\u7c7b\u578b\u4e3aSCSI)<\/p>\n<p>cd \u00a0\/sys\/class\/scsi_host for i in &#096;ls \/sys\/class\/scsi_host&#096;;do echo &#034;- &#8211; -&#034; &gt; ${i}\/scan;done<\/p>\n<p>2.1\u3001fdisk\u547d\u4ee4<\/p>\n<p>fdisk -l\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u663e\u793a\u7cfb\u7edf\u4e2d\u5df2\u5b89\u88c5\u7684\u5206\u533a\u8868<\/p>\n<p>\u64cd\u4f5c\u6848\u4f8b&#xff1a;<\/p>\n<p>\u521b\u5efa\u4e3b\u5206\u533a<\/p>\n<p>[root&#064;localhost ~]# lsblk<br \/>\nNAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS<br \/>\nsr0          11:0    1  1024M  0 rom<br \/>\nnvme0n1     259:0    0   200G  0 disk<br \/>\n\u251c\u2500nvme0n1p1 259:1    0     1G  0 part \/boot<br \/>\n\u2514\u2500nvme0n1p2 259:2    0   199G  0 part<br \/>\n  \u251c\u2500rl-root 253:0    0    70G  0 lvm  \/<br \/>\n  \u251c\u2500rl-swap 253:1    0   3.9G  0 lvm  [SWAP]<br \/>\n  \u2514\u2500rl-home 253:2    0 125.1G  0 lvm  \/home<br \/>\nnvme0n2     259:3    0     6G  0 disk<br \/>\n[root&#064;localhost ~]# fdisk \/dev\/nvme0n2<\/p>\n<p>\u6b22\u8fce\u4f7f\u7528 fdisk (util-linux 2.37.4)\u3002<br \/>\n\u66f4\u6539\u5c06\u505c\u7559\u5728\u5185\u5b58\u4e2d&#xff0c;\u76f4\u5230\u60a8\u51b3\u5b9a\u5c06\u66f4\u6539\u5199\u5165\u78c1\u76d8\u3002<br \/>\n\u4f7f\u7528\u5199\u5165\u547d\u4ee4\u524d\u8bf7\u4e09\u601d\u3002<\/p>\n<p>\u8bbe\u5907\u4e0d\u5305\u542b\u53ef\u8bc6\u522b\u7684\u5206\u533a\u8868\u3002<br \/>\n\u521b\u5efa\u4e86\u4e00\u4e2a\u78c1\u76d8\u6807\u8bc6\u7b26\u4e3a 0x4d252648 \u7684\u65b0 DOS \u78c1\u76d8\u6807\u7b7e\u3002<\/p>\n<p>\u547d\u4ee4(\u8f93\u5165 m \u83b7\u53d6\u5e2e\u52a9)&#xff1a;m<\/p>\n<p>\u5e2e\u52a9&#xff1a;<\/p>\n<p>  DOS (MBR)<br \/>\n   a   \u5f00\u5173 \u53ef\u542f\u52a8 \u6807\u5fd7<br \/>\n   b   \u7f16\u8f91\u5d4c\u5957\u7684 BSD \u78c1\u76d8\u6807\u7b7e<br \/>\n   c   \u5f00\u5173 dos \u517c\u5bb9\u6027\u6807\u5fd7<\/p>\n<p>  \u5e38\u89c4<br \/>\n   d   \u5220\u9664\u5206\u533a<br \/>\n   F   \u5217\u51fa\u672a\u5206\u533a\u7684\u7a7a\u95f2\u533a<br \/>\n   l   \u5217\u51fa\u5df2\u77e5\u5206\u533a\u7c7b\u578b<br \/>\n   n   \u6dfb\u52a0\u65b0\u5206\u533a<br \/>\n   p   \u6253\u5370\u5206\u533a\u8868<br \/>\n   t   \u66f4\u6539\u5206\u533a\u7c7b\u578b<br \/>\n   v   \u68c0\u67e5\u5206\u533a\u8868<br \/>\n   i   \u6253\u5370\u67d0\u4e2a\u5206\u533a\u7684\u76f8\u5173\u4fe1\u606f<\/p>\n<p>  \u6742\u9879<br \/>\n   m   \u6253\u5370\u6b64\u83dc\u5355<br \/>\n   u   \u66f4\u6539 \u663e\u793a\/\u8bb0\u5f55 \u5355\u4f4d<br \/>\n   x   \u66f4\u591a\u529f\u80fd(\u4ec5\u9650\u4e13\u4e1a\u4eba\u5458)<\/p>\n<p>  \u811a\u672c<br \/>\n   I   \u4ece sfdisk \u811a\u672c\u6587\u4ef6\u52a0\u8f7d\u78c1\u76d8\u5e03\u5c40<br \/>\n   O   \u5c06\u78c1\u76d8\u5e03\u5c40\u8f6c\u50a8\u4e3a sfdisk \u811a\u672c\u6587\u4ef6<\/p>\n<p>  \u4fdd\u5b58\u5e76\u9000\u51fa<br \/>\n   w   \u5c06\u5206\u533a\u8868\u5199\u5165\u78c1\u76d8\u5e76\u9000\u51fa<br \/>\n   q   \u9000\u51fa\u800c\u4e0d\u4fdd\u5b58\u66f4\u6539<\/p>\n<p>  \u65b0\u5efa\u7a7a\u78c1\u76d8\u6807\u7b7e<br \/>\n   g   \u65b0\u5efa\u4e00\u4efd GPT \u5206\u533a\u8868<br \/>\n   G   \u65b0\u5efa\u4e00\u4efd\u7a7a GPT (IRIX) \u5206\u533a\u8868<br \/>\n   o   \u65b0\u5efa\u4e00\u4efd\u7684\u7a7a DOS \u5206\u533a\u8868<br \/>\n   s   \u65b0\u5efa\u4e00\u4efd\u7a7a Sun \u5206\u533a\u8868<\/p>\n<p>\u547d\u4ee4(\u8f93\u5165 m \u83b7\u53d6\u5e2e\u52a9)&#xff1a;n<br \/>\n\u5206\u533a\u7c7b\u578b<br \/>\n   p   \u4e3b\u5206\u533a (0 primary, 0 extended, 4 free)<br \/>\n   e   \u6269\u5c55\u5206\u533a (\u903b\u8f91\u5206\u533a\u5bb9\u5668)<br \/>\n\u9009\u62e9 (\u9ed8\u8ba4 p)&#xff1a;p<br \/>\n\u5206\u533a\u53f7 (1-4, \u9ed8\u8ba4  1):<br \/>\n\u7b2c\u4e00\u4e2a\u6247\u533a (2048-12582911, \u9ed8\u8ba4 2048):<br \/>\n\u6700\u540e\u4e00\u4e2a\u6247\u533a&#xff0c;&#043;\/-sectors \u6216 &#043;size{K,M,G,T,P} (2048-12582911, \u9ed8\u8ba4 12582911): &#043;1G<\/p>\n<p>\u521b\u5efa\u4e86\u4e00\u4e2a\u65b0\u5206\u533a 1&#xff0c;\u7c7b\u578b\u4e3a\u201cLinux\u201d&#xff0c;\u5927\u5c0f\u4e3a 1 GiB\u3002<\/p>\n<p>\u547d\u4ee4(\u8f93\u5165 m \u83b7\u53d6\u5e2e\u52a9)&#xff1a;p<br \/>\nDisk \/dev\/nvme0n2&#xff1a;6 GiB&#xff0c;6442450944 \u5b57\u8282&#xff0c;12582912 \u4e2a\u6247\u533a<br \/>\n\u78c1\u76d8\u578b\u53f7&#xff1a;VMware Virtual NVMe Disk<br \/>\n\u5355\u5143&#xff1a;\u6247\u533a \/ 1 * 512 &#061; 512 \u5b57\u8282<br \/>\n\u6247\u533a\u5927\u5c0f(\u903b\u8f91\/\u7269\u7406)&#xff1a;512 \u5b57\u8282 \/ 512 \u5b57\u8282<br \/>\nI\/O \u5927\u5c0f(\u6700\u5c0f\/\u6700\u4f73)&#xff1a;512 \u5b57\u8282 \/ 512 \u5b57\u8282<br \/>\n\u78c1\u76d8\u6807\u7b7e\u7c7b\u578b&#xff1a;dos<br \/>\n\u78c1\u76d8\u6807\u8bc6\u7b26&#xff1a;0x4d252648<\/p>\n<p>\u8bbe\u5907           \u542f\u52a8  \u8d77\u70b9    \u672b\u5c3e    \u6247\u533a \u5927\u5c0f Id \u7c7b\u578b<br \/>\n\/dev\/nvme0n2p1       2048 2099199 2097152   1G 83 Linux<\/p>\n<p>\u521b\u5efa\u6269\u5c55\u5206\u533a<\/p>\n<p>\u547d\u4ee4(\u8f93\u5165 m \u83b7\u53d6\u5e2e\u52a9)&#xff1a;n<br \/>\n\u5206\u533a\u7c7b\u578b<br \/>\n   p   \u4e3b\u5206\u533a (1 primary, 0 extended, 3 free)<br \/>\n   e   \u6269\u5c55\u5206\u533a (\u903b\u8f91\u5206\u533a\u5bb9\u5668)<br \/>\n\u9009\u62e9 (\u9ed8\u8ba4 p)&#xff1a;e<br \/>\n\u5206\u533a\u53f7 (2-4, \u9ed8\u8ba4  2):<br \/>\n\u7b2c\u4e00\u4e2a\u6247\u533a (2099200-12582911, \u9ed8\u8ba4 2099200):<br \/>\n\u6700\u540e\u4e00\u4e2a\u6247\u533a&#xff0c;&#043;\/-sectors \u6216 &#043;size{K,M,G,T,P} (2099200-12582911, \u9ed8\u8ba4 12582911): &#043;1G<\/p>\n<p>\u521b\u5efa\u4e86\u4e00\u4e2a\u65b0\u5206\u533a 2&#xff0c;\u7c7b\u578b\u4e3a\u201cExtended\u201d&#xff0c;\u5927\u5c0f\u4e3a 1 GiB\u3002<\/p>\n<p>\u547d\u4ee4(\u8f93\u5165 m \u83b7\u53d6\u5e2e\u52a9)&#xff1a;p<br \/>\nDisk \/dev\/nvme0n2&#xff1a;6 GiB&#xff0c;6442450944 \u5b57\u8282&#xff0c;12582912 \u4e2a\u6247\u533a<br \/>\n\u78c1\u76d8\u578b\u53f7&#xff1a;VMware Virtual NVMe Disk<br \/>\n\u5355\u5143&#xff1a;\u6247\u533a \/ 1 * 512 &#061; 512 \u5b57\u8282<br \/>\n\u6247\u533a\u5927\u5c0f(\u903b\u8f91\/\u7269\u7406)&#xff1a;512 \u5b57\u8282 \/ 512 \u5b57\u8282<br \/>\nI\/O \u5927\u5c0f(\u6700\u5c0f\/\u6700\u4f73)&#xff1a;512 \u5b57\u8282 \/ 512 \u5b57\u8282<br \/>\n\u78c1\u76d8\u6807\u7b7e\u7c7b\u578b&#xff1a;dos<br \/>\n\u78c1\u76d8\u6807\u8bc6\u7b26&#xff1a;0x7aba06fd<\/p>\n<p>\u8bbe\u5907           \u542f\u52a8    \u8d77\u70b9    \u672b\u5c3e    \u6247\u533a \u5927\u5c0f Id \u7c7b\u578b<br \/>\n\/dev\/nvme0n2p1         2048 2099199 2097152   1G 83 Linux<br \/>\n\/dev\/nvme0n2p2      2099200 4196351 2097152   1G  5 \u6269\u5c55<\/p>\n<p>\u521b\u5efa\u903b\u8f91\u5206\u533a<\/p>\n<p>\u547d\u4ee4(\u8f93\u5165 m \u83b7\u53d6\u5e2e\u52a9)&#xff1a;n<br \/>\n\u5206\u533a\u7c7b\u578b<br \/>\n   p   \u4e3b\u5206\u533a (1 primary, 1 extended, 2 free)<br \/>\n   l   \u903b\u8f91\u5206\u533a (\u4ece 5 \u5f00\u59cb\u7f16\u53f7)<br \/>\n\u9009\u62e9 (\u9ed8\u8ba4 p)&#xff1a;l<\/p>\n<p>\u6dfb\u52a0\u903b\u8f91\u5206\u533a 5<br \/>\n\u7b2c\u4e00\u4e2a\u6247\u533a (2101248-4196351, \u9ed8\u8ba4 2101248):<br \/>\n\u6700\u540e\u4e00\u4e2a\u6247\u533a&#xff0c;&#043;\/-sectors \u6216 &#043;size{K,M,G,T,P} (2101248-4196351, \u9ed8\u8ba4 4196351): &#043;500M<\/p>\n<p>\u521b\u5efa\u4e86\u4e00\u4e2a\u65b0\u5206\u533a 5&#xff0c;\u7c7b\u578b\u4e3a\u201cLinux\u201d&#xff0c;\u5927\u5c0f\u4e3a 500 MiB\u3002<\/p>\n<p>\u547d\u4ee4(\u8f93\u5165 m \u83b7\u53d6\u5e2e\u52a9)&#xff1a;p<br \/>\nDisk \/dev\/nvme0n2&#xff1a;6 GiB&#xff0c;6442450944 \u5b57\u8282&#xff0c;12582912 \u4e2a\u6247\u533a<br \/>\n\u78c1\u76d8\u578b\u53f7&#xff1a;VMware Virtual NVMe Disk<br \/>\n\u5355\u5143&#xff1a;\u6247\u533a \/ 1 * 512 &#061; 512 \u5b57\u8282<br \/>\n\u6247\u533a\u5927\u5c0f(\u903b\u8f91\/\u7269\u7406)&#xff1a;512 \u5b57\u8282 \/ 512 \u5b57\u8282<br \/>\nI\/O \u5927\u5c0f(\u6700\u5c0f\/\u6700\u4f73)&#xff1a;512 \u5b57\u8282 \/ 512 \u5b57\u8282<br \/>\n\u78c1\u76d8\u6807\u7b7e\u7c7b\u578b&#xff1a;dos<br \/>\n\u78c1\u76d8\u6807\u8bc6\u7b26&#xff1a;0x7aba06fd<\/p>\n<p>\u8bbe\u5907           \u542f\u52a8    \u8d77\u70b9    \u672b\u5c3e    \u6247\u533a  \u5927\u5c0f Id \u7c7b\u578b<br \/>\n\/dev\/nvme0n2p1         2048 2099199 2097152    1G 83 Linux<br \/>\n\/dev\/nvme0n2p2      2099200 4196351 2097152    1G  5 \u6269\u5c55<br \/>\n\/dev\/nvme0n2p5      2101248 3125247 1024000  500M 83 Linux<\/p>\n<p>\u547d\u4ee4(\u8f93\u5165 m \u83b7\u53d6\u5e2e\u52a9)&#xff1a;n<br \/>\n\u5206\u533a\u7c7b\u578b<br \/>\n   p   \u4e3b\u5206\u533a (1 primary, 1 extended, 2 free)<br \/>\n   l   \u903b\u8f91\u5206\u533a (\u4ece 5 \u5f00\u59cb\u7f16\u53f7)<br \/>\n\u9009\u62e9 (\u9ed8\u8ba4 p)&#xff1a;l<\/p>\n<p>\u6dfb\u52a0\u903b\u8f91\u5206\u533a 6<br \/>\n\u7b2c\u4e00\u4e2a\u6247\u533a (3127296-4196351, \u9ed8\u8ba4 3127296):<br \/>\n\u6700\u540e\u4e00\u4e2a\u6247\u533a&#xff0c;&#043;\/-sectors \u6216 &#043;size{K,M,G,T,P} (3127296-4196351, \u9ed8\u8ba4 4196351): <\/p>\n<p>\u521b\u5efa\u4e86\u4e00\u4e2a\u65b0\u5206\u533a 6&#xff0c;\u7c7b\u578b\u4e3a\u201cLinux\u201d&#xff0c;\u5927\u5c0f\u4e3a 522 MiB\u3002<\/p>\n<p>\u547d\u4ee4(\u8f93\u5165 m \u83b7\u53d6\u5e2e\u52a9)&#xff1a;p<br \/>\nDisk \/dev\/nvme0n2&#xff1a;6 GiB&#xff0c;6442450944 \u5b57\u8282&#xff0c;12582912 \u4e2a\u6247\u533a<br \/>\n\u78c1\u76d8\u578b\u53f7&#xff1a;VMware Virtual NVMe Disk<br \/>\n\u5355\u5143&#xff1a;\u6247\u533a \/ 1 * 512 &#061; 512 \u5b57\u8282<br \/>\n\u6247\u533a\u5927\u5c0f(\u903b\u8f91\/\u7269\u7406)&#xff1a;512 \u5b57\u8282 \/ 512 \u5b57\u8282<br \/>\nI\/O \u5927\u5c0f(\u6700\u5c0f\/\u6700\u4f73)&#xff1a;512 \u5b57\u8282 \/ 512 \u5b57\u8282<br \/>\n\u78c1\u76d8\u6807\u7b7e\u7c7b\u578b&#xff1a;dos<br \/>\n\u78c1\u76d8\u6807\u8bc6\u7b26&#xff1a;0x7aba06fd<\/p>\n<p>\u8bbe\u5907           \u542f\u52a8    \u8d77\u70b9    \u672b\u5c3e    \u6247\u533a  \u5927\u5c0f Id \u7c7b\u578b<br \/>\n\/dev\/nvme0n2p1         2048 2099199 2097152    1G 83 Linux<br \/>\n\/dev\/nvme0n2p2      2099200 4196351 2097152    1G  5 \u6269\u5c55<br \/>\n\/dev\/nvme0n2p5      2101248 3125247 1024000  500M 83 Linux<br \/>\n\/dev\/nvme0n2p6      3127296 4196351 1069056  522M 83 Linux<\/p>\n<p>2.2\u3001parted\u547d\u4ee4<\/p>\n<p>\u64cd\u4f5c\u6848\u4f8b&#xff1a;<\/p>\n<p>(parted) mklabel gpt<\/p>\n<p>#\u5b9a\u4e49\u5206\u533a\u8868\u683c\u5f0f&#xff08;\u4ec5\u521b\u5efa\u7b2c\u4e00\u4e2a\u5206\u533a\u65f6\u9700\u8981\u8bbe\u7f6e&#xff0c;\u5176\u4ed6\u7684\u4e0d\u9700\u8981&#xff09;<\/p>\n<p>(parted) mkpart p1<\/p>\n<p>#\u521b\u5efa\u7b2c\u4e00\u4e2a\u5206\u533a&#xff0c;\u540d\u79f0\u4e3ap1<\/p>\n<p>[root&#064;localhost ~]# parted \/dev\/nvme0n2<br \/>\nGNU Parted 3.5<br \/>\n\u4f7f\u7528 \/dev\/nvme0n2<br \/>\n\u6b22\u8fce\u4f7f\u7528 GNU Parted&#xff01;\u8f93\u5165 &#039;help&#039; \u6765\u67e5\u770b\u547d\u4ee4\u5217\u8868\u3002<br \/>\n(parted) mklabel<br \/>\n\u65b0\u7684\u78c1\u76d8\u5377\u6807\u7c7b\u578b&#xff1f; gpt<br \/>\n\u8b66\u544a: \u73b0\u6709 \/dev\/nvme0n2 \u4e0a\u7684\u78c1\u76d8\u5377\u6807\u5c06\u88ab\u9500\u6bc1&#xff0c;\u800c\u6240\u6709\u5728\u8fd9\u4e2a\u78c1\u76d8\u4e0a\u7684\u6570\u636e\u5c06\u4f1a\u4e22\u5931\u3002\u60a8\u8981\u7ee7\u7eed\u5417&#xff1f;<br \/>\n\u662f\/Yes\/\u5426\/No? yes<br \/>\n(parted) mkpart p1<br \/>\n\u6587\u4ef6\u7cfb\u7edf\u7c7b\u578b&#xff1f;  [ext2]? xfs<br \/>\n\u8d77\u59cb\u70b9&#xff1f; 1<br \/>\n\u7ed3\u675f\u70b9&#xff1f; 2G<br \/>\n(parted) p<br \/>\n\u578b\u53f7&#xff1a;VMware Virtual NVMe Disk (nvme)<br \/>\n\u78c1\u76d8 \/dev\/nvme0n2&#xff1a;6442MB<br \/>\n\u6247\u533a\u5927\u5c0f (\u903b\u8f91\/\u7269\u7406)&#xff1a;512B\/512B<br \/>\n\u5206\u533a\u8868&#xff1a;gpt<br \/>\n\u78c1\u76d8\u6807\u5fd7&#xff1a;<\/p>\n<p>\u7f16\u53f7  \u8d77\u59cb\u70b9  \u7ed3\u675f\u70b9  \u5927\u5c0f    \u6587\u4ef6\u7cfb\u7edf  \u540d\u79f0  \u6807\u5fd7<br \/>\n 1    1049kB  2000MB  1999MB  xfs       p1<\/p>\n<p>(parted)  mklabel gpt<br \/>\n\u8b66\u544a: \u73b0\u6709 \/dev\/nvme0n2 \u4e0a\u7684\u78c1\u76d8\u5377\u6807\u5c06\u88ab\u9500\u6bc1&#xff0c;\u800c\u6240\u6709\u5728\u8fd9\u4e2a\u78c1\u76d8\u4e0a\u7684\u6570\u636e\u5c06\u4f1a\u4e22\u5931\u3002\u60a8\u8981\u7ee7\u7eed\u5417&#xff1f;<br \/>\n\u662f\/Yes\/\u5426\/No? no<br \/>\n(parted) mkpart p2<br \/>\n\u6587\u4ef6\u7cfb\u7edf\u7c7b\u578b&#xff1f;  [ext2]? ext4<br \/>\n\u8d77\u59cb\u70b9&#xff1f; 2001M<br \/>\n\u7ed3\u675f\u70b9&#xff1f; 6G<br \/>\n(parted) p<br \/>\n\u578b\u53f7&#xff1a;VMware Virtual NVMe Disk (nvme)<br \/>\n\u78c1\u76d8 \/dev\/nvme0n2&#xff1a;6442MB<br \/>\n\u6247\u533a\u5927\u5c0f (\u903b\u8f91\/\u7269\u7406)&#xff1a;512B\/512B<br \/>\n\u5206\u533a\u8868&#xff1a;gpt<br \/>\n\u78c1\u76d8\u6807\u5fd7&#xff1a;<\/p>\n<p>\u7f16\u53f7  \u8d77\u59cb\u70b9  \u7ed3\u675f\u70b9  \u5927\u5c0f    \u6587\u4ef6\u7cfb\u7edf  \u540d\u79f0  \u6807\u5fd7<br \/>\n 1    1049kB  2000MB  1999MB  xfs       p1<br \/>\n 2    2001MB  6441MB  4441MB  ext4      p2<\/p>\n<p>(parted) quit<br \/>\n\u4fe1\u606f: \u4f60\u53ef\u80fd\u9700\u8981 \/etc\/fstab\u3002<\/p>\n<p>[root&#064;localhost ~]# lsblk<br \/>\nNAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS<br \/>\nsr0          11:0    1  1024M  0 rom<br \/>\nnvme0n1     259:0    0   200G  0 disk<br \/>\n\u251c\u2500nvme0n1p1 259:1    0     1G  0 part \/boot<br \/>\n\u2514\u2500nvme0n1p2 259:2    0   199G  0 part<br \/>\n  \u251c\u2500rl-root 253:0    0    70G  0 lvm  \/<br \/>\n  \u251c\u2500rl-swap 253:1    0   3.9G  0 lvm  [SWAP]<br \/>\n  \u2514\u2500rl-home 253:2    0 125.1G  0 lvm  \/home<br \/>\nnvme0n2     259:3    0     6G  0 disk<br \/>\n\u251c\u2500nvme0n2p1 259:6    0   1.9G  0 part<br \/>\n\u2514\u2500nvme0n2p2 259:7    0   4.1G  0 part <\/p>\n<h4 id=\"3%E3%80%81%E6%A0%BC%E5%BC%8F%E5%8C%96%E5%91%BD%E4%BB%A4\">3\u3001\u683c\u5f0f\u5316\u547d\u4ee4<\/h4>\n<p>mkfs\u547d\u4ee4\u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u7528\u4e8e\u683c\u5f0f\u5316\u78c1\u76d8\u5206\u533a&#xff0c;\u751f\u6210\u6307\u5b9a\u7684\u6587\u4ef6\u7cfb\u7edf\u3002\u683c\u5f0f\u5316\u540e\u5206\u533a\u4e2d\u7684\u6570\u636e\u5c06\u4e22\u5931&#xff01;<\/p>\n<p>-t\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u6587\u4ef6\u7cfb\u7edf\u7c7b\u578b<\/p>\n<p>\u64cd\u4f5c\u6848\u4f8b&#xff1a;<\/p>\n<p>\u666e\u901a\u6587\u4ef6\u7cfb\u7edf\u683c\u5f0f\u5316<\/p>\n<p>#\u683c\u5f0f\u5316\u4e3axfs\u6587\u4ef6\u7cfb\u7edf<\/p>\n<p>[root&#064;localhost ~]# mkfs -t xfs \/dev\/nvme0n2p1<br \/>\nmeta-data&#061;\/dev\/nvme0n2p1         isize&#061;512    agcount&#061;4, agsize&#061;65536 blks<br \/>\n         &#061;                       sectsz&#061;512   attr&#061;2, projid32bit&#061;1<br \/>\n         &#061;                       crc&#061;1        finobt&#061;1, sparse&#061;1, rmapbt&#061;0<br \/>\n         &#061;                       reflink&#061;1    bigtime&#061;1 inobtcount&#061;1 nrext64&#061;0<br \/>\ndata     &#061;                       bsize&#061;4096   blocks&#061;262144, imaxpct&#061;25<br \/>\n         &#061;                       sunit&#061;0      swidth&#061;0 blks<br \/>\nnaming   &#061;version 2              bsize&#061;4096   ascii-ci&#061;0, ftype&#061;1<br \/>\nlog      &#061;internal log           bsize&#061;4096   blocks&#061;16384, version&#061;2<br \/>\n         &#061;                       sectsz&#061;512   sunit&#061;0 blks, lazy-count&#061;1<br \/>\nrealtime &#061;none                   extsz&#061;4096   blocks&#061;0, rtextents&#061;0 <\/p>\n<p>#\u683c\u5f0f\u5316\u4e3aext4\u6587\u4ef6\u7cfb\u7edf<\/p>\n<p>[root&#064;localhost ~]# mkfs -t ext4 \/dev\/nvme0n2p5<br \/>\n\u521b\u5efa\u542b\u6709 512000 \u4e2a\u5757&#xff08;\u6bcf\u5757 1k&#xff09;\u548c 128016 \u4e2ainode\u7684\u6587\u4ef6\u7cfb\u7edf<br \/>\n\u6587\u4ef6\u7cfb\u7edfUUID&#xff1a;af72a9ce-f13d-4df5-98c3-79350601b6f8<br \/>\n\u8d85\u7ea7\u5757\u7684\u5907\u4efd\u5b58\u50a8\u4e8e\u4e0b\u5217\u5757&#xff1a;<br \/>\n        8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409<\/p>\n<p>\u6b63\u5728\u5206\u914d\u7ec4\u8868&#xff1a; \u5b8c\u6210<br \/>\n\u6b63\u5728\u5199\u5165inode\u8868&#xff1a; \u5b8c\u6210<br \/>\n\u521b\u5efa\u65e5\u5fd7&#xff08;8192 \u4e2a\u5757&#xff09;\u5b8c\u6210<br \/>\n\u5199\u5165\u8d85\u7ea7\u5757\u548c\u6587\u4ef6\u7cfb\u7edf\u8d26\u6237\u7edf\u8ba1\u4fe1\u606f&#xff1a; \u5df2\u5b8c\u6210 <\/p>\n<p>swap\u6587\u4ef6\u7cfb\u7edf\u683c\u5f0f\u5316<\/p>\n<p>[root&#064;localhost ~]# free -m<br \/>\n               total        used        free      shared  buff\/cache   available<br \/>\nMem:            3627         974        2352          15         540        2652<br \/>\nSwap:           4011           0        4011<br \/>\n[root&#064;localhost ~]# fdisk \/dev\/nvme0n2<\/p>\n<p>\u6b22\u8fce\u4f7f\u7528 fdisk (util-linux 2.37.4)\u3002<br \/>\n\u66f4\u6539\u5c06\u505c\u7559\u5728\u5185\u5b58\u4e2d&#xff0c;\u76f4\u5230\u60a8\u51b3\u5b9a\u5c06\u66f4\u6539\u5199\u5165\u78c1\u76d8\u3002<br \/>\n\u4f7f\u7528\u5199\u5165\u547d\u4ee4\u524d\u8bf7\u4e09\u601d\u3002<\/p>\n<p>This disk is currently in use &#8211; repartitioning is probably a bad idea.<br \/>\nIt&#039;s recommended to umount all file systems, and swapoff all swap<br \/>\npartitions on this disk.<\/p>\n<p>\u547d\u4ee4(\u8f93\u5165 m \u83b7\u53d6\u5e2e\u52a9)&#xff1a;p<\/p>\n<p>Disk \/dev\/nvme0n2&#xff1a;6 GiB&#xff0c;6442450944 \u5b57\u8282&#xff0c;12582912 \u4e2a\u6247\u533a<br \/>\n\u78c1\u76d8\u578b\u53f7&#xff1a;VMware Virtual NVMe Disk<br \/>\n\u5355\u5143&#xff1a;\u6247\u533a \/ 1 * 512 &#061; 512 \u5b57\u8282<br \/>\n\u6247\u533a\u5927\u5c0f(\u903b\u8f91\/\u7269\u7406)&#xff1a;512 \u5b57\u8282 \/ 512 \u5b57\u8282<br \/>\nI\/O \u5927\u5c0f(\u6700\u5c0f\/\u6700\u4f73)&#xff1a;512 \u5b57\u8282 \/ 512 \u5b57\u8282<br \/>\n\u78c1\u76d8\u6807\u7b7e\u7c7b\u578b&#xff1a;dos<br \/>\n\u78c1\u76d8\u6807\u8bc6\u7b26&#xff1a;0x7aba06fd<\/p>\n<p>\u8bbe\u5907           \u542f\u52a8    \u8d77\u70b9    \u672b\u5c3e    \u6247\u533a \u5927\u5c0f Id \u7c7b\u578b<br \/>\n\/dev\/nvme0n2p1         2048 2099199 2097152   1G 83 Linux<br \/>\n\/dev\/nvme0n2p2      2099200 4196351 2097152   1G 83 Linux<\/p>\n<p>\u547d\u4ee4(\u8f93\u5165 m \u83b7\u53d6\u5e2e\u52a9)&#xff1a;w<br \/>\n\u5206\u533a\u8868\u5df2\u8c03\u6574\u3002<br \/>\n\u6b63\u5728\u540c\u6b65\u78c1\u76d8\u3002<\/p>\n<p>[root&#064;localhost ~]# lsblk<br \/>\nNAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS<br \/>\nsr0          11:0    1  1024M  0 rom<br \/>\nnvme0n1     259:0    0   200G  0 disk<br \/>\n\u251c\u2500nvme0n1p1 259:1    0     1G  0 part \/boot<br \/>\n\u2514\u2500nvme0n1p2 259:2    0   199G  0 part<br \/>\n  \u251c\u2500rl-root 253:0    0    70G  0 lvm  \/<br \/>\n  \u251c\u2500rl-swap 253:1    0   3.9G  0 lvm  [SWAP]<br \/>\n  \u2514\u2500rl-home 253:2    0 125.1G  0 lvm  \/home<br \/>\nnvme0n2     259:3    0     6G  0 disk<br \/>\n\u251c\u2500nvme0n2p1 259:4    0     1G  0 part \/nvme0n2p1<br \/>\n\u2514\u2500nvme0n2p2 259:5    0     1G  0 part<br \/>\n[root&#064;localhost ~]# df -Th<br \/>\n\u6587\u4ef6\u7cfb\u7edf            \u7c7b\u578b      \u5bb9\u91cf  \u5df2\u7528  \u53ef\u7528 \u5df2\u7528% \u6302\u8f7d\u70b9<br \/>\ndevtmpfs            devtmpfs  4.0M     0  4.0M    0% \/dev<br \/>\ntmpfs               tmpfs     1.8G     0  1.8G    0% \/dev\/shm<br \/>\ntmpfs               tmpfs     726M  9.6M  716M    2% \/run<br \/>\n\/dev\/mapper\/rl-root xfs        70G  6.9G   64G   10% \/<br \/>\n\/dev\/nvme0n1p1      xfs       960M  304M  657M   32% \/boot<br \/>\n\/dev\/mapper\/rl-home xfs       126G  926M  125G    1% \/home<br \/>\ntmpfs               tmpfs     363M   52K  363M    1% \/run\/user\/42<br \/>\ntmpfs               tmpfs     363M   36K  363M    1% \/run\/user\/0<br \/>\n\/dev\/nvme0n2p1      xfs       960M   39M  922M    5% \/nvme0n2p1<br \/>\n[root&#064;localhost ~]# mkswap \/dev\/nvme0n2p2<br \/>\nmkswap: \/dev\/nvme0n2p2&#xff1a;\u8b66\u544a&#xff0c;\u5c06\u64e6\u9664\u65e7\u7684 swap \u7b7e\u540d\u3002<br \/>\n\u6b63\u5728\u8bbe\u7f6e\u4ea4\u6362\u7a7a\u95f4\u7248\u672c 1&#xff0c;\u5927\u5c0f &#061; 1024 MiB (1073737728  \u4e2a\u5b57\u8282)<br \/>\n\u65e0\u6807\u7b7e&#xff0c;UUID&#061;58ff215b-19eb-48e5-9f4c-b2e099075f43<br \/>\n[root&#064;localhost ~]# swapon \/dev\/nvme0n2p2<br \/>\n[root&#064;localhost ~]# free -m<br \/>\n               total        used        free      shared  buff\/cache   available<br \/>\nMem:            3627         978        2350          15         540        2649<br \/>\nSwap:           5035           0        5035 <\/p>\n<h4 id=\"4%E3%80%81%E6%8C%82%E8%BD%BD%E5%91%BD%E4%BB%A4\">4\u3001\u6302\u8f7d\u547d\u4ee4<\/h4>\n<p>\u6302\u8f7d\u6e90&#xff1a; \u78c1\u76d8\u5206\u533a\u6216\u8005\u6587\u4ef6\u7cfb\u7edf<\/p>\n<p>\u6302\u8f7d\u70b9&#xff1a; \u6587\u4ef6\u7cfb\u7edf\u8bbf\u95ee\u7684\u5165\u53e3&#xff0c;\u901a\u5e38\u662f\u76ee\u5f55\u3002<\/p>\n<p>4.1\u3001mount\u547d\u4ee4&amp;swapon\u547d\u4ee4<\/p>\n<p>mount &#8211; mount a filesystem&#xff0c;\u6302\u8f7d\u4e00\u4e2a\u6587\u4ef6\u7cfb\u7edf&#xff1b;\u4e34\u65f6\u6302\u8f7d&#xff0c;\u91cd\u542f\u5931\u6548&#xff01;<\/p>\n<p>swapon&#xff1a;\u6302\u8f7dswap\u6587\u4ef6\u7cfb\u7edf<\/p>\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\" style=\"width:900px\">\n<tbody>\n<tr>\n<td style=\"width:107px\">\u9009\u9879<\/td>\n<td style=\"width:742px\">\u4f5c\u7528<\/td>\n<\/tr>\n<tr>\n<td style=\"width:107px\">-t<\/td>\n<td style=\"width:742px\">\u6307\u5b9a\u8981\u6302\u8f7d\u7684\u6587\u4ef6\u7cfb\u7edf\u7c7b\u578b<\/td>\n<\/tr>\n<tr>\n<td style=\"width:107px\">-o<\/td>\n<td style=\"width:742px\">\u6307\u5b9a\u6302\u8f7d\u9009\u9879&#xff0c;\u6bd4\u5982\u53ef\u4ee5\u6307\u5b9a\u53ea\u8bfb\u6302\u8f7d&#xff08;ro&#xff09;\u3001\u5141\u8bb8\u6240\u6709\u7528\u6237\u6302\u8f7d&#xff08;user&#xff09;\u3001\u5141\u8bb8\u6267\u884c\u7a0b\u5e8f\u6302\u8f7d&#xff08;exec&#xff09;\u7b49\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"width:107px\">-o remount<\/td>\n<td style=\"width:742px\">\u91cd\u65b0\u6302\u8f7d\u4e00\u4e2a\u5df2\u7ecf\u6302\u8f7d\u7684\u6587\u4ef6\u7cfb\u7edf&#xff0c;\u53ef\u4ee5\u6539\u53d8\u6302\u8f7d\u9009\u9879<\/td>\n<\/tr>\n<tr>\n<td style=\"width:107px\">\n<p>-a<\/p>\n<\/td>\n<td style=\"width:742px\">\n<p>\u6302\u8f7d\/etc\/fstab\u6587\u4ef6\u4e2d\u5b9a\u4e49\u7684\u6240\u6709\u6587\u4ef6\u7cfb\u7edf\u3002<\/p>\n<p>\u6d4b\u8bd5fstab\u4e2d\u6587\u4ef6\u7cfb\u7edf\u662f\u5426\u8fdb\u884c\u6b63\u5e38\u6302\u8f7d<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u64cd\u4f5c\u6848\u4f8b&#xff1a;<\/p>\n<p>\u666e\u901a\u6587\u4ef6\u6302\u8f7d<\/p>\n<p>[root&#064;localhost ~]# df -Th<br \/>\n\u6587\u4ef6\u7cfb\u7edf            \u7c7b\u578b      \u5bb9\u91cf  \u5df2\u7528  \u53ef\u7528 \u5df2\u7528% \u6302\u8f7d\u70b9<br \/>\ndevtmpfs            devtmpfs  4.0M     0  4.0M    0% \/dev<br \/>\ntmpfs               tmpfs     1.8G     0  1.8G    0% \/dev\/shm<br \/>\ntmpfs               tmpfs     726M  9.6M  716M    2% \/run<br \/>\n\/dev\/mapper\/rl-root xfs        70G  6.9G   64G   10% \/<br \/>\n\/dev\/nvme0n1p1      xfs       960M  304M  657M   32% \/boot<br \/>\n\/dev\/mapper\/rl-home xfs       126G  926M  125G    1% \/home<br \/>\ntmpfs               tmpfs     363M   52K  363M    1% \/run\/user\/42<br \/>\ntmpfs               tmpfs     363M   36K  363M    1% \/run\/user\/0<br \/>\n\/dev\/nvme0n2p1      xfs       960M   39M  922M    5% \/nvme0n2p1<br \/>\n\/dev\/nvme0n2p5      ext4      459M   14K  430M    1% \/nvme0n2p5 <\/p>\n<p>\u6c38\u4e45\u6302\u8f7d\u6587\u4ef6\u7cfb\u7edf&#xff1a;\u5199\u5165\/etc\/fstab<\/p>\n<p>[root&#064;localhost ~]# vim \/etc\/fstab<br \/>\n\/dev\/mapper\/rl-root     \/                       xfs     defaults        0 0<br \/>\nUUID&#061;64ebe7f9-ce12-4724-95e1-d813de58f77f \/boot                   xfs     defaults        0 0<br \/>\n\/dev\/mapper\/rl-home     \/home                   xfs     defaults        0 0<br \/>\n\/dev\/mapper\/rl-swap     none                    swap    defaults        0 0<br \/>\n\/dev\/nvme0n2p5   \/mnt   xfs  defaults  0 0<\/p>\n<p>[root&#064;localhost ~]# df -Th<br \/>\n\u6587\u4ef6\u7cfb\u7edf            \u7c7b\u578b      \u5bb9\u91cf  \u5df2\u7528  \u53ef\u7528 \u5df2\u7528% \u6302\u8f7d\u70b9<br \/>\ndevtmpfs            devtmpfs  4.0M     0  4.0M    0% \/dev<br \/>\ntmpfs               tmpfs     1.8G     0  1.8G    0% \/dev\/shm<br \/>\ntmpfs               tmpfs     726M  9.6M  716M    2% \/run<br \/>\n\/dev\/mapper\/rl-root xfs        70G  6.9G   64G   10% \/<br \/>\n\/dev\/nvme0n1p1      xfs       960M  304M  657M   32% \/boot<br \/>\n\/dev\/mapper\/rl-home xfs       126G  926M  125G    1% \/home<br \/>\ntmpfs               tmpfs     363M   52K  363M    1% \/run\/user\/42<br \/>\ntmpfs               tmpfs     363M   36K  363M    1% \/run\/user\/0<br \/>\n\/dev\/nvme0n2p1      xfs       960M   39M  922M    5% \/nvme0n2p1<br \/>\n\/dev\/nvme0n2p5      xfs       435M   29M  407M    7% \/mnt <\/p>\n<p>swap\u6587\u4ef6\u7cfb\u7edf\u6302\u8f7d<\/p>\n<p>[root&#064;localhost ~]# mkswap \/dev\/nvme0n2p2<br \/>\nmkswap: \/dev\/nvme0n2p2&#xff1a;\u8b66\u544a&#xff0c;\u5c06\u64e6\u9664\u65e7\u7684 swap \u7b7e\u540d\u3002<br \/>\n\u6b63\u5728\u8bbe\u7f6e\u4ea4\u6362\u7a7a\u95f4\u7248\u672c 1&#xff0c;\u5927\u5c0f &#061; 1024 MiB (1073737728  \u4e2a\u5b57\u8282)<br \/>\n\u65e0\u6807\u7b7e&#xff0c;UUID&#061;58ff215b-19eb-48e5-9f4c-b2e099075f43<br \/>\n[root&#064;localhost ~]# swapon \/dev\/nvme0n2p2<br \/>\n[root&#064;localhost ~]# free -m<br \/>\n               total        used        free      shared  buff\/cache   available<br \/>\nMem:            3627         978        2350          15         540        2649<br \/>\nSwap:           5035           0        5035 <\/p>\n<p>4.2\u3001umount\u547d\u4ee4&amp;swapoff\u547d\u4ee4<\/p>\n<p>umount &#8211; \u5378\u8f7d\u6587\u4ef6\u7cfb\u7edf<\/p>\n<p>swapoff-\u5378\u8f7dswap\u6587\u4ef6\u7cfb\u7edf<\/p>\n<p>\u64cd\u4f5c\u6848\u4f8b&#xff1a;<\/p>\n<p>\u5378\u8f7d\u666e\u901a\u6587\u4ef6\u7cfb\u7edf<\/p>\n<p>[root&#064;localhost ~]# umount \/dev\/nvme0n2p5<br \/>\n[root&#064;localhost ~]# umount \/nvme0n2p6<br \/>\n[root&#064;localhost ~]# df -Th<br \/>\n\u6587\u4ef6\u7cfb\u7edf            \u7c7b\u578b      \u5bb9\u91cf  \u5df2\u7528  \u53ef\u7528 \u5df2\u7528% \u6302\u8f7d\u70b9<br \/>\ndevtmpfs            devtmpfs  4.0M     0  4.0M    0% \/dev<br \/>\ntmpfs               tmpfs     1.8G     0  1.8G    0% \/dev\/shm<br \/>\ntmpfs               tmpfs     726M  9.6M  716M    2% \/run<br \/>\n\/dev\/mapper\/rl-root xfs        70G  6.9G   64G   10% \/<br \/>\n\/dev\/nvme0n1p1      xfs       960M  304M  657M   32% \/boot<br \/>\n\/dev\/mapper\/rl-home xfs       126G  926M  125G    1% \/home<br \/>\ntmpfs               tmpfs     363M   52K  363M    1% \/run\/user\/42<br \/>\ntmpfs               tmpfs     363M   36K  363M    1% \/run\/user\/0<br \/>\n\/dev\/nvme0n2p1      xfs       960M   39M  922M    5% \/nvme0n2p1 <\/p>\n<p>swap\u6587\u4ef6\u7cfb\u7edf\u5378\u8f7d<\/p>\n<p>[root&#064;localhost ~]# swapoff \/dev\/nvme0n2p2<br \/>\n[root&#064;localhost ~]# free -m<br \/>\n               total        used        free      shared  buff\/cache   available<br \/>\nMem:            3627         980        2342          15         546        2647<br \/>\nSwap:           4011           0        4011 <\/p>\n<h3 id=\"%E5%9B%9B%E3%80%81LVM%E9%80%BB%E8%BE%91%E5%8D%B7\">\u56db\u3001LVM\u903b\u8f91\u5377<\/h3>\n<h4 id=\"1%E3%80%81%E6%A6%82%E8%BF%B0\">1\u3001\u6982\u8ff0<\/h4>\n<p>LVM \u662f Logical Volume Manager&#xff08;\u903b\u8f91\u5377\u7ba1\u7406&#xff09;\u7684\u7b80\u5199&#xff0c;\u5b83\u662f Linux \u73af\u5883\u4e0b\u5bf9\u78c1\u76d8\u5206\u533a\u8fdb\u884c\u7ba1\u7406\u7684\u2f00\u79cd\u673a\u5236; \u5b89\u88c5 Linux \u64cd\u4f5c\u7cfb\u7edf\u65f6\u9047\u5230\u7684\u2f00\u4e2a\u5e38\u89c1\u7684\u96be\u4ee5\u51b3\u5b9a\u7684\u95ee\u9898\u5c31\u662f\u5982\u4f55\u6b63\u786e\u5730\u8bc4\u4f30\u5404\u5206\u533a\u5927\u5c0f&#xff0c;\u4ee5\u5206\u914d\u5408\u9002\u7684\u786c\u76d8\u7a7a \u95f4; \u666e\u901a\u7684\u78c1\u76d8\u5206\u533a\u7ba1\u7406\u65b9\u5f0f\u5728\u903b\u8f91\u5206\u533a\u5212\u5206\u597d\u4e4b\u540e\u5c31\u65e0\u6cd5\u6539\u53d8\u5176\u5927\u5c0f; \u968f\u7740 Linux \u7684\u903b\u8f91\u5377\u7ba1\u7406\u529f\u80fd\u7684\u51fa\u73b0&#xff0c;\u8fd9\u4e9b\u95ee\u9898\u90fd\u8fce\u5203\u800c\u89e3&#xff0c;\u7528\u6237\u5728\u65e0\u9700\u505c\u673a\u7684\u60c5\u51b5\u4e0b\u53ef\u4ee5\u65b9\u4fbf\u5730\u8c03\u6574\u5404\u4e2a\u5206\u533a\u5927\u5c0f&#xff0c;\u5373\u52a8\u6001\u8c03\u6574\u78c1\u76d8\u5bb9\u91cf&#xff0c;\u4ece\u800c\u63d0\u9ad8\u78c1\u76d8\u7ba1\u7406\u7684\u7075\u6d3b\u6027\u3002<\/p>\n<p>1.1\u3001LVM\u6982\u5ff5<\/p>\n<ul>\n<li>\n<p>PV(Physical Volume)&#xff1a;\u7269\u7406\u5377<\/p>\n<p>\u5904\u4e8e LVM \u6700\u5e95\u5c42&#xff0c;\u53ef\u4ee5\u662f\u7269\u7406\u786c\u76d8\u6216\u8005\u5206\u533a&#xff0c;\u6574\u4e2a\u786c\u76d8&#xff0c;\u6216\u4f7f\u7528fdisk \u7b49\u2f2f\u5177\u5efa\u2f74\u7684\u666e\u901a\u5206\u533a&#xff0c;\u5305\u8bb8\u591a\u9ed8\u8ba4 4MB \u5927\u5c0f\u7684 PE&#xff08;Physical Extent&#xff0c;\u57fa\u672c\u5355\u5143&#xff09;\u3002<\/p>\n<\/li>\n<li>\n<p>PE(Physical Extend)&#xff1a;\u7269\u7406\u533a\u57df<\/p>\n<p>PV \u4e2d\u53ef\u4ee5\u7528\u4e8e\u5206\u914d\u7684\u6700\u5c0f\u5b58\u50a8\u5355\u5143&#xff0c;\u53ef\u4ee5\u5728\u521b\u5efa PV \u7684\u65f6\u5019\u5236\u5b9a&#xff08;\u9ed8\u8ba4\u4e3a 4MB&#xff09;&#xff0c;\u5982 1M, 2M, 4M, 8M, 32M, 64M\u2026 \u7ec4\u6210\u540c\u2f00VG \u4e2d\u6240\u6709 PV \u7684 PE\u5927\u5c0f\u5e94\u8be5\u76f8\u540c\u3002<\/p>\n<\/li>\n<li>\n<p>VG(Volume Group)&#xff1a;\u5377\u7ec4<\/p>\n<p>\u5efa\u7acb\u5728 PV \u4e4b\u4e0a&#xff0c;\u53ef\u4ee5\u542b\u6709\u4e00\u4e2a\u5230\u591a\u4e2a PV&#xff0c;\u4e00\u4e2a\u6216\u591a\u4e2a\u7269\u7406\u5377\u7ec4\u5408\u800c\u6210\u7684\u6574\u4f53\u3002<\/p>\n<\/li>\n<li>\n<p>LV(Logical Volume)&#xff1a;\u903b\u8f91\u5377<\/p>\n<p>\u5efa\u7acb\u5728 VG \u4e4b\u4e0a&#xff0c;\u76f8\u5f53\u4e8e\u539f\u6765\u5206\u533a\u7684\u6982\u5ff5&#xff0c;\u4e0d\u8fc7\u5927\u5c0f\u53ef\u4ee5\u52a8\u6001\u6539\u53d8\u3002\u4ece\u5377\u7ec4\u4e2d\u5206\u5272\u51fa\u7684\u4e00\u5757\u7a7a\u95f4&#xff0c;\u7528\u4e8e\u5efa\u7acb\u6587\u4ef6 \u7cfb\u7edf\u3002<\/p>\n<\/li>\n<\/ul>\n<p>1.3\u3001\u6302\u8f7d\u6d41\u7a0b<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"516\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250814022430-689d48de01802.png\" width=\"933\" \/><\/p>\n<h4 id=\"2%E3%80%81%E7%AE%A1%E7%90%86%E5%91%BD%E4%BB%A4\">2\u3001\u7ba1\u7406\u547d\u4ee4<\/h4>\n<table>\n<tr>\u529f\u80fdPV \u7269\u7406\u5377\u547d\u4ee4VG \u5377\u7ec4\u547d\u4ee4LV \u903b\u8f91\u5377\u547d\u4ee4<\/tr>\n<tbody>\n<tr>\n<td>\u626b\u63cf<\/td>\n<td>pvscan<\/td>\n<td>vgscan<\/td>\n<td>lvscan<\/td>\n<\/tr>\n<tr>\n<td>\u521b\u5efa<\/td>\n<td>pvcreate<\/td>\n<td>vgcreate<\/td>\n<td>lvcreate&#xff08;-n)<\/td>\n<\/tr>\n<tr>\n<td>\u67e5\u8be2<\/td>\n<td>pvdisplay<\/td>\n<td>vgdisplay<\/td>\n<td>lvdisplay<\/td>\n<\/tr>\n<tr>\n<td>\u5220\u9664<\/td>\n<td>pvremove<\/td>\n<td>vgremove<\/td>\n<td>lvremove<\/td>\n<\/tr>\n<tr>\n<td>\u6269\u5bb9<\/td>\n<td>&#8211;<\/td>\n<td>vgextend<\/td>\n<td>lvextend<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4 id=\"3%E3%80%81%E9%85%8D%E7%BD%AE%E6%A1%88%E4%BE%8B\">3\u3001\u914d\u7f6e\u6848\u4f8b<\/h4>\n<p>3.1\u3001\u6784\u5efaLVM\u903b\u8f91\u5377<\/p>\n<p>#\u521b\u5efa\u5206\u533a<\/p>\n<p>[root&#064;localhost ~]# fdisk \/dev\/nvme0n2<\/p>\n<p>\u6b22\u8fce\u4f7f\u7528 fdisk (util-linux 2.37.4)\u3002<br \/>\n\u66f4\u6539\u5c06\u505c\u7559\u5728\u5185\u5b58\u4e2d&#xff0c;\u76f4\u5230\u60a8\u51b3\u5b9a\u5c06\u66f4\u6539\u5199\u5165\u78c1\u76d8\u3002<br \/>\n\u4f7f\u7528\u5199\u5165\u547d\u4ee4\u524d\u8bf7\u4e09\u601d\u3002<\/p>\n<p>\u547d\u4ee4(\u8f93\u5165 m \u83b7\u53d6\u5e2e\u52a9)&#xff1a;n<br \/>\n\u5206\u533a\u53f7 (1-128, \u9ed8\u8ba4  1):<br \/>\n\u7b2c\u4e00\u4e2a\u6247\u533a (34-12582878, \u9ed8\u8ba4 2048):<br \/>\n\u6700\u540e\u4e00\u4e2a\u6247\u533a&#xff0c;&#043;\/-sectors \u6216 &#043;size{K,M,G,T,P} (2048-12582878, \u9ed8\u8ba4 12582878): <\/p>\n<p>\u521b\u5efa\u4e86\u4e00\u4e2a\u65b0\u5206\u533a 1&#xff0c;\u7c7b\u578b\u4e3a\u201cLinux filesystem\u201d&#xff0c;\u5927\u5c0f\u4e3a 6 GiB\u3002<br \/>\n\u5206\u533a #1 \u5305\u542b\u4e00\u4e2a xfs \u7b7e\u540d\u3002<\/p>\n<p>\u60a8\u60f3\u79fb\u9664\u8be5\u7b7e\u540d\u5417&#xff1f;\u662f[Y]\/\u5426[N]&#xff1a;yes<\/p>\n<p>\u5199\u5165\u547d\u4ee4\u5c06\u79fb\u9664\u8be5\u7b7e\u540d\u3002<\/p>\n<p>\u547d\u4ee4(\u8f93\u5165 m \u83b7\u53d6\u5e2e\u52a9)&#xff1a;p<br \/>\nDisk \/dev\/nvme0n2&#xff1a;6 GiB&#xff0c;6442450944 \u5b57\u8282&#xff0c;12582912 \u4e2a\u6247\u533a<br \/>\n\u78c1\u76d8\u578b\u53f7&#xff1a;VMware Virtual NVMe Disk<br \/>\n\u5355\u5143&#xff1a;\u6247\u533a \/ 1 * 512 &#061; 512 \u5b57\u8282<br \/>\n\u6247\u533a\u5927\u5c0f(\u903b\u8f91\/\u7269\u7406)&#xff1a;512 \u5b57\u8282 \/ 512 \u5b57\u8282<br \/>\nI\/O \u5927\u5c0f(\u6700\u5c0f\/\u6700\u4f73)&#xff1a;512 \u5b57\u8282 \/ 512 \u5b57\u8282<br \/>\n\u78c1\u76d8\u6807\u7b7e\u7c7b\u578b&#xff1a;gpt<br \/>\n\u78c1\u76d8\u6807\u8bc6\u7b26&#xff1a;83F2D9B5-0243-4729-BADA-B809C02F7EDB<\/p>\n<p>\u8bbe\u5907            \u8d77\u70b9     \u672b\u5c3e     \u6247\u533a \u5927\u5c0f \u7c7b\u578b<br \/>\n\/dev\/nvme0n2p1  2048 12582878 12580831   6G Linux \u6587\u4ef6\u7cfb\u7edf<\/p>\n<p>1 \u5206\u533a\u4e0a\u7684\u6587\u4ef6\u7cfb\u7edf\/RAID \u7b7e\u540d\u5c06\u88ab\u64e6\u9664\u3002<\/p>\n<p>\u547d\u4ee4(\u8f93\u5165 m \u83b7\u53d6\u5e2e\u52a9)&#xff1a;w<br \/>\n\u5206\u533a\u8868\u5df2\u8c03\u6574\u3002<br \/>\n\u5c06\u8c03\u7528 ioctl() \u6765\u91cd\u65b0\u8bfb\u5206\u533a\u8868\u3002<br \/>\n\u6b63\u5728\u540c\u6b65\u78c1\u76d8\u3002<\/p>\n<p>#\u521b\u5efa\u7269\u7406\u5377<\/p>\n<p>[root&#064;localhost ~]# pvcreate \/dev\/nvme0n2p1<br \/>\n  Physical volume &#034;\/dev\/nvme0n2p1&#034; successfully created.<br \/>\n[root&#064;localhost ~]# pvdisplay<br \/>\n  &#8212; Physical volume &#8212;<br \/>\n  PV Name               \/dev\/nvme0n1p2<br \/>\n  VG Name               rl<br \/>\n  PV Size               &lt;199.00 GiB \/ not usable 3.00 MiB<br \/>\n  Allocatable           yes (but full)<br \/>\n  PE Size               4.00 MiB<br \/>\n  Total PE              50943<br \/>\n  Free PE               0<br \/>\n  Allocated PE          50943<br \/>\n  PV UUID               5EzN2H-pnMG-lEEA-cT0T-KkoY-02vB-zLFnhS<\/p>\n<p>  &#034;\/dev\/nvme0n2p1&#034; is a new physical volume of &#034;&lt;6.00 GiB&#034;<br \/>\n  &#8212; NEW Physical volume &#8212;<br \/>\n  PV Name               \/dev\/nvme0n2p1<br \/>\n  VG Name<br \/>\n  PV Size               &lt;6.00 GiB<br \/>\n  Allocatable           NO<br \/>\n  PE Size               0<br \/>\n  Total PE              0<br \/>\n  Free PE               0<br \/>\n  Allocated PE          0<br \/>\n  PV UUID               xlxkBY-P5Au-EqBE-IKF8-6vD7-Nd2u-NCkFrn<\/p>\n<p>[root&#064;localhost ~]# pvscan<br \/>\n  PV \/dev\/nvme0n1p2   VG rl   lvm2 [&lt;199.00 GiB \/ 0    free]<br \/>\n  PV \/dev\/nvme0n2p1           lvm2 [&lt;6.00 GiB]<br \/>\n  Total: 2 [&lt;205.00 GiB] \/ in use: 1 [&lt;199.00 GiB] \/ in no VG: 1 [&lt;6.00 GiB]<\/p>\n<p>#\u521b\u5efa\u5377\u7ec4<\/p>\n<p>[root&#064;localhost ~]# vgcreate c2508 \/dev\/nvme0n2p1<br \/>\n  Volume group &#034;c2508&#034; successfully created<br \/>\n[root&#064;localhost ~]# vgscan<br \/>\n  Found volume group &#034;c2508&#034; using metadata type lvm2<br \/>\n  Found volume group &#034;rl&#034; using metadata type lvm2 <\/p>\n<p>#\u521b\u5efa\u903b\u8f91\u5377<\/p>\n<p>[root&#064;localhost ~]# lvcreate -n c2508_lv1 c2508  -L &#043;1G<br \/>\n  Logical volume &#034;c2508_lv1&#034; created.<br \/>\n[root&#064;localhost ~]# lvscan<br \/>\n  ACTIVE            &#039;\/dev\/c2508\/c2508_lv1&#039; [1.00 GiB] inherit<br \/>\n  ACTIVE            &#039;\/dev\/rl\/swap&#039; [&lt;3.92 GiB] inherit<br \/>\n  ACTIVE            &#039;\/dev\/rl\/home&#039; [&lt;125.08 GiB] inherit<br \/>\n  ACTIVE            &#039;\/dev\/rl\/root&#039; [70.00 GiB] inherit<\/p>\n<p>#\u683c\u5f0f\u5316\u5e76\u6302\u8f7d<\/p>\n<p>[root&#064;localhost ~]# mkfs.xfs \/dev\/c2508\/c2508_lv1<br \/>\nmeta-data&#061;\/dev\/c2508\/c2508_lv1   isize&#061;512    agcount&#061;4, agsize&#061;65536 blks<br \/>\n         &#061;                       sectsz&#061;512   attr&#061;2, projid32bit&#061;1<br \/>\n         &#061;                       crc&#061;1        finobt&#061;1, sparse&#061;1, rmapbt&#061;0<br \/>\n         &#061;                       reflink&#061;1    bigtime&#061;1 inobtcount&#061;1 nrext64&#061;0<br \/>\ndata     &#061;                       bsize&#061;4096   blocks&#061;262144, imaxpct&#061;25<br \/>\n         &#061;                       sunit&#061;0      swidth&#061;0 blks<br \/>\nnaming   &#061;version 2              bsize&#061;4096   ascii-ci&#061;0, ftype&#061;1<br \/>\nlog      &#061;internal log           bsize&#061;4096   blocks&#061;16384, version&#061;2<br \/>\n         &#061;                       sectsz&#061;512   sunit&#061;0 blks, lazy-count&#061;1<br \/>\nrealtime &#061;none                   extsz&#061;4096   blocks&#061;0, rtextents&#061;0<br \/>\n[root&#064;localhost ~]# mkdir \/c2508_lv1<br \/>\n[root&#064;localhost ~]# mount \/dev\/c2508\/c2508_lv1 \/c2508_lv1\/<br \/>\n[root&#064;localhost ~]# df -Th<br \/>\n\u6587\u4ef6\u7cfb\u7edf                    \u7c7b\u578b      \u5bb9\u91cf  \u5df2\u7528  \u53ef\u7528 \u5df2\u7528% \u6302\u8f7d\u70b9<br \/>\ndevtmpfs                    devtmpfs  4.0M     0  4.0M    0% \/dev<br \/>\ntmpfs                       tmpfs     1.8G     0  1.8G    0% \/dev\/shm<br \/>\ntmpfs                       tmpfs     726M  9.7M  716M    2% \/run<br \/>\n\/dev\/mapper\/rl-root         xfs        70G  6.9G   64G   10% \/<br \/>\n\/dev\/nvme0n1p1              xfs       960M  304M  657M   32% \/boot<br \/>\n\/dev\/mapper\/rl-home         xfs       126G  926M  125G    1% \/home<br \/>\ntmpfs                       tmpfs     363M   96K  363M    1% \/run\/user\/0<br \/>\n\/dev\/mapper\/c2508-c2508_lv1 xfs       960M   39M  922M    5% \/c2508_lv1 <\/p>\n<p>3.2\u3001\u6269\u5bb9LVM\u903b\u8f91\u5377<\/p>\n<p>#\u57fa\u4e8exfs\u6587\u4ef6\u7cfb\u7edf\u7684lv\u6269\u5bb9&#xff08;xfs_growfs &#xff1a;\u8fdb\u884c\u5bb9\u91cf\u8bc6\u522b&#xff09;<\/p>\n<p>[root&#064;localhost ~]# lvextend \/dev\/c2508\/c2508_lv1 -L &#043;1G<br \/>\n  Size of logical volume c2508\/c2508_lv1 changed from 1.00 GiB (256 extents) to 2.00 GiB (512 extents).<br \/>\n  Logical volume c2508\/c2508_lv1 successfully resized.<br \/>\n[root&#064;localhost ~]# df -Th<br \/>\n\u6587\u4ef6\u7cfb\u7edf                    \u7c7b\u578b      \u5bb9\u91cf  \u5df2\u7528  \u53ef\u7528 \u5df2\u7528% \u6302\u8f7d\u70b9<br \/>\ndevtmpfs                    devtmpfs  4.0M     0  4.0M    0% \/dev<br \/>\ntmpfs                       tmpfs     1.8G     0  1.8G    0% \/dev\/shm<br \/>\ntmpfs                       tmpfs     726M  9.7M  716M    2% \/run<br \/>\n\/dev\/mapper\/rl-root         xfs        70G  6.9G   64G   10% \/<br \/>\n\/dev\/nvme0n1p1              xfs       960M  304M  657M   32% \/boot<br \/>\n\/dev\/mapper\/rl-home         xfs       126G  926M  125G    1% \/home<br \/>\ntmpfs                       tmpfs     363M   96K  363M    1% \/run\/user\/0<br \/>\n\/dev\/mapper\/c2508-c2508_lv1 xfs       960M   39M  922M    5% \/c2508_lv1<br \/>\n[root&#064;localhost ~]# xfs_growfs \/dev\/c<br \/>\nc2508\/           char\/            core             cpu_dma_latency<br \/>\ncdrom            console          cpu\/<br \/>\n[root&#064;localhost ~]# xfs_growfs \/dev\/c2508\/c2508_lv1<br \/>\nmeta-data&#061;\/dev\/mapper\/c2508-c2508_lv1 isize&#061;512    agcount&#061;4, agsize&#061;65536 blks<br \/>\n         &#061;                       sectsz&#061;512   attr&#061;2, projid32bit&#061;1<br \/>\n         &#061;                       crc&#061;1        finobt&#061;1, sparse&#061;1, rmapbt&#061;0<br \/>\n         &#061;                       reflink&#061;1    bigtime&#061;1 inobtcount&#061;1 nrext64&#061;0<br \/>\ndata     &#061;                       bsize&#061;4096   blocks&#061;262144, imaxpct&#061;25<br \/>\n         &#061;                       sunit&#061;0      swidth&#061;0 blks<br \/>\nnaming   &#061;version 2              bsize&#061;4096   ascii-ci&#061;0, ftype&#061;1<br \/>\nlog      &#061;internal log           bsize&#061;4096   blocks&#061;16384, version&#061;2<br \/>\n         &#061;                       sectsz&#061;512   sunit&#061;0 blks, lazy-count&#061;1<br \/>\nrealtime &#061;none                   extsz&#061;4096   blocks&#061;0, rtextents&#061;0<br \/>\ndata blocks changed from 262144 to 524288<br \/>\n[root&#064;localhost ~]# df -Th<br \/>\n\u6587\u4ef6\u7cfb\u7edf                    \u7c7b\u578b      \u5bb9\u91cf  \u5df2\u7528  \u53ef\u7528 \u5df2\u7528% \u6302\u8f7d\u70b9<br \/>\ndevtmpfs                    devtmpfs  4.0M     0  4.0M    0% \/dev<br \/>\ntmpfs                       tmpfs     1.8G     0  1.8G    0% \/dev\/shm<br \/>\ntmpfs                       tmpfs     726M  9.7M  716M    2% \/run<br \/>\n\/dev\/mapper\/rl-root         xfs        70G  6.9G   64G   10% \/<br \/>\n\/dev\/nvme0n1p1              xfs       960M  304M  657M   32% \/boot<br \/>\n\/dev\/mapper\/rl-home         xfs       126G  926M  125G    1% \/home<br \/>\ntmpfs                       tmpfs     363M   96K  363M    1% \/run\/user\/0<br \/>\n\/dev\/mapper\/c2508-c2508_lv1 xfs       2.0G   47M  1.9G    3% \/c2508_lv1<\/p>\n<p>#\u57fa\u4e8eext\u6587\u4ef6\u7cfb\u7edf\u7684lv\u6269\u5bb9&#xff08;resize2fs :\u8fdb\u884c\u5bb9\u91cf\u8bc6\u522b)(Linux7\u9700\u8981\u5378\u8f7d\u6587\u4ef6\u7cfb\u7edf&#xff0c;Linux9\u4e0d\u9700\u8981)<\/p>\n<p>[root&#064;localhost ~]# lvcreate -n c2508_lv2 c2508 -L &#043;1G<br \/>\nWARNING: xfs signature detected on \/dev\/c2508\/c2508_lv2 at offset 0. Wipe it? [y\/n]: y<br \/>\n  Wiping xfs signature on \/dev\/c2508\/c2508_lv2.<br \/>\n  Logical volume &#034;c2508_lv2&#034; created.<br \/>\n[root&#064;localhost ~]# mkfs.ext4 \/dev\/c2508\/c2508_lv2<br \/>\nmke2fs 1.46.5 (30-Dec-2021)<br \/>\n\u521b\u5efa\u542b\u6709 262144 \u4e2a\u5757&#xff08;\u6bcf\u5757 4k&#xff09;\u548c 65536 \u4e2ainode\u7684\u6587\u4ef6\u7cfb\u7edf<br \/>\n\u6587\u4ef6\u7cfb\u7edfUUID&#xff1a;9e3513b7-c586-4185-8ea0-ac6e52e0f403<br \/>\n\u8d85\u7ea7\u5757\u7684\u5907\u4efd\u5b58\u50a8\u4e8e\u4e0b\u5217\u5757&#xff1a;<br \/>\n        32768, 98304, 163840, 229376<\/p>\n<p>\u6b63\u5728\u5206\u914d\u7ec4\u8868&#xff1a; \u5b8c\u6210<br \/>\n\u6b63\u5728\u5199\u5165inode\u8868&#xff1a; \u5b8c\u6210<br \/>\n\u521b\u5efa\u65e5\u5fd7&#xff08;8192 \u4e2a\u5757&#xff09;\u5b8c\u6210<br \/>\n\u5199\u5165\u8d85\u7ea7\u5757\u548c\u6587\u4ef6\u7cfb\u7edf\u8d26\u6237\u7edf\u8ba1\u4fe1\u606f&#xff1a; \u5df2\u5b8c\u6210<\/p>\n<p>[root&#064;localhost ~]# mkdir \/c2508_lv2<br \/>\n[root&#064;localhost ~]# mount \/dev\/c2508\/c2508_lv2 \/c2508_lv2\/<br \/>\n[root&#064;localhost ~]# df -Th<br \/>\n\u6587\u4ef6\u7cfb\u7edf                    \u7c7b\u578b      \u5bb9\u91cf  \u5df2\u7528  \u53ef\u7528 \u5df2\u7528% \u6302\u8f7d\u70b9<br \/>\ndevtmpfs                    devtmpfs  4.0M     0  4.0M    0% \/dev<br \/>\ntmpfs                       tmpfs     1.8G     0  1.8G    0% \/dev\/shm<br \/>\ntmpfs                       tmpfs     726M  9.7M  716M    2% \/run<br \/>\n\/dev\/mapper\/rl-root         xfs        70G  6.9G   64G   10% \/<br \/>\n\/dev\/nvme0n1p1              xfs       960M  304M  657M   32% \/boot<br \/>\n\/dev\/mapper\/rl-home         xfs       126G  926M  125G    1% \/home<br \/>\ntmpfs                       tmpfs     363M   96K  363M    1% \/run\/user\/0<br \/>\n\/dev\/mapper\/c2508-c2508_lv1 xfs       2.0G   47M  1.9G    3% \/c2508_lv1<br \/>\n\/dev\/mapper\/c2508-c2508_lv2 ext4      974M   24K  907M    1% \/c2508_lv2<br \/>\n[root&#064;localhost ~]# lvextend \/dev\/c2508\/c2508_lv2 -L &#043;1G<br \/>\n  Size of logical volume c2508\/c2508_lv2 changed from 1.00 GiB (256 extents) to 2.00 GiB (512 extents).<br \/>\n  Logical volume c2508\/c2508_lv2 successfully resized.<br \/>\n[root&#064;localhost ~]# resize2fs \/dev\/c2508\/c2508_lv2<br \/>\nresize2fs 1.46.5 (30-Dec-2021)<br \/>\n\/dev\/c2508\/c2508_lv2 \u4e0a\u7684\u6587\u4ef6\u7cfb\u7edf\u5df2\u88ab\u6302\u8f7d\u4e8e \/c2508_lv2&#xff1b;\u9700\u8981\u8fdb\u884c\u5728\u7ebf\u8c03\u6574\u5927\u5c0f<\/p>\n<p>old_desc_blocks &#061; 1, new_desc_blocks &#061; 1<br \/>\n\/dev\/c2508\/c2508_lv2 \u4e0a\u7684\u6587\u4ef6\u7cfb\u7edf\u73b0\u5728\u4e3a 524288 \u4e2a\u5757&#xff08;\u6bcf\u5757 4k&#xff09;\u3002<\/p>\n<p>[root&#064;localhost ~]# df -Th<br \/>\n\u6587\u4ef6\u7cfb\u7edf                    \u7c7b\u578b      \u5bb9\u91cf  \u5df2\u7528  \u53ef\u7528 \u5df2\u7528% \u6302\u8f7d\u70b9<br \/>\ndevtmpfs                    devtmpfs  4.0M     0  4.0M    0% \/dev<br \/>\ntmpfs                       tmpfs     1.8G     0  1.8G    0% \/dev\/shm<br \/>\ntmpfs                       tmpfs     726M  9.7M  716M    2% \/run<br \/>\n\/dev\/mapper\/rl-root         xfs        70G  6.9G   64G   10% \/<br \/>\n\/dev\/nvme0n1p1              xfs       960M  304M  657M   32% \/boot<br \/>\n\/dev\/mapper\/rl-home         xfs       126G  926M  125G    1% \/home<br \/>\ntmpfs                       tmpfs     363M   96K  363M    1% \/run\/user\/0<br \/>\n\/dev\/mapper\/c2508-c2508_lv1 xfs       2.0G   47M  1.9G    3% \/c2508_lv1<br \/>\n\/dev\/mapper\/c2508-c2508_lv2 ext4      2.0G   24K  1.9G    1% \/c2508_lv2 <\/p>\n<h3 id=\"%E4%BA%94%E3%80%81%E7%A3%81%E7%9B%98%E9%85%8D%E9%A2%9D\">\u4e94\u3001\u78c1\u76d8\u914d\u989d<\/h3>\n<h4 id=\"1%E3%80%81%E6%A6%82%E8%BF%B0\">1\u3001\u6982\u8ff0<\/h4>\n<p>\u9488\u5bf9\u7528\u6237\u548c\u7ec4&#xff0c;\u7528\u4e8e\u914d\u7f6e\u7528\u6237\u548c\u7ec4\u5728\u8be5\u78c1\u76d8\u7684\u4f7f\u7528\u5bb9\u91cf\u9650\u5236\u3002<\/p>\n<p>\u914d\u989d\u7c7b\u578b<\/p>\n<ul>\n<li>\n<p>usrquota:\u652f\u6301\u5bf9\u7528\u6237\u7684\u78c1\u76d8\u914d\u989d<\/p>\n<\/li>\n<li>\n<p>grpquota&#xff1a;\u652f\u6301\u5bf9\u7ec4\u7684\u78c1\u76d8\u914d\u989d<\/p>\n<\/li>\n<\/ul>\n<p>\u9650\u5236\u7c7b\u578b<\/p>\n<h4 id=\"2%E3%80%81%E9%85%8D%E7%BD%AE%E5%91%BD%E4%BB%A4\">2\u3001\u914d\u7f6e\u547d\u4ee4<\/h4>\n<ul>\n<li>\n<p>\u8f6f\u9650\u5236&#xff1a;\u6307\u5b9a\u4e00\u4e2a\u8f6f\u6027\u7684\u914d\u989d\u6570\u636e\u503c&#xff0c;\u7528\u6237\u8d85\u8fc7\u8fd9\u4e2a\u6570\u636e\u65f6&#xff0c;\u7cfb\u7edf\u7ed9\u51fa\u8b66\u544a\u4fe1\u606f&#xff0c;\u53ef\u4ee5\u6253\u7834\u6570\u636e\u503c\u3002\u5bb9\u91cf\u5927\u5c0f&#xff1b;inode\u8282\u70b9&#xff08;\u6587\u4ef6\u6570\u91cf&#xff09;<\/p>\n<\/li>\n<li>\n<p>\u786c\u9650\u5236&#xff1a;\u6307\u5b9a\u4e00\u4e2a\u786c\u6027\u7684\u914d\u989d\u503c&#xff0c;\u7981\u6b62\u7528\u6237\u8d85\u8fc7\u8fd9\u4e2a\u9650\u5236\u3002<\/p>\n<\/li>\n<\/ul>\n<p>xfs_quota\u547d\u4ee4<\/p>\n<p>\u6848\u4f8b&#xff1a;<\/p>\n<p>#\u5b9e\u73b0\u652f\u6301\u78c1\u76d8\u914d\u989d\u7684\u6302\u8f7d&#xff1a; mount -o usrquota,grpquota \/dev\/test_vg\/test_lv \/testlvm<\/p>\n<p>[root&#064;localhost ~]# mount -o usrquota,grpquota \/dev\/c2508\/c2508_lv3 \/mnt<br \/>\n[root&#064;localhost ~]# mount<br \/>\nproc on \/proc type proc (rw,nosuid,nodev,noexec,relatime)<br \/>\nsysfs on \/sys type sysfs (rw,nosuid,nodev,noexec,relatime,seclabel)<br \/>\ndevtmpfs on \/dev type devtmpfs (rw,nosuid,seclabel,size&#061;4096k,nr_inodes&#061;456389,mode&#061;755,inode64)<br \/>\nsecurityfs on \/sys\/kernel\/security type securityfs (rw,nosuid,nodev,noexec,relatime)<br \/>\ntmpfs on \/dev\/shm type tmpfs (rw,nosuid,nodev,seclabel,inode64)<br \/>\ndevpts on \/dev\/pts type devpts (rw,nosuid,noexec,relatime,seclabel,gid&#061;5,mode&#061;620,ptmxmode&#061;000)<br \/>\ntmpfs on \/run type tmpfs (rw,nosuid,nodev,seclabel,size&#061;742944k,nr_inodes&#061;819200,mode&#061;755,inode64)<br \/>\ncgroup2 on \/sys\/fs\/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,seclabel,nsdelegate,memory_recursiveprot)<br \/>\npstore on \/sys\/fs\/pstore type pstore (rw,nosuid,nodev,noexec,relatime,seclabel)<br \/>\nbpf on \/sys\/fs\/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode&#061;700)<br \/>\n\/dev\/mapper\/rl-root on \/ type xfs (rw,relatime,seclabel,attr2,inode64,logbufs&#061;8,logbsize&#061;32k,noquota)<br \/>\nselinuxfs on \/sys\/fs\/selinux type selinuxfs (rw,nosuid,noexec,relatime)<br \/>\nsystemd-1 on \/proc\/sys\/fs\/binfmt_misc type autofs (rw,relatime,fd&#061;29,pgrp&#061;1,timeout&#061;0,minproto&#061;5,maxproto&#061;5,direct,pipe_ino&#061;14876)<br \/>\nmqueue on \/dev\/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime,seclabel)<br \/>\ndebugfs on \/sys\/kernel\/debug type debugfs (rw,nosuid,nodev,noexec,relatime,seclabel)<br \/>\nhugetlbfs on \/dev\/hugepages type hugetlbfs (rw,relatime,seclabel,pagesize&#061;2M)<br \/>\ntracefs on \/sys\/kernel\/tracing type tracefs (rw,nosuid,nodev,noexec,relatime,seclabel)<br \/>\nfusectl on \/sys\/fs\/fuse\/connections type fusectl (rw,nosuid,nodev,noexec,relatime)<br \/>\nconfigfs on \/sys\/kernel\/config type configfs (rw,nosuid,nodev,noexec,relatime)<br \/>\nnone on \/run\/credentials\/systemd-sysctl.service type ramfs (ro,nosuid,nodev,noexec,relatime,seclabel,mode&#061;700)<br \/>\nnone on \/run\/credentials\/systemd-tmpfiles-setup-dev.service type ramfs (ro,nosuid,nodev,noexec,relatime,seclabel,mode&#061;700)<br \/>\nvmware-vmblock on \/run\/vmblock-fuse type fuse.vmware-vmblock (rw,relatime,user_id&#061;0,group_id&#061;0,default_permissions,allow_other)<br \/>\n\/dev\/nvme0n1p1 on \/boot type xfs (rw,relatime,seclabel,attr2,inode64,logbufs&#061;8,logbsize&#061;32k,noquota)<br \/>\n\/dev\/mapper\/rl-home on \/home type xfs (rw,relatime,seclabel,attr2,inode64,logbufs&#061;8,logbsize&#061;32k,noquota)<br \/>\nnone on \/run\/credentials\/systemd-tmpfiles-setup.service type ramfs (ro,nosuid,nodev,noexec,relatime,seclabel,mode&#061;700)<br \/>\ntmpfs on \/run\/user\/0 type tmpfs (rw,nosuid,nodev,relatime,seclabel,size&#061;371468k,nr_inodes&#061;92867,mode&#061;700,inode64)<br \/>\ngvfsd-fuse on \/run\/user\/0\/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id&#061;0,group_id&#061;0)<br \/>\n\/dev\/mapper\/c2508-c2508_lv2 on \/c2508_lv2 type ext4 (rw,relatime,seclabel,mb_optimize_scan&#061;0)<br \/>\n\/dev\/mapper\/c2508-c2508_lv1 on \/c2508_lv1 type xfs (rw,relatime,seclabel,attr2,inode64,logbufs&#061;8,logbsize&#061;32k,noquota)<br \/>\n\/dev\/mapper\/c2508-c2508_lv3 on \/mnt type xfs (rw,relatime,seclabel,attr2,inode64,logbufs&#061;8,logbsize&#061;32k,usrquota,grpquota) <\/p>\n<p>#\u67e5\u770b\u662f\u5426\u652f\u6301\u78c1\u76d8\u914d\u989d&#xff1a;<\/p>\n<p>mount<\/p>\n<p>#XFS\u6587\u4ef6\u7cfb\u7edf\u7684\u78c1\u76d8\u914d\u989d\u547d\u4ee4&#xff1a; xfs_quota -x -c &#039;limit -u bsoft&#061;10M bhard&#061;50M isoft&#061;10 ihard&#061;20 username&#039; \/testlvm\/ #-u&#xff1a;\u7528\u6237\u914d\u989d #-g&#xff1a;\u7ec4\u914d\u989d #&#xff08;b\/i&#xff09;soft&#xff1a;\u5bb9\u91cf\/\u6587\u4ef6\u6570\u8f6f\u9650\u5236&#xff0c;\u7528\u4e8e\u76d1\u89c6 #&#xff08;b\/i&#xff09;hard&#xff1a;\u5bb9\u91cf\/\u6587\u4ef6\u6570\u786c\u9650\u5236&#xff0c;\u4e0d\u80fd\u8d85\u51fa\u8bbe\u7f6e\u7684\u503c<\/p>\n<p>[root&#064;localhost ~]# xfs_quota -x -c &#039;limit -u bsoft&#061;10M bhard&#061;50M isoft&#061;10 ihard&#061;20 user1&#039; \/mnt\/ <\/p>\n<p>#\u67e5\u770b\u78c1\u76d8\u914d\u989d<\/p>\n<p>xfs_quota -x -c &#039;report -bi&#039; \/testlvm\/<\/p>\n<p>[root&#064;localhost ~]# xfs_quota -x -c &#039;report -bi&#039; \/mnt\/<br \/>\nUser quota on \/mnt (\/dev\/mapper\/c2508-c2508_lv3)<br \/>\n                               Blocks                                          Inodes<br \/>\nUser ID          Used       Soft       Hard    Warn\/Grace           Used       Soft       Hard    Warn\/ Grace<br \/>\n&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\nroot                0          0          0     00 [&#8212;&#8212;&#8211;]          3          0          0     00 [&#8212;&#8212;&#8211;]<br \/>\nuser1               0      10240      51200     00 [&#8212;&#8212;&#8211;]          0         10         20     00 [&#8212;&#8212;&#8211;]<\/p>\n<p>Group quota on \/mnt (\/dev\/mapper\/c2508-c2508_lv3)<br \/>\n                               Blocks                                          Inodes<br \/>\nGroup ID         Used       Soft       Hard    Warn\/Grace           Used       Soft       Hard    Warn\/ Grace<br \/>\n&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\nroot                0          0          0     00 [&#8212;&#8212;&#8211;]          3          0          0     00 [&#8212;&#8212;&#8211;]<\/p>\n<p>#\u67e5\u770b\u5bb9\u91cf\u914d\u989d&#xff1a; xfs_quota -x -c &#039;report \u00a0-b -u &#039; \/testlvm\/ #\u67e5\u770b\u6587\u4ef6\u6570\u91cf\u914d\u989d&#xff1a; xfs_quota -x -c &#039;report \u00a0-i -u &#039; \/testlvm\/<\/p>\n<\/p>\n<p>#\u9a8c\u8bc1&#xff1a;<\/p>\n<p>#dd if&#061;\/dev\/zero of&#061;.\/test.txt bs&#061;10M count&#061;60<\/p>\n<p>[root&#064;localhost ~]# su &#8211; user1<br \/>\n[user1&#064;localhost ~]$ cd \/mnt<br \/>\n[user1&#064;localhost mnt]$ touch {1..10}.txt<br \/>\n[user1&#064;localhost mnt]$ touch {11..22}.txt<br \/>\ntouch: \u65e0\u6cd5\u521b\u5efa &#039;21.txt&#039;: \u8d85\u51fa\u78c1\u76d8\u9650\u989d<br \/>\ntouch: \u65e0\u6cd5\u521b\u5efa &#039;22.txt&#039;: \u8d85\u51fa\u78c1\u76d8\u9650\u989d<br \/>\n[user1&#064;localhost mnt]$ dd if&#061;\/dev\/zero of&#061;.\/test.txt bs&#061;1M count&#061;51<br \/>\ndd: \u6253\u5f00&#039;.\/test.txt&#039; \u5931\u8d25: \u8d85\u51fa\u78c1\u76d8\u9650\u989d <\/p>\n<h4 id=\"3%E3%80%81xfs%E9%85%8D%E9%A2%9D\">3\u3001xfs\u914d\u989d<\/h4>\n<p>&#xff08;1)\u3001\u6302\u8f7d\u5e76\u542f\u7528\u914d\u989d<\/p>\n<p>mount -o usrquota,grpquota \/dev\/test_vg\/test_lv(\u6302\u8f7d\u78c1\u76d8&#xff09;\/testlvm(\u6302\u8f7d\u70b9&#xff09;<\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u6c38\u4e45\u6302\u8f7d<\/p>\n<p>\/dev\/sdb1 \/mail xfs defaults,usrquota,grpquota 0 0<\/p>\n<p>&#xff08;2)\u3001\u7f16\u8f91\u7528\u6237\u914d\u989d<\/p>\n<p>xfs_quota -x -c &#039;limit -u bsoft:30M bhard:50M isoft:3 ihard:5 \u7528\u6237\u540d&#039; \/\u6302\u8f7d\u76ee\u5f55<\/p>\n<p>&#xff08;3)\u3001\u7f16\u8f91\u7ec4\u914d\u989d<\/p>\n<p>xfs_quota -x -c &#039;limit -g bsoft:30M bhard:50M isoft:3 ihard:5 \u7ec4\u540d&#039; \/\u6302\u8f7d\u76ee\u5f55<\/p>\n<h4 id=\"4%E3%80%81ext4%E9%85%8D%E9%A2%9D%EF%BC%88%E4%BA%86%E8%A7%A3%EF%BC%89\">4\u3001ext4\u914d\u989d&#xff08;\u4e86\u89e3&#xff09;<\/h4>\n<p>&#xff08;1)\u3001\u6302\u8f7d<\/p>\n<p>mount -o defaults,usrquota,grpquota \/\u6302\u8f7d\u78c1\u76d8 \/\u6302\u8f7d\u70b9<\/p>\n<p>&#xff08;2)\u3001\u751f\u6210\u914d\u989d\u6587\u4ef6<\/p>\n<p>quotacheck \/\u6302\u8f7d\u70b9<\/p>\n<p>&#xff08;3)\u3001\u542f\u7528\u914d\u989d&#xff08;\u5173\u95ed\u914d\u989d\u547d\u4ee4\u7528quotaoff&#xff09;<\/p>\n<p>quotaon -ugv \/\u6302\u8f7d\u70b9<\/p>\n<p>&#xff08;4)\u3001\u7528\u6237\u548c\u7ec4\u914d\u989d<\/p>\n<p>edquota -u \u7528\u6237\u540d<\/p>\n<p>edquota -g \u7ec4\u540d<\/p>\n<h3 id=\"%E5%85%AD%E3%80%81%E7%A3%81%E7%9B%98%E6%A3%80%E6%B5%8B%E4%B8%8E%E4%BF%AE%E5%A4%8D\">\u516d\u3001\u78c1\u76d8\u68c0\u6d4b\u4e0e\u4fee\u590d<\/h3>\n<h4 id=\"1%E3%80%81fsck%E5%91%BD%E4%BB%A4%EF%BC%88%E5%9F%BA%E4%BA%8Eext4)\">1\u3001fsck\u547d\u4ee4&#xff08;\u57fa\u4e8eext4)<\/h4>\n<h4 id=\"2%E3%80%81xfs_repair%E5%91%BD%E4%BB%A4\">2\u3001xfs_repair\u547d\u4ee4<\/h4>\n<p>\u6848\u4f8b&#xff1a;<\/p>\n<p>#\u6a21\u62df\u6545\u969c&#xff1b;<\/p>\n<p>[root&#064;localhost ~]# umount \/nvme0n3p1<br \/>\n[root&#064;localhost ~]# dd if&#061;\/dev\/zero of&#061;\/dev\/nvme0n3p1 bs&#061;512 count&#061;1<br \/>\n\u8bb0\u5f55\u4e861&#043;0 \u7684\u8bfb\u5165<br \/>\n\u8bb0\u5f55\u4e861&#043;0 \u7684\u5199\u51fa<br \/>\n512\u5b57\u8282\u5df2\u590d\u5236&#xff0c;0.000789825 s&#xff0c;648 kB\/s<br \/>\n[root&#064;localhost ~]# mount \/dev\/nvme0n3p1 \/nvme0n3p1<br \/>\nmount: \/nvme0n3p1: \u6587\u4ef6\u7cfb\u7edf\u7c7b\u578b\u9519\u8bef\u3001\u9009\u9879\u9519\u8bef\u3001\/dev\/nvme0n3p1 \u4e0a\u6709\u574f\u8d85\u7ea7\u5757\u3001\u7f3a\u5c11\u4ee3\u7801\u9875\u6216\u5e2e\u52a9\u7a0b\u5e8f\u6216\u5176\u4ed6\u9519\u8bef.<\/p>\n<p>#\u4f7f\u7528xfs_repair\u547d\u4ee4\u4fee\u590d<\/p>\n<p>[root&#064;localhost ~]# xfs_repair \/dev\/nvme0n3p1<br \/>\nPhase 1 &#8211; find and verify superblock&#8230;<br \/>\nbad primary superblock &#8211; bad magic number !!!<\/p>\n<p>attempting to find secondary superblock&#8230;<br \/>\n.found candidate secondary superblock&#8230;<br \/>\nverified secondary superblock&#8230;<br \/>\nwriting modified primary superblock<br \/>\nsb realtime bitmap inode value 18446744073709551615 (NULLFSINO) inconsistent with calculated value 129<br \/>\nresetting superblock realtime bitmap inode pointer to 129<br \/>\nsb realtime summary inode value 18446744073709551615 (NULLFSINO) inconsistent with calculated value 130<br \/>\nresetting superblock realtime summary inode pointer to 130<br \/>\nPhase 2 &#8211; using internal log<br \/>\n        &#8211; zero log&#8230;<br \/>\n        &#8211; scan filesystem freespace and inode maps&#8230;<br \/>\nsb_icount 0, counted 64<br \/>\nsb_ifree 0, counted 61<br \/>\nsb_fdblocks 1556200, counted 1556192<br \/>\n        &#8211; found root inode chunk<br \/>\nPhase 3 &#8211; for each AG&#8230;<br \/>\n        &#8211; scan and clear agi unlinked lists&#8230;<br \/>\n        &#8211; process known inodes and perform inode discovery&#8230;<br \/>\n        &#8211; agno &#061; 0<br \/>\n        &#8211; agno &#061; 1<br \/>\n        &#8211; agno &#061; 2<br \/>\n        &#8211; agno &#061; 3<br \/>\n        &#8211; process newly discovered inodes&#8230;<br \/>\nPhase 4 &#8211; check for duplicate blocks&#8230;<br \/>\n        &#8211; setting up duplicate extent list&#8230;<br \/>\n        &#8211; check for inodes claiming duplicate blocks&#8230;<br \/>\n        &#8211; agno &#061; 0<br \/>\n        &#8211; agno &#061; 1<br \/>\n        &#8211; agno &#061; 2<br \/>\n        &#8211; agno &#061; 3<br \/>\nPhase 5 &#8211; rebuild AG headers and trees&#8230;<br \/>\n        &#8211; reset superblock&#8230;<br \/>\nPhase 6 &#8211; check inode connectivity&#8230;<br \/>\n        &#8211; resetting contents of realtime bitmap and summary inodes<br \/>\n        &#8211; traversing filesystem &#8230;<br \/>\n        &#8211; traversal finished &#8230;<br \/>\n        &#8211; moving disconnected inodes to lost&#043;found &#8230;<br \/>\nPhase 7 &#8211; verify and correct link counts&#8230;<br \/>\nNote &#8211; stripe unit (0) and width (0) were copied from a backup superblock.<br \/>\nPlease reset with mount -o sunit&#061;&lt;value&gt;,swidth&#061;&lt;value&gt; if necessary<br \/>\ndone<br \/>\n[root&#064;localhost ~]# mount \/dev\/nvme0n3p1 \/nvme0n3p1<br \/>\n[root&#064;localhost ~]# df -Th<br \/>\n\u6587\u4ef6\u7cfb\u7edf            \u7c7b\u578b      \u5bb9\u91cf  \u5df2\u7528  \u53ef\u7528 \u5df2\u7528% \u6302\u8f7d\u70b9<br \/>\ndevtmpfs            devtmpfs  4.0M     0  4.0M    0% \/dev<br \/>\ntmpfs               tmpfs     1.8G     0  1.8G    0% \/dev\/shm<br \/>\ntmpfs               tmpfs     726M  9.6M  716M    2% \/run<br \/>\n\/dev\/mapper\/rl-root xfs        70G  6.9G   64G   10% \/<br \/>\n\/dev\/nvme0n1p1      xfs       960M  304M  657M   32% \/boot<br \/>\n\/dev\/mapper\/rl-home xfs       126G  926M  125G    1% \/home<br \/>\ntmpfs               tmpfs     363M   52K  363M    1% \/run\/user\/42<br \/>\ntmpfs               tmpfs     363M   36K  363M    1% \/run\/user\/0<br \/>\n\/dev\/nvme0n3p1      xfs       6.0G   75M  5.9G    2% \/nvme0n3p1 <\/p>\n<h3 id=\"%E4%B8%83%E3%80%81%E6%96%87%E4%BB%B6%E7%B3%BB%E7%BB%9F%E5%A4%87%E4%BB%BD%E4%B8%8E%E6%81%A2%E5%A4%8D\">\u4e03\u3001\u6587\u4ef6\u7cfb\u7edf\u5907\u4efd\u4e0e\u6062\u590d<\/h3>\n<h4 id=\"1%E3%80%81xfsdump%E5%91%BD%E4%BB%A4\">1\u3001xfsdump\u547d\u4ee4<\/h4>\n<p>\u5907\u4efd\u7b49\u7ea7&#xff1a;<\/p>\n<p>0 &#8211;\u5b8c\u5168\u5907\u4efd&#xff08;\u6587\u4ef6\u7cfb\u7edf\u9ed8\u8ba4\u5907\u4efd\u7b49\u7ea7&#xff09;<\/p>\n<p>1\u20149 &#8211;\u589e\u91cf\u5907\u4efd<\/p>\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\" style=\"width:900px\">\n<tbody>\n<tr>\n<td style=\"width:233px\">\u9009\u9879<\/td>\n<td style=\"width:615px\">\u4f5c\u7528<\/td>\n<\/tr>\n<tr>\n<td style=\"width:233px\">-f<\/td>\n<td style=\"width:615px\">\u6307\u5b9a\u5907\u4efd\u5230\u54ea\u4e2a\u76ee\u5f55<\/td>\n<\/tr>\n<tr>\n<td style=\"width:233px\">-L<\/td>\n<td style=\"width:615px\">\u6307\u5b9a\u4f1a\u8bdd\u6807\u7b7e<\/td>\n<\/tr>\n<tr>\n<td style=\"width:233px\">-M<\/td>\n<td style=\"width:615px\">\u6307\u5b9a\u8bbe\u5907\u6807\u7b7e<\/td>\n<\/tr>\n<tr>\n<td style=\"width:233px\">-s<\/td>\n<td style=\"width:615px\">\u6307\u5b9a\u5206\u533a\u4e2d\u6587\u4ef6\u6216\u76ee\u5f55\u7684\u76f8\u5bf9\u8def\u5f84<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u64cd\u4f5c\u6848\u4f8b&#xff1a;<\/p>\n<ul>\n<li>\u5907\u4efd\u6574\u4e2a\u5206\u533a&#xff1a;<\/li>\n<\/ul>\n<p>#\u4ea4\u4e92\u5f0f&#xff1a;xfsdump -f [\u5907\u4efd\u5b58\u653e\u8def\u5f84] [\u8981\u5907\u4efd\u7684\u7684\u8bbe\u5907\u6216\u6302\u8f7d\u70b9]<\/p>\n<p>#\u4ea4\u4e92\u5f0f&#xff1a;xfsdump -f [\u5907\u4efd\u5b58\u653e\u8def\u5f84] [\u8981\u5907\u4efd\u7684\u7684\u8bbe\u5907\u6216\u6302\u8f7d\u70b9]<\/p>\n<p>root&#064;localhost nvme0n3p1]# xfsdump -f \/opt\/nvme0n3p1.bak \/dev\/nvme0n3p1 -L nvme0n3p1.bak -M nvme0n3p1<br \/>\nxfsdump: using file dump (drive_simple) strategy<br \/>\nxfsdump: version 3.1.12 (dump format 3.0) &#8211; type ^C for status and control<br \/>\nxfsdump: level 0 dump of localhost.localdomain:\/nvme0n3p1<br \/>\nxfsdump: dump date: Wed Aug 13 20:08:16 2025<br \/>\nxfsdump: session id: d5dda365-4eeb-4a23-8b02-3622699f5924<br \/>\nxfsdump: session label: &#034;nvme0n3p1.bak&#034;<br \/>\nxfsdump: ino map phase 1: constructing initial dump list<br \/>\nxfsdump: ino map phase 2: skipping (no pruning necessary)<br \/>\nxfsdump: ino map phase 3: skipping (only one dump stream)<br \/>\nxfsdump: ino map construction complete<br \/>\nxfsdump: estimated dump size: 26176 bytes<br \/>\nxfsdump: WARNING: encountered corrupt or foreign data: assuming corrupted media<br \/>\nxfsdump: WARNING: encountered corrupt or foreign data: repositioning to overwrite<br \/>\nxfsdump: content.c:5943&#xff1a;Media_mfile_begin: \u5047\u8bbe \u2018dcaps &amp; DRIVE_CAP_BSF\u2019 \u5931\u8d25\u3002<br \/>\n\u5df2\u653e\u5f03 (\u6838\u5fc3\u5df2\u8f6c\u50a8)<br \/>\n[root&#064;localhost nvme0n3p1]# xfsdump -f \/opt\/dump_nvme0n3p1 \/dev\/nvme0n3p1 -L dump_nvme0n3p1 -M nvme0n3p1<br \/>\nxfsdump: using file dump (drive_simple) strategy<br \/>\nxfsdump: version 3.1.12 (dump format 3.0) &#8211; type ^C for status and control<br \/>\nxfsdump: WARNING: most recent level 0 dump was interrupted, but not resuming that dump since resume (-R) option not specified<br \/>\nxfsdump: level 0 dump of localhost.localdomain:\/nvme0n3p1<br \/>\nxfsdump: dump date: Wed Aug 13 20:10:35 2025<br \/>\nxfsdump: session id: 16336a34-c28b-4df4-a362-9242ce85cdb2<br \/>\nxfsdump: session label: &#034;dump_nvme0n3p1&#034;<br \/>\nxfsdump: ino map phase 1: constructing initial dump list<br \/>\nxfsdump: ino map phase 2: skipping (no pruning necessary)<br \/>\nxfsdump: ino map phase 3: skipping (only one dump stream)<br \/>\nxfsdump: ino map construction complete<br \/>\nxfsdump: estimated dump size: 26176 bytes<br \/>\nxfsdump: creating dump session media file 0 (media 0, file 0)<br \/>\nxfsdump: dumping ino map<br \/>\nxfsdump: dumping directories<br \/>\nxfsdump: dumping non-directory files<br \/>\nxfsdump: ending media file<br \/>\nxfsdump: media file size 24128 bytes<br \/>\nxfsdump: dump size (non-dir files) : 544 bytes<br \/>\nxfsdump: dump complete: 0 seconds elapsed<br \/>\nxfsdump: Dump Summary:<br \/>\nxfsdump:   stream 0 \/opt\/dump_nvme0n3p1 OK (success)<br \/>\nxfsdump: Dump Status: SUCCESS<br \/>\n[root&#064;localhost nvme0n3p1]# cd \/opt<br \/>\n[root&#064;localhost opt]# ls -lh<br \/>\n\u603b\u7528\u91cf 36K<br \/>\n-rw-rwxr&#8211;&#043; 1 root root    6  8\u6708  8 19:53 1.txt<br \/>\ndrwxrwsrwx. 3 root root   18  8\u6708  8 18:30 dir1<br \/>\ndrwxrwxrwx. 3 root root   20  8\u6708  8 20:45 dir3<br \/>\n-rw-r&#8211;r&#8211;. 1 root root  24K  8\u6708 13 20:10 dump_nvme0n3p1<br \/>\n-rw-r&#8211;r&#8211;. 1 root root  512  8\u6708 13 19:40 nvme0n3p1.bak<br \/>\n-rw-r&#8211;r&#8211;. 1 root root 2.1K  8\u6708  5 15:07 passwd<br \/>\ndrwxrwxrwx. 5 zzh  zzh   126  8\u6708  8 16:28 zzh <\/p>\n<ul>\n<li>\u5907\u4efd\u5206\u533a\u4e2d\u67d0\u4e2a\u76ee\u5f55\u6216\u6587\u4ef6<\/li>\n<\/ul>\n<p>#xfsdump -f [\u5907\u4efd\u5b58\u653e\u8def\u5f84] -s [\u8981\u5907\u4efd\u7684\u76ee\u5f55\u6216\u6587\u4ef6\u7684\u76f8\u5bf9\u8def\u5f84] -L [\u4f1a\u8bdd\u6807\u7b7e\u540d] -M [\u8bbe \u5907\u6807\u7b7e\u540d]<\/p>\n<ul>\n<li>\u67e5\u770b\u5df2\u5907\u4efd\u7684\u6587\u4ef6\u7cfb\u7edf<\/li>\n<\/ul>\n<p>#\u6bcf\u6b21\u5907\u4efd\u6210\u529f\u540e&#xff0c;\u90fd\u4f1a\u5728\/var\/lib\/xfsdump\/inventory \u76ee\u5f55\u4e0b\u751f\u6210\u6863\u6848\u4fe1\u606f&#xff0c;\u8be6\u7ec6\u8bb0\u5f55\u5907\u4efd\u7684\u4fe1 \u606f&#xff0c;\u5982\u6302\u8f7d\u70b9\u3001\u6302\u8f7d\u8bbe\u5907\u3001\u4f1a\u8bdd\u6807\u7b7e\u3001\u8bbe\u5907\u6807\u7b7e\u3001\u5907\u4efd\u76ee\u5f55\u7b49\u76f8\u5173\u4fe1\u606f\u3002 cd \/var\/lib\/xfsdump\/inventory xfsdump -I<\/p>\n<p>*\u6ce8\u610f&#xff1a;<\/p>\n<ul>\n<li>\n<p>xfsdump\u4e0d\u652f\u6301\u6ca1\u6709\u6302\u8f7d\u7684\u6587\u4ef6\u7cfb\u7edf\u5907\u4efd&#xff0c;\u6240\u4ee5\u53ea\u80fd\u5907\u4efd\u5df2\u6302\u8f7d\u7684\u6587\u4ef6\u7cfb\u7edf&#xff1b;<\/p>\n<\/li>\n<li>\n<p>xfsdump\u5fc5\u987b\u4f7f\u7528root\u7684\u6743\u9650\u624d\u80fd\u64cd\u4f5c&#xff1b;<\/p>\n<\/li>\n<li>\n<p>xfsdump\u53ea\u80fd\u5907\u4efdxfs\u6587\u4ef6\u7cfb\u7edf&#xff1b;<\/p>\n<\/li>\n<li>\n<p>xfsdump\u5907\u4efd\u4e0b\u6765\u7684\u6570\u636e\u53ea\u80fd\u8ba9xfsrestore\u6765\u89e3\u6790&#xff1b;<\/p>\n<\/li>\n<li>\n<p>xfsdump\u662f\u901a\u8fc7\u6587\u4ef6\u7cfb\u7edf\u7684UUID\u6765\u5206\u8fa8\u5907\u4efd\u6863\u6848\u7684&#xff0c;\u56e0\u6b64\u4e0d\u80fd\u5907\u4efd\u4e24\u4e2a\u5177\u6709\u76f8\u540cUUID\u7684\u6587\u4ef6\u7cfb\u7edf<\/p>\n<\/li>\n<\/ul>\n<h4 id=\"2%E3%80%81xfsrestore%E5%91%BD%E4%BB%A4\">2\u3001xfsrestore\u547d\u4ee4<\/h4>\n<p>-f\u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0\u6307\u5b9a\u9700\u8981\u6062\u590d\u7684\u5907\u4efd\u6587\u4ef6<\/p>\n<p>\u64cd\u4f5c\u6848\u4f8b&#xff1a;<\/p>\n<p>#\u5148\u5220\u9664\u6302\u8f7d\u70b9\u4e0b\u7684\u5185\u5bb9<\/p>\n<p>[root&#064;localhost nvme0n3p1]# rm -rf *<br \/>\n[root&#064;localhost nvme0n3p1]# ls<br \/>\n[root&#064;localhost nvme0n3p1]# cd<br \/>\n[root&#064;localhost ~]# xfsrestore -f \/opt\/dump_nvme0n3p1 \/nvme0n3p1\/<br \/>\nxfsrestore: using file dump (drive_simple) strategy<br \/>\nxfsrestore: version 3.1.12 (dump format 3.0) &#8211; type ^C for status and control<br \/>\nxfsrestore: searching media for dump<br \/>\nxfsrestore: examining media file 0<br \/>\nxfsrestore: dump description:<br \/>\nxfsrestore: hostname: localhost.localdomain<br \/>\nxfsrestore: mount point: \/nvme0n3p1<br \/>\nxfsrestore: volume: \/dev\/nvme0n3p1<br \/>\nxfsrestore: session time: Wed Aug 13 20:10:35 2025<br \/>\nxfsrestore: level: 0<br \/>\nxfsrestore: session label: &#034;dump_nvme0n3p1&#034;<br \/>\nxfsrestore: media label: &#034;nvme0n3p1&#034;<br \/>\nxfsrestore: file system id: 382d8f66-9adc-4554-ba46-50e22284f46e<br \/>\nxfsrestore: session id: 16336a34-c28b-4df4-a362-9242ce85cdb2<br \/>\nxfsrestore: media id: 76374fd7-cfbc-49e6-bf0c-9903cb6acd38<br \/>\nxfsrestore: using online session inventory<br \/>\nxfsrestore: searching media for directory dump<br \/>\nxfsrestore: reading directories<br \/>\nxfsrestore: 4 directories and 4 entries processed<br \/>\nxfsrestore: directory post-processing<br \/>\nxfsrestore: restoring non-directory files<br \/>\nxfsrestore: restore complete: 0 seconds elapsed<br \/>\nxfsrestore: Restore Summary:<br \/>\nxfsrestore:   stream 0 \/opt\/dump_nvme0n3p1 OK (success)<br \/>\nxfsrestore: Restore Status: SUCCESS <\/p>\n<\/p>\n<\/p>\n<\/p>\n<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb677\u6b21\uff0c\u70b9\u8d5e15\u6b21\uff0c\u6536\u85cf25\u6b21\u3002\u672c\u6587\u5168\u9762\u4ecb\u7ecd\u4e86Linux\u7cfb\u7edf\u4e2d\u7684\u78c1\u76d8\u7ba1\u7406\u4e0e\u6587\u4ef6\u7cfb\u7edf\u76f8\u5173\u77e5\u8bc6\u3002\u4e3b\u8981\u5185\u5bb9\u5305\u62ec\uff1a\u786c\u76d8\u7269\u7406\u7ed3\u6784\uff08\u78c1\u9053\u3001\u6247\u533a\u3001\u67f1\u9762\uff09\u3001CHS\u7f16\u53f7\u89c4\u5219\u3001\u78c1\u76d8\u5206\u533a\u539f\u7406\uff08MBR\/GPT\uff09\uff1bLinux\u6587\u4ef6\u7cfb\u7edf\u67b6\u6784\uff08\u6839\u6587\u4ef6\u7cfb\u7edf\u3001\u865a\u62df\u6587\u4ef6\u7cfb\u7edf\u3001\u771f\u5b9e\u6587\u4ef6\u7cfb\u7edf\uff09\uff1b\u78c1\u76d8\u5206\u533a\u4e0e\u6302\u8f7d\u64cd\u4f5c\uff08fdisk\/parted\u547d\u4ee4\uff09\uff1bLVM\u903b\u8f91\u5377\u7ba1\u7406\uff08PV\/VG\/LV\u521b\u5efa\u4e0e\u6269\u5bb9\uff09\uff1b\u78c1\u76d8\u914d\u989d\u914d\u7f6e\uff08xfs\/ext4\u914d\u989d\uff09\uff1b\u78c1\u76d8\u68c0\u6d4b\u4fee\u590d\uff08fsck\/xfs_repair\uff09\uff1b\u4ee5\u53ca\u6587\u4ef6\u7cfb\u7edf\u5907\u4efd\u6062\u590d\uff08xfsdump\/xfsrestore\uff09\u3002\u901a\u8fc7\u5177\u4f53\u64cd\u4f5c\u6848\u4f8b\uff0c\u8be6\u7ec6\u8bb2\u89e3\u4e86Linux\u73af\u5883<\/p>\n","protected":false},"author":2,"featured_media":55960,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[58,5795,5796,305,44],"topic":[],"class_list":{"0":"post-55962","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","6":"hentry","7":"category-server","8":"tag-linux","10":"tag-5796","11":"tag-305","12":"tag-44"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u6df1\u5165\u5256\u6790Linux\u7cfb\u7edf\u78c1\u76d8\u7ba1\u7406 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/55962.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u6df1\u5165\u5256\u6790Linux\u7cfb\u7edf\u78c1\u76d8\u7ba1\u7406 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb677\u6b21\uff0c\u70b9\u8d5e15\u6b21\uff0c\u6536\u85cf25\u6b21\u3002\u672c\u6587\u5168\u9762\u4ecb\u7ecd\u4e86Linux\u7cfb\u7edf\u4e2d\u7684\u78c1\u76d8\u7ba1\u7406\u4e0e\u6587\u4ef6\u7cfb\u7edf\u76f8\u5173\u77e5\u8bc6\u3002\u4e3b\u8981\u5185\u5bb9\u5305\u62ec\uff1a\u786c\u76d8\u7269\u7406\u7ed3\u6784\uff08\u78c1\u9053\u3001\u6247\u533a\u3001\u67f1\u9762\uff09\u3001CHS\u7f16\u53f7\u89c4\u5219\u3001\u78c1\u76d8\u5206\u533a\u539f\u7406\uff08MBR\/GPT\uff09\uff1bLinux\u6587\u4ef6\u7cfb\u7edf\u67b6\u6784\uff08\u6839\u6587\u4ef6\u7cfb\u7edf\u3001\u865a\u62df\u6587\u4ef6\u7cfb\u7edf\u3001\u771f\u5b9e\u6587\u4ef6\u7cfb\u7edf\uff09\uff1b\u78c1\u76d8\u5206\u533a\u4e0e\u6302\u8f7d\u64cd\u4f5c\uff08fdisk\/parted\u547d\u4ee4\uff09\uff1bLVM\u903b\u8f91\u5377\u7ba1\u7406\uff08PV\/VG\/LV\u521b\u5efa\u4e0e\u6269\u5bb9\uff09\uff1b\u78c1\u76d8\u914d\u989d\u914d\u7f6e\uff08xfs\/ext4\u914d\u989d\uff09\uff1b\u78c1\u76d8\u68c0\u6d4b\u4fee\u590d\uff08fsck\/xfs_repair\uff09\uff1b\u4ee5\u53ca\u6587\u4ef6\u7cfb\u7edf\u5907\u4efd\u6062\u590d\uff08xfsdump\/xfsrestore\uff09\u3002\u901a\u8fc7\u5177\u4f53\u64cd\u4f5c\u6848\u4f8b\uff0c\u8be6\u7ec6\u8bb2\u89e3\u4e86Linux\u73af\u5883\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/55962.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-08-14T02:24:31+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250814022429-689d48dd95cd0.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"24 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/55962.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/55962.html\",\"name\":\"\u6df1\u5165\u5256\u6790Linux\u7cfb\u7edf\u78c1\u76d8\u7ba1\u7406 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-08-14T02:24:31+00:00\",\"dateModified\":\"2025-08-14T02:24:31+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/55962.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/55962.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/55962.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u6df1\u5165\u5256\u6790Linux\u7cfb\u7edf\u78c1\u76d8\u7ba1\u7406\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u6df1\u5165\u5256\u6790Linux\u7cfb\u7edf\u78c1\u76d8\u7ba1\u7406 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/55962.html","og_locale":"zh_CN","og_type":"article","og_title":"\u6df1\u5165\u5256\u6790Linux\u7cfb\u7edf\u78c1\u76d8\u7ba1\u7406 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb677\u6b21\uff0c\u70b9\u8d5e15\u6b21\uff0c\u6536\u85cf25\u6b21\u3002\u672c\u6587\u5168\u9762\u4ecb\u7ecd\u4e86Linux\u7cfb\u7edf\u4e2d\u7684\u78c1\u76d8\u7ba1\u7406\u4e0e\u6587\u4ef6\u7cfb\u7edf\u76f8\u5173\u77e5\u8bc6\u3002\u4e3b\u8981\u5185\u5bb9\u5305\u62ec\uff1a\u786c\u76d8\u7269\u7406\u7ed3\u6784\uff08\u78c1\u9053\u3001\u6247\u533a\u3001\u67f1\u9762\uff09\u3001CHS\u7f16\u53f7\u89c4\u5219\u3001\u78c1\u76d8\u5206\u533a\u539f\u7406\uff08MBR\/GPT\uff09\uff1bLinux\u6587\u4ef6\u7cfb\u7edf\u67b6\u6784\uff08\u6839\u6587\u4ef6\u7cfb\u7edf\u3001\u865a\u62df\u6587\u4ef6\u7cfb\u7edf\u3001\u771f\u5b9e\u6587\u4ef6\u7cfb\u7edf\uff09\uff1b\u78c1\u76d8\u5206\u533a\u4e0e\u6302\u8f7d\u64cd\u4f5c\uff08fdisk\/parted\u547d\u4ee4\uff09\uff1bLVM\u903b\u8f91\u5377\u7ba1\u7406\uff08PV\/VG\/LV\u521b\u5efa\u4e0e\u6269\u5bb9\uff09\uff1b\u78c1\u76d8\u914d\u989d\u914d\u7f6e\uff08xfs\/ext4\u914d\u989d\uff09\uff1b\u78c1\u76d8\u68c0\u6d4b\u4fee\u590d\uff08fsck\/xfs_repair\uff09\uff1b\u4ee5\u53ca\u6587\u4ef6\u7cfb\u7edf\u5907\u4efd\u6062\u590d\uff08xfsdump\/xfsrestore\uff09\u3002\u901a\u8fc7\u5177\u4f53\u64cd\u4f5c\u6848\u4f8b\uff0c\u8be6\u7ec6\u8bb2\u89e3\u4e86Linux\u73af\u5883","og_url":"https:\/\/www.wsisp.com\/helps\/55962.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-08-14T02:24:31+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250814022429-689d48dd95cd0.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"24 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/55962.html","url":"https:\/\/www.wsisp.com\/helps\/55962.html","name":"\u6df1\u5165\u5256\u6790Linux\u7cfb\u7edf\u78c1\u76d8\u7ba1\u7406 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-08-14T02:24:31+00:00","dateModified":"2025-08-14T02:24:31+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/55962.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/55962.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/55962.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u6df1\u5165\u5256\u6790Linux\u7cfb\u7edf\u78c1\u76d8\u7ba1\u7406"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/55962","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=55962"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/55962\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/55960"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=55962"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=55962"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=55962"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=55962"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}