{"id":90366,"date":"2026-08-05T07:41:02","date_gmt":"2026-08-04T23:41:02","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/90366.html"},"modified":"2026-08-05T07:41:02","modified_gmt":"2026-08-04T23:41:02","slug":"%e6%9c%8d%e5%8a%a1%e5%99%a8%e7%a3%81%e7%9b%98%e6%89%a9%e5%ae%b9%e3%80%81%e6%95%b0%e6%8d%ae%e4%b8%a2%e5%a4%b1%e6%80%8e%e4%b9%88%e5%8a%9e%ef%bc%9f%e4%b8%80%e6%96%87%e5%90%83%e9%80%8f-linux-%e5%88%86","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/90366.html","title":{"rendered":"\u670d\u52a1\u5668\u78c1\u76d8\u6269\u5bb9\u3001\u6570\u636e\u4e22\u5931\u600e\u4e48\u529e\uff1f\u4e00\u6587\u5403\u900f Linux \u5206\u533a \/ \u8f6f RAID\/LVM \u5168\u5b9e\u64cd"},"content":{"rendered":"<h2>CentOS7\u8fd0\u7ef4\u5b9e\u6218&#xff1a;Linux\u786c\u76d8\u5206\u533a\u3001GPT\u3001\u8f6fRAID\u3001LVM\u5168\u89e3<\/h2>\n<h3>\u524d\u8a00<\/h3>\n<p>\u8fd0\u7ef4\u65e5\u5e38\u9ad8\u9891\u96be\u9898&#xff1a;\u8d85\u5927\u78c1\u76d8\u65e0\u6cd5\u5206\u533a\u3001\u78c1\u76d8\u7a7a\u95f4\u65e0\u6cd5\u7075\u6d3b\u6269\u5bb9\u3001\u786c\u76d8\u635f\u574f\u6570\u636e\u4e22\u5931\u3002\u672c\u6587\u5b8c\u6574\u68b3\u7406MBR\/GPT\u5206\u533a\u533a\u522b\u3001gdisk\u3001parted\u5206\u533a\u5b9e\u64cd\u3001mdadm\u8f6fRAID\u9635\u5217\u3001LVM\u903b\u8f91\u5377\u5f39\u6027\u7ba1\u7406\u3001\u78c1\u76d8\u7a7a\u95f4\u4e0d\u8db33\u7c7b\u6545\u969c\u6392\u67e5\u3001\u6c38\u4e45\u6302\u8f7d\u914d\u7f6e&#xff0c;\u5168\u90e8\u547d\u4ee4\u57fa\u4e8eCentOS7\u73af\u5883&#xff0c;\u9010\u6761\u53ef\u590d\u5236\u6267\u884c&#xff0c;\u9644\u5e26\u5b9e\u64cd\u62a5\u9519\u4e0e\u89e3\u51b3\u601d\u8def\u3002<\/p>\n<h3>\u4e00\u3001Linux\u786c\u76d8\u5206\u533a\u7ba1\u7406<\/h3>\n<h4>1.1 GPT\u4e0eMBR\u5206\u533a\u65b9\u6848\u5bf9\u6bd4<\/h4>\n<li>MBR\u5206\u533a<br \/>\n\u4ec5\u652f\u6301\u6700\u59272TiB\u78c1\u76d8&#xff0c;\u6700\u591a15\u4e2a\u5206\u533a&#xff0c;\u65e0\u5206\u533a\u5907\u4efd&#xff0c;\u78c1\u76d8\u635f\u574f\u6781\u6613\u4e22\u5931\u5206\u533a\u8868&#xff0c;\u8001\u65e7BIOS\u517c\u5bb9\u3002<\/li>\n<li>GPT\u5206\u533a<br \/>\nUEFI\u6807\u51c6\u5206\u533a\u683c\u5f0f&#xff0c;8\u5b57\u8282\u6247\u533a\u8ba1\u6570&#xff0c;\u6700\u5927\u652f\u630118ZiB\u78c1\u76d8&#xff1b;\u9ed8\u8ba4\u652f\u6301128\u4e2a\u5206\u533a&#xff1b;\u5206\u533a\u8868\u591a\u4efd\u5197\u4f59\u5907\u4efd&#xff0c;\u81ea\u5e26CRC\u6821\u9a8c&#xff0c;\u635f\u574f\u53ef\u81ea\u52a8\u4fee\u590d&#xff0c;\u662f\u5927\u5bb9\u91cf\u786c\u76d8\u9996\u9009\u3002<\/li>\n<h4>1.2 GPT\u5206\u533a\u8868\u7ed3\u6784<\/h4>\n<ul>\n<li>LBA0 \u4fdd\u62a4\u6027MBR&#xff1a;\u5b58\u653e\u5f15\u5bfc\u7a0b\u5e8f&#xff0c;\u6807\u8bb00xEE\u6807\u8bc6GPT\u78c1\u76d8&#xff0c;\u9632\u6b62\u8001\u65e7\u5de5\u5177\u8bef\u7be1\u6539\u5206\u533a\u3002<\/li>\n<li>LBA1 GPT\u8868\u5934&#xff1a;\u8bb0\u5f55\u5206\u533a\u8868\u4f4d\u7f6e\u3001\u5907\u4efd\u5730\u5740\u3001CRC\u6821\u9a8c\u7801&#xff0c;\u7528\u4e8e\u5206\u533a\u635f\u574f\u6821\u9a8c\u6062\u590d\u3002<\/li>\n<li>LBA2~LBA33&#xff1a;\u5206\u533a\u6761\u76ee\u533a&#xff0c;32\u4e2aLBA&#xff0c;\u6bcf\u4e2aLBA4\u7ec4\u6761\u76ee&#xff0c;\u5408\u8ba1128\u7ec4\u5206\u533a\u8bb0\u5f55&#xff0c;\u5355\u6761\u5206\u533a\u8bb0\u5f55128\u5b57\u8282\u3002<\/li>\n<\/ul>\n<p>\u6ce8\u610f&#xff1a;\u7406\u8bba128\u4e2a\u5206\u533a&#xff0c;\u65e5\u5e38\u8d85\u8fc7120\u4e2a\u6613\u51fa\u73b0\u683c\u5f0f\u5316\u5f02\u5e38\u3002<\/p>\n<h4>1.3 gdisk \u5de5\u5177&#xff08;GPT\u4e13\u5c5e\u5206\u533a\u5de5\u5177&#xff09;<\/h4>\n<p>\u9002\u7528&#xff1a;2T\u4ee5\u4e0a\u78c1\u76d8GPT\u5206\u533a\u7ba1\u7406<\/p>\n<h5>\u57fa\u7840\u8bed\u6cd5<\/h5>\n<p><span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:10:05<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># gdisk [ -l ] \u78c1\u76d8\u8bbe\u5907\u540d<\/span><\/p>\n<h5>(1&#xff09;\u67e5\u770b\u78c1\u76d8\u5206\u533a\u8868<\/h5>\n<p><span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:10:12<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># gdisk -l \/dev\/sdb<\/span><br \/>\nGPT <span class=\"token function\">fdisk<\/span> <span class=\"token punctuation\">(<\/span>gdisk<span class=\"token punctuation\">)<\/span> version <span class=\"token number\">0.8<\/span>.10<\/p>\n<p>Partition table scan:<br \/>\n  MBR: MBR only<br \/>\n  BSD: not present<br \/>\n  APM: not present<br \/>\n  GPT: not present<\/p>\n<p>***************************************************************<br \/>\nFound invalid GPT and valid MBR<span class=\"token punctuation\">;<\/span> converting MBR to GPT <span class=\"token function\">format<\/span><br \/>\n<span class=\"token keyword\">in<\/span> memory.<br \/>\n***************************************************************<\/p>\n<p>Disk \/dev\/sdb: <span class=\"token number\">41943040<\/span> sectors, <span class=\"token number\">20.0<\/span> GiB<br \/>\nLogical sector size: <span class=\"token number\">512<\/span> bytes<br \/>\nDisk identifier <span class=\"token punctuation\">(<\/span>GUID<span class=\"token punctuation\">)<\/span>: 1038836E-C6BD-48D3-A490-8FFF2133146B<br \/>\nPartition table holds up to <span class=\"token number\">128<\/span> entries<br \/>\nFirst usable sector is <span class=\"token number\">34<\/span>, last usable sector is <span class=\"token number\">41943006<\/span><br \/>\nPartitions will be aligned on <span class=\"token number\">2048<\/span>-sector boundaries<br \/>\nTotal <span class=\"token function\">free<\/span> space is <span class=\"token number\">41942973<\/span> sectors <span class=\"token punctuation\">(<\/span><span class=\"token number\">20.0<\/span> GiB<span class=\"token punctuation\">)<\/span><\/p>\n<p>Number  Start <span class=\"token punctuation\">(<\/span>sector<span class=\"token punctuation\">)<\/span>    End <span class=\"token punctuation\">(<\/span>sector<span class=\"token punctuation\">)<\/span>  Size       Code  Name<\/p>\n<h5>(2&#xff09;MBR\u8f6cGPT\u5206\u533a<\/h5>\n<p><span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:10:30<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># gdisk \/dev\/sdb<\/span><br \/>\nGPT <span class=\"token function\">fdisk<\/span> <span class=\"token punctuation\">(<\/span>gdisk<span class=\"token punctuation\">)<\/span> version <span class=\"token number\">0.8<\/span>.10<\/p>\n<p>Partition table scan:<br \/>\n  MBR: MBR only<br \/>\n  BSD: not present<br \/>\n  APM: not present<br \/>\n  GPT: not present<\/p>\n<p>***************************************************************<br \/>\nFound invalid GPT and valid MBR<span class=\"token punctuation\">;<\/span> converting MBR to GPT <span class=\"token function\">format<\/span><br \/>\n<span class=\"token keyword\">in<\/span> memory. THIS OPERATION IS POTENTIALLY DESTRUCTIVE<span class=\"token operator\">!<\/span> Exit by<br \/>\ntyping <span class=\"token string\">&#039;q&#039;<\/span> <span class=\"token keyword\">if<\/span> you don<span class=\"token string\">&#039;t want to convert your MBR partitions<br \/>\nto GPT format!<br \/>\n***************************************************************<\/p>\n<p># \u8f93\u5165?\u67e5\u770b\u5168\u90e8\u6307\u4ee4<br \/>\nCommand (? for help): ?<br \/>\nb   back up GPT data to a file<br \/>\nc   change a partition&#039;<\/span>s name<br \/>\nd   delete a partition<br \/>\ni   show detailed information on a partition<br \/>\nl   list known partition types<br \/>\nn   <span class=\"token function\">add<\/span> a new partition<br \/>\no   create a new empty GUID partition table <span class=\"token punctuation\">(<\/span>GPT<span class=\"token punctuation\">)<\/span><br \/>\np   print the partition table<br \/>\nq   quit without saving changes<br \/>\nr   recovery and transformation options <span class=\"token punctuation\">(<\/span>experts only<span class=\"token punctuation\">)<\/span><br \/>\ns   <span class=\"token function\">sort<\/span> partitions<br \/>\nt   change a partition&#039;s <span class=\"token builtin class-name\">type<\/span> code<br \/>\n<span class=\"token function\">v<\/span>   verify disk<br \/>\nw   <span class=\"token function\">write<\/span> table to disk and <span class=\"token builtin class-name\">exit<\/span><br \/>\nx   extra functionality <span class=\"token punctuation\">(<\/span>experts only<span class=\"token punctuation\">)<\/span><br \/>\n?   print this menu<\/p>\n<p><span class=\"token comment\"># o \u6e05\u7a7a\u91cd\u5efaGPT\u5206\u533a\u8868<\/span><br \/>\nCommand <span class=\"token punctuation\">(<\/span>? <span class=\"token keyword\">for<\/span> <span class=\"token builtin class-name\">help<\/span><span class=\"token punctuation\">)<\/span>: o<br \/>\nThis option deletes all partitions and creates a new protective MBR.<br \/>\nProceed? <span class=\"token punctuation\">(<\/span>Y\/N<span class=\"token punctuation\">)<\/span>: Y<\/p>\n<p><span class=\"token comment\"># p\u67e5\u770b\u5206\u533a\u8868<\/span><br \/>\nCommand <span class=\"token punctuation\">(<\/span>? <span class=\"token keyword\">for<\/span> <span class=\"token builtin class-name\">help<\/span><span class=\"token punctuation\">)<\/span>: p<br \/>\nDisk \/dev\/sdb: <span class=\"token number\">41943040<\/span> sectors, <span class=\"token number\">20.0<\/span> GiB<br \/>\nLogical sector size: <span class=\"token number\">512<\/span> bytes<br \/>\nDisk identifier <span class=\"token punctuation\">(<\/span>GUID<span class=\"token punctuation\">)<\/span>: 99FE6E5F-8316-428D-BA81-D824C786CC43<br \/>\nPartition table holds up to <span class=\"token number\">128<\/span> entries<br \/>\nFirst usable sector is <span class=\"token number\">34<\/span>, last usable sector is <span class=\"token number\">41943006<\/span><br \/>\nPartitions will be aligned on <span class=\"token number\">2048<\/span>-sector boundaries<br \/>\nTotal <span class=\"token function\">free<\/span> space is <span class=\"token number\">41942973<\/span> sectors <span class=\"token punctuation\">(<\/span><span class=\"token number\">20.0<\/span> GiB<span class=\"token punctuation\">)<\/span><\/p>\n<p>Number  Start <span class=\"token punctuation\">(<\/span>sector<span class=\"token punctuation\">)<\/span>    End <span class=\"token punctuation\">(<\/span>sector<span class=\"token punctuation\">)<\/span>  Size       Code  Name<\/p>\n<p><span class=\"token comment\"># w\u4fdd\u5b58\u9000\u51fa&#xff0c;q\u653e\u5f03\u4fee\u6539<\/span><br \/>\nCommand <span class=\"token punctuation\">(<\/span>? <span class=\"token keyword\">for<\/span> <span class=\"token builtin class-name\">help<\/span><span class=\"token punctuation\">)<\/span>: w<br \/>\nFinal checks complete. About to <span class=\"token function\">write<\/span> GPT data. THIS WILL OVERWRITE EXISTING<br \/>\nPARTITIONS<span class=\"token operator\">!<\/span><span class=\"token operator\">!<\/span><br \/>\nDo you want to proceed? <span class=\"token punctuation\">(<\/span>Y\/N<span class=\"token punctuation\">)<\/span>: Y<br \/>\nOK<span class=\"token punctuation\">;<\/span> writing new GUID partition table <span class=\"token punctuation\">(<\/span>GPT<span class=\"token punctuation\">)<\/span> to \/dev\/sdb.<br \/>\nThe operation has completed successfully.<\/p>\n<h5>(3&#xff09;\u65b0\u5efaGPT\u5206\u533a<\/h5>\n<p><span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:11:25<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># gdisk \/dev\/sdb<\/span><br \/>\nGPT <span class=\"token function\">fdisk<\/span> <span class=\"token punctuation\">(<\/span>gdisk<span class=\"token punctuation\">)<\/span> version <span class=\"token number\">0.8<\/span>.10<br \/>\nPartition table scan:<br \/>\n  MBR: protective<br \/>\n  BSD: not present<br \/>\n  APM: not present<br \/>\n  GPT: present<br \/>\nFound valid GPT with protective MBR<span class=\"token punctuation\">;<\/span> using GPT.<\/p>\n<p>Command <span class=\"token punctuation\">(<\/span>? <span class=\"token keyword\">for<\/span> <span class=\"token builtin class-name\">help<\/span><span class=\"token punctuation\">)<\/span>: n<br \/>\nPartition number <span class=\"token punctuation\">(<\/span><span class=\"token number\">1<\/span>-128, default <span class=\"token number\">1<\/span><span class=\"token punctuation\">)<\/span>: \u56de\u8f66<br \/>\nFirst sector <span class=\"token punctuation\">(<\/span><span class=\"token number\">34<\/span>-41943006, default <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">2048<\/span><span class=\"token punctuation\">)<\/span> or <span class=\"token punctuation\">{<\/span>&#043;-<span class=\"token punctuation\">}<\/span>size<span class=\"token punctuation\">{<\/span>KMGTP<span class=\"token punctuation\">}<\/span>: \u56de\u8f66<br \/>\nLast sector <span class=\"token punctuation\">(<\/span><span class=\"token number\">2048<\/span>-41943006, default <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">41943006<\/span><span class=\"token punctuation\">)<\/span> or <span class=\"token punctuation\">{<\/span>&#043;-<span class=\"token punctuation\">}<\/span>size<span class=\"token punctuation\">{<\/span>KMGTP<span class=\"token punctuation\">}<\/span>: &#043;2G<br \/>\nCurrent <span class=\"token builtin class-name\">type<\/span> is <span class=\"token string\">&#039;Linux filesystem&#039;<\/span><\/p>\n<p><span class=\"token comment\"># L\u67e5\u770b\u5206\u533a\u7c7b\u578b\u7f16\u7801<\/span><br \/>\nHex code or GUID <span class=\"token punctuation\">(<\/span>L to show codes, Enter <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">8300<\/span><span class=\"token punctuation\">)<\/span>: L<br \/>\n0700 Microsoft basic data  0c01 Microsoft reserved    <span class=\"token number\">2700<\/span> Windows RE<br \/>\n<span class=\"token number\">3000<\/span> ONIE boot             <span class=\"token number\">3001<\/span> ONIE config           <span class=\"token number\">4100<\/span> PowerPC PReP boot<br \/>\n<span class=\"token number\">4200<\/span> Windows LDM data      <span class=\"token number\">4201<\/span> Windows LDM metadata  <span class=\"token number\">7501<\/span> IBM GPFS<br \/>\n7f00 ChromeOS kernel       7f01 ChromeOS root         7f02 ChromeOS reserved<br \/>\n<span class=\"token number\">8200<\/span> Linux swap            <span class=\"token number\">8300<\/span> Linux filesystem      <span class=\"token number\">8301<\/span> Linux reserved<br \/>\n<span class=\"token number\">8302<\/span> Linux \/home           <span class=\"token number\">8400<\/span> Intel Rapid Start     8e00 Linux LVM<br \/>\na500 FreeBSD disklabel     a501 FreeBSD boot          a502 FreeBSD swap<br \/>\na503 FreeBSD UFS           a504 FreeBSD ZFS           a505 FreeBSD Vinum\/RAID<br \/>\na580 Midnight BSD data     a581 Midnight BSD boot     a582 Midnight BSD swap<br \/>\na583 Midnight BSD UFS      a584 Midnight BSD ZFS      a585 Midnight BSD Vinum<br \/>\na800 Apple UFS             a901 NetBSD swap           a902 NetBSD FFS<br \/>\na903 NetBSD LFS            a904 NetBSD concatenated   a905 NetBSD encrypted<br \/>\na906 NetBSD RAID           ab00 Apple boot            af00 Apple HFS\/HFS&#043;<br \/>\naf01 Apple RAID            af02 Apple RAID offline    af03 Apple label<br \/>\naf04 AppleTV recovery      af05 Apple Core Storage    be00 Solaris boot<br \/>\nbf00 Solaris root          bf01 Solaris \/usr <span class=\"token operator\">&amp;<\/span> Mac Z  bf02 Solaris swap<br \/>\nbf03 Solaris backup        bf04 Solaris \/var          bf05 Solaris \/home<br \/>\nbf06 Solaris alternate se  bf07 Solaris Reserved <span class=\"token number\">1<\/span>    bf08 Solaris Reserved <span class=\"token number\">2<\/span><br \/>\nbf09 Solaris Reserved <span class=\"token number\">3<\/span>    bf0a Solaris Reserved <span class=\"token number\">4<\/span>    bf0b Solaris Reserved <span class=\"token number\">5<\/span><br \/>\nc001 HP-UX data            c002 HP-UX <span class=\"token function\">service<\/span>         ea00 Freedesktop <span class=\"token variable\">$BOOT<\/span><br \/>\neb00 Haiku BFS             ed00 Sony system partitio  ed01 Lenovo system partit<br \/>\nPress the <span class=\"token operator\">&lt;<\/span>Enter<span class=\"token operator\">&gt;<\/span> key to see <span class=\"token function\">more<\/span> codes:\u56de\u8f66<br \/>\nef00 EFI System            ef01 MBR partition scheme  ef02 BIOS boot partition<br \/>\nfb00 VMWare VMFS           fb01 VMWare reserved       fc00 VMWare kcore crash p<br \/>\nfd00 Linux RAID            <\/p>\n<p><span class=\"token comment\"># \u56de\u8f66\u9ed8\u8ba4Linux\u6587\u4ef6\u7cfb\u7edf8300<\/span><br \/>\nHex code or GUID <span class=\"token punctuation\">(<\/span>L to show codes, Enter <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">8300<\/span><span class=\"token punctuation\">)<\/span>: \u56de\u8f66<br \/>\nChanged <span class=\"token builtin class-name\">type<\/span> of partition to <span class=\"token string\">&#039;Linux filesystem&#039;<\/span><\/p>\n<p><span class=\"token comment\"># \u67e5\u770b\u5206\u533a<\/span><br \/>\nCommand <span class=\"token punctuation\">(<\/span>? <span class=\"token keyword\">for<\/span> <span class=\"token builtin class-name\">help<\/span><span class=\"token punctuation\">)<\/span>: p<br \/>\nDisk \/dev\/sdb: <span class=\"token number\">41943040<\/span> sectors, <span class=\"token number\">20.0<\/span> GiB<br \/>\nLogical sector size: <span class=\"token number\">512<\/span> bytes<br \/>\nDisk identifier <span class=\"token punctuation\">(<\/span>GUID<span class=\"token punctuation\">)<\/span>: 1A3D170A-56FC-4655-8B9C-01E1B89294FE<br \/>\nPartition table holds up to <span class=\"token number\">128<\/span> entries<br \/>\nFirst usable sector is <span class=\"token number\">34<\/span>, last usable sector is <span class=\"token number\">41943006<\/span><br \/>\nPartitions will be aligned on <span class=\"token number\">2048<\/span>-sector boundaries<br \/>\nTotal <span class=\"token function\">free<\/span> space is <span class=\"token number\">37748669<\/span> sectors <span class=\"token punctuation\">(<\/span><span class=\"token number\">18.0<\/span> GiB<span class=\"token punctuation\">)<\/span><\/p>\n<p>Number  Start <span class=\"token punctuation\">(<\/span>sector<span class=\"token punctuation\">)<\/span>    End <span class=\"token punctuation\">(<\/span>sector<span class=\"token punctuation\">)<\/span>  Size       Code  Name<br \/>\n   <span class=\"token number\">1<\/span>            <span class=\"token number\">2048<\/span>         <span class=\"token number\">4196351<\/span>   <span class=\"token number\">2.0<\/span> GiB     <span class=\"token number\">8300<\/span>  Linux filesystem<\/p>\n<h5>(4&#xff09;\u4fee\u6539\u5206\u533a\u540d\u79f0\u3001\u67e5\u770b\u8be6\u60c5\u3001\u5220\u9664\u5206\u533a<\/h5>\n<p><span class=\"token comment\"># \u4fee\u6539\u5206\u533a\u540d<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:12:10<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># gdisk \/dev\/sdb<\/span><br \/>\nCommand <span class=\"token punctuation\">(<\/span>? <span class=\"token keyword\">for<\/span> <span class=\"token builtin class-name\">help<\/span><span class=\"token punctuation\">)<\/span>: c<br \/>\nUsing <span class=\"token number\">1<\/span><br \/>\nEnter name: data01<br \/>\nCommand <span class=\"token punctuation\">(<\/span>? <span class=\"token keyword\">for<\/span> <span class=\"token builtin class-name\">help<\/span><span class=\"token punctuation\">)<\/span>: p<br \/>\nNumber  Start <span class=\"token punctuation\">(<\/span>sector<span class=\"token punctuation\">)<\/span>    End <span class=\"token punctuation\">(<\/span>sector<span class=\"token punctuation\">)<\/span>  Size       Code  Name<br \/>\n   <span class=\"token number\">1<\/span>            <span class=\"token number\">2048<\/span>         <span class=\"token number\">4196351<\/span>   <span class=\"token number\">2.0<\/span> GiB     <span class=\"token number\">8300<\/span>  data01<\/p>\n<p><span class=\"token comment\"># \u67e5\u770b\u5206\u533a\u8be6\u7ec6\u4fe1\u606f<\/span><br \/>\nCommand <span class=\"token punctuation\">(<\/span>? <span class=\"token keyword\">for<\/span> <span class=\"token builtin class-name\">help<\/span><span class=\"token punctuation\">)<\/span>: i<br \/>\nUsing <span class=\"token number\">1<\/span><br \/>\nPartition GUID code: 0FC63DAF-8483-4772-8E79-3D69D8477DE4 <span class=\"token punctuation\">(<\/span>Linux filesystem<span class=\"token punctuation\">)<\/span><br \/>\nPartition unique GUID: 19AE5CDC-1AB2-4EBA-B9E2-AE9E7BF42653<br \/>\nFirst sector: <span class=\"token number\">2048<\/span> <span class=\"token punctuation\">(<\/span>at <span class=\"token number\">1024.0<\/span> KiB<span class=\"token punctuation\">)<\/span><br \/>\nLast sector: <span class=\"token number\">4196351<\/span> <span class=\"token punctuation\">(<\/span>at <span class=\"token number\">2.0<\/span> GiB<span class=\"token punctuation\">)<\/span><br \/>\nPartition size: <span class=\"token number\">4194304<\/span> sectors <span class=\"token punctuation\">(<\/span><span class=\"token number\">2.0<\/span> GiB<span class=\"token punctuation\">)<\/span><br \/>\nAttribute flags: 0000000000000000<br \/>\nPartition name: <span class=\"token string\">&#039;data01&#039;<\/span><\/p>\n<p><span class=\"token comment\"># \u5220\u9664\u5206\u533a<\/span><br \/>\nCommand <span class=\"token punctuation\">(<\/span>? <span class=\"token keyword\">for<\/span> <span class=\"token builtin class-name\">help<\/span><span class=\"token punctuation\">)<\/span>: d<br \/>\nUsing <span class=\"token number\">1<\/span><br \/>\nCommand <span class=\"token punctuation\">(<\/span>? <span class=\"token keyword\">for<\/span> <span class=\"token builtin class-name\">help<\/span><span class=\"token punctuation\">)<\/span>: p<br \/>\nNumber  Start <span class=\"token punctuation\">(<\/span>sector<span class=\"token punctuation\">)<\/span>    End <span class=\"token punctuation\">(<\/span>sector<span class=\"token punctuation\">)<\/span>  Size       Code  Name<br \/>\nCommand <span class=\"token punctuation\">(<\/span>? <span class=\"token keyword\">for<\/span> <span class=\"token builtin class-name\">help<\/span><span class=\"token punctuation\">)<\/span>: w<br \/>\nDo you want to proceed? <span class=\"token punctuation\">(<\/span>Y\/N<span class=\"token punctuation\">)<\/span>: Y<\/p>\n<h4>1.4 wipefs \u6e05\u9664\u78c1\u76d8\u6807\u8bc6<\/h4>\n<p>\u4f5c\u7528&#xff1a;\u6e05\u7a7a\u78c1\u76d8\u5206\u533a\u8868\u3001\u6587\u4ef6\u7cfb\u7edf\u6807\u8bb0&#xff0c;\u7528\u4e8e\u78c1\u76d8\u521d\u59cb\u5316<\/p>\n<p><span class=\"token comment\"># \u67e5\u770b\u78c1\u76d8\u6587\u4ef6\u7cfb\u7edf\/\u5206\u533a\u6807\u8bb0<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:12:50<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># wipefs \/dev\/sdb<\/span><br \/>\n<span class=\"token comment\"># \u5b89\u5168\u6e05\u7a7a\u5168\u90e8\u6807\u8bb0<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:12:58<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># wipefs -a \/dev\/sdb<\/span><br \/>\n<span class=\"token comment\"># \u5f3a\u5236\u6e05\u7a7a&#xff08;\u4e0d\u63a8\u8350&#xff0c;\u4ec5\u7d27\u6025\u4f7f\u7528&#xff09;<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:13:05<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># wipefs -fa \/dev\/sdb<\/span><\/p>\n<h4>1.5 parted \u901a\u7528\u5206\u533a\u5de5\u5177&#xff08;\u517c\u5bb9MBR\/GPT&#xff0c;\u652f\u6301\u4ea4\u4e92\u5f0f&#043;\u811a\u672c\u514d\u4ea4\u4e92&#xff09;<\/h4>\n<h5>\u4ea4\u4e92\u5f0f\u64cd\u4f5c<\/h5>\n<p><span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:13:20<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># parted \/dev\/sdb<\/span><br \/>\nGNU Parted <span class=\"token number\">3.1<\/span><br \/>\nUsing \/dev\/sdb<br \/>\nWelcome to GNU Parted<span class=\"token operator\">!<\/span> Type <span class=\"token string\">&#039;help&#039;<\/span> to view a list of commands.<br \/>\n<span class=\"token punctuation\">(<\/span>parted<span class=\"token punctuation\">)<\/span> <span class=\"token builtin class-name\">help<\/span><br \/>\n  align-check TYPE N                        check partition N <span class=\"token keyword\">for<\/span> TYPE<span class=\"token punctuation\">(<\/span>min<span class=\"token operator\">|<\/span>opt<span class=\"token punctuation\">)<\/span> alignment<br \/>\n  <span class=\"token builtin class-name\">help<\/span> <span class=\"token punctuation\">[<\/span>COMMAND<span class=\"token punctuation\">]<\/span>                           print general help, or <span class=\"token builtin class-name\">help<\/span> on COMMAND<br \/>\n  mklabel,mktable LABEL-TYPE               create a new disklabel <span class=\"token punctuation\">(<\/span>partition table<span class=\"token punctuation\">)<\/span><br \/>\n  mkpart PART-TYPE <span class=\"token punctuation\">[<\/span>FS-TYPE<span class=\"token punctuation\">]<\/span> START END     <span class=\"token function\">make<\/span> a partition<br \/>\n  name NUMBER NAME                         name partition NUMBER as NAME<br \/>\n  print <span class=\"token punctuation\">[<\/span>devices<span class=\"token operator\">|<\/span><span class=\"token function\">free<\/span><span class=\"token operator\">|<\/span>list,all<span class=\"token operator\">|<\/span>NUMBER<span class=\"token punctuation\">]<\/span>     display the partition table, available devices,<br \/>\n        <span class=\"token function\">free<\/span> space, all found partitions, or a particular partition<br \/>\n  quit                                     <span class=\"token builtin class-name\">exit<\/span> program<br \/>\n  rescue START END                         rescue a lost partition near START and END<br \/>\n  resizepart NUMBER END                    resize partition NUMBER<br \/>\n  <span class=\"token function\">rm<\/span> NUMBER                                delete partition NUMBER<br \/>\n  <span class=\"token keyword\">select<\/span> DEVICE                            choose the device to edit<br \/>\n  disk_set FLAG STATE                      change the FLAG on selected device<br \/>\n  disk_toggle <span class=\"token punctuation\">[<\/span>FLAG<span class=\"token punctuation\">]<\/span>                       toggle the state of FLAG on selected device<br \/>\n  <span class=\"token builtin class-name\">set<\/span> NUMBER FLAG STATE                    change the FLAG on partition NUMBER<br \/>\n  toggle <span class=\"token punctuation\">[<\/span>NUMBER <span class=\"token punctuation\">[<\/span>FLAG<span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">]<\/span>                   toggle the state of FLAG on partition NUMBER<br \/>\n  unit UNIT                                <span class=\"token builtin class-name\">set<\/span> the default unit to UNIT<br \/>\n  version                                  display the version number and copyright<br \/>\n        information of GNU Parted<\/p>\n<p><span class=\"token comment\"># \u67e5\u770b\u5206\u533a\u8868<\/span><br \/>\n<span class=\"token punctuation\">(<\/span>parted<span class=\"token punctuation\">)<\/span> print<br \/>\nModel: VMware, VMware Virtual S <span class=\"token punctuation\">(<\/span>scsi<span class=\"token punctuation\">)<\/span><br \/>\nDisk \/dev\/sdb: <span class=\"token number\">21<\/span>.5GB<br \/>\nSector size <span class=\"token punctuation\">(<\/span>logical\/physical<span class=\"token punctuation\">)<\/span>: 512B\/512B<br \/>\nPartition Table: gpt<br \/>\nDisk Flags:<br \/>\nNumber  Start  End  Size  File system  Name  Flags<\/p>\n<p><span class=\"token comment\"># \u8bbe\u5b9a\u5355\u4f4dMiB<\/span><br \/>\n<span class=\"token punctuation\">(<\/span>parted<span class=\"token punctuation\">)<\/span> unit MiB<\/p>\n<p><span class=\"token comment\"># \u5207\u6362MBR(msdos)\u5206\u533a\u8868<\/span><br \/>\n<span class=\"token punctuation\">(<\/span>parted<span class=\"token punctuation\">)<\/span> mklabel msdos<br \/>\nWarning: The existing disk label on \/dev\/sdb will be destroyed and all data on this disk will be lost. Do you want to continue?<br \/>\nYes\/No? y<br \/>\n<span class=\"token punctuation\">(<\/span>parted<span class=\"token punctuation\">)<\/span> print<br \/>\nPartition Table: msdos<\/p>\n<p><span class=\"token comment\"># \u521b\u5efa\u4e3b\u5206\u533a<\/span><br \/>\n<span class=\"token punctuation\">(<\/span>parted<span class=\"token punctuation\">)<\/span> mkpart<br \/>\nPartition type?  primary\/extended? primary<br \/>\nFile system type?  <span class=\"token punctuation\">[<\/span>ext2<span class=\"token punctuation\">]<\/span>? xfs<br \/>\nStart? <span class=\"token number\">1<\/span><br \/>\nEnd? <span class=\"token number\">2049<\/span><br \/>\n<span class=\"token punctuation\">(<\/span>parted<span class=\"token punctuation\">)<\/span> print<br \/>\nNumber  Start    End      Size     Type     File system  Flags<br \/>\n <span class=\"token number\">1<\/span>      <span class=\"token number\">1<\/span>.00MiB  2049MiB  2048MiB  primary  xfs<\/p>\n<p><span class=\"token comment\"># \u6269\u5bb9\u5206\u533a<\/span><br \/>\n<span class=\"token punctuation\">(<\/span>parted<span class=\"token punctuation\">)<\/span> resizepart <span class=\"token number\">1<\/span> <span class=\"token number\">4097<\/span><br \/>\n<span class=\"token punctuation\">(<\/span>parted<span class=\"token punctuation\">)<\/span> print<br \/>\nNumber  Start    End      Size     Type     File system  Flags<br \/>\n <span class=\"token number\">1<\/span>      <span class=\"token number\">1<\/span>.00MiB  4097MiB  4096MiB  primary  xfs<\/p>\n<p><span class=\"token comment\"># \u5220\u9664\u5206\u533a<\/span><br \/>\n<span class=\"token punctuation\">(<\/span>parted<span class=\"token punctuation\">)<\/span> <span class=\"token function\">rm<\/span> <span class=\"token number\">1<\/span><br \/>\n<span class=\"token punctuation\">(<\/span>parted<span class=\"token punctuation\">)<\/span> print<\/p>\n<h5>\u514d\u4ea4\u4e92\u811a\u672c\u64cd\u4f5c<\/h5>\n<p><span class=\"token comment\"># \u6539\u4e3aMBR\u5206\u533a\u8868<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:14:10<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># parted \/dev\/sdb mklabel msdos<\/span><br \/>\nYes\/No? y<br \/>\n<span class=\"token comment\"># \u67e5\u770b\u5206\u533a<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:14:18<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># parted \/dev\/sdb unit MiB print<\/span><br \/>\n<span class=\"token comment\"># \u521b\u5efa2G\u4e3b\u5206\u533a<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:14:26<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># parted \/dev\/sdb unit MiB mkpart primary 1 2049<\/span><br \/>\n<span class=\"token comment\"># \u6269\u5bb9\u5206\u533a<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:14:35<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># parted \/dev\/sdb unit MiB resizepart 1 5121<\/span><br \/>\n<span class=\"token comment\"># \u5220\u9664\u5206\u533a<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:14:42<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># parted \/dev\/sdb rm 1<\/span><\/p>\n<h5>parted\u7ba1\u7406GPT\u78c1\u76d8<\/h5>\n<p><span class=\"token comment\"># \u5207\u6362GPT\u5206\u533a\u8868<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:15:00<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># parted \/dev\/sdb mklabel gpt<\/span><br \/>\nYes\/No? y<br \/>\n<span class=\"token punctuation\">(<\/span>parted<span class=\"token punctuation\">)<\/span> unit MiB<br \/>\n<span class=\"token punctuation\">(<\/span>parted<span class=\"token punctuation\">)<\/span> mkpart<br \/>\nPartition name?  <span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">]<\/span>? data01<br \/>\nFile system type?  <span class=\"token punctuation\">[<\/span>ext2<span class=\"token punctuation\">]<\/span>? xfs<br \/>\nStart? <span class=\"token number\">1<\/span><br \/>\nEnd? <span class=\"token number\">2049<\/span><br \/>\n<span class=\"token punctuation\">(<\/span>parted<span class=\"token punctuation\">)<\/span> print<br \/>\nNumber  Start    End      Size     File system  Name    Flags<br \/>\n <span class=\"token number\">1<\/span>      <span class=\"token number\">1<\/span>.00MiB  2049MiB  2048MiB  xfs          data01<\/p>\n<h3>\u4e8c\u3001\u6587\u4ef6\u7cfb\u7edf\u6c38\u4e45\u6302\u8f7d \/etc\/fstab<\/h3>\n<h4>\u73af\u5883\u51c6\u5907<\/h4>\n<p><span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:15:30<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># parted \/dev\/sdb mklabel gpt<\/span><br \/>\nYes\/No? y<br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:15:38<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># parted \/dev\/sdb unit MiB mkpart data01 xfs 1 2049<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:15:46<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># mkfs.xfs \/dev\/sdb1<\/span><br \/>\n<span class=\"token comment\"># \u5df2\u6709\u6587\u4ef6\u7cfb\u7edf\u5f3a\u5236\u683c\u5f0f\u5316<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:15:52<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># mkfs.xfs -f \/dev\/sdb1<\/span><\/p>\n<h4>\/etc\/fstab \u516d\u5b57\u6bb5\u8be6\u89e3<\/h4>\n<li>\u8bbe\u5907&#xff1a;UUID\/\u8bbe\u5907\u540d&#xff08;\u63a8\u8350UUID&#xff0c;\u8bbe\u5907\u540d\u6613\u53d8\u52a8&#xff09;<\/li>\n<li>\u6302\u8f7d\u70b9&#xff1a;\u5fc5\u987b\u5b58\u5728\u7a7a\u76ee\u5f55<\/li>\n<li>\u6587\u4ef6\u7cfb\u7edf&#xff1a;xfs\/ext4\u7b49<\/li>\n<li>\u6302\u8f7d\u53c2\u6570&#xff1a;defaults\u901a\u7528\u9ed8\u8ba4\u53c2\u6570<\/li>\n<li>dump\u5907\u4efd&#xff1a;0&#061;\u4e0d\u5907\u4efd&#xff0c;1&#061;\u5907\u4efd<\/li>\n<li>fsck\u81ea\u68c0&#xff1a;xfs\u56fa\u5b9a0&#xff1b;\u6839ext4\u586b1&#xff0c;\u5176\u4ed6ext4\u586b2<\/li>\n<h4>\u5b9e\u64cd\u914d\u7f6e<\/h4>\n<p><span class=\"token comment\"># \u67e5\u770b\u5206\u533aUUID<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:16:10<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># blkid \/dev\/sdb1<\/span><br \/>\n\/dev\/sdb1: <span class=\"token assign-left variable\">UUID<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;f5c35f10-0274-45af-b044-73694989fe01&#034;<\/span> <span class=\"token assign-left variable\">TYPE<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;xfs&#034;<\/span> <span class=\"token assign-left variable\">PARTLABEL<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;data01&#034;<\/span> <span class=\"token assign-left variable\">PARTUUID<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;432d7d79-1a08-4429-bf38-7ab1444a0ab9&#034;<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:16:18<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># mkdir \/data01<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:16:25<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># vim \/etc\/fstab<\/span><br \/>\n<span class=\"token comment\"># \u672b\u5c3e\u8ffd\u52a0<\/span><br \/>\n<span class=\"token assign-left variable\">UUID<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;f5c35f10-0274-45af-b044-73694989fe01&#034;<\/span> \/data01 xfs defaults <span class=\"token number\">0<\/span> <span class=\"token number\">0<\/span><\/p>\n<p><span class=\"token comment\"># \u751f\u6548\u6302\u8f7d<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:16:35<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># mount \/data01<\/span><br \/>\n<span class=\"token comment\"># \u9a8c\u8bc1<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:16:42<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># df -h \/data01<\/span><br \/>\n<span class=\"token comment\"># \u53d6\u6d88\u6c38\u4e45\u6302\u8f7d&#xff1a;\u5220\u9664fstab\u5bf9\u5e94\u884c\u5373\u53ef<\/span><\/p>\n<h3>\u4e09\u3001\u78c1\u76d8\u7a7a\u95f4\u4e0d\u8db33\u7c7b\u7ecf\u5178\u6545\u969c\u6392\u67e5<\/h3>\n<h4>\u573a\u666f1&#xff1a;\u5927\u6587\u4ef6\u5360\u7528\u7a7a\u95f4\u7206\u6ee1<\/h4>\n<p><span class=\"token comment\"># \u6a21\u62df\u585e\u6ee1\u78c1\u76d8<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:17:00<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># dd if&#061;\/dev\/zero of&#061;\/myapp-1\/etc\/bigfile bs&#061;1M count&#061;2000<\/span><br \/>\n<span class=\"token comment\"># \u67e5\u627e\u8d85\u5927\u6587\u4ef6<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:17:10<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># find \/myapp-1\/ -size &#043;100M<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:17:18<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># du -s \/myapp-1\/* |sort -n |tail -2<\/span><br \/>\n<span class=\"token comment\"># \u5220\u9664\u91ca\u653e\u7a7a\u95f4<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:17:26<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># rm -f \/myapp-1\/etc\/bigfile<\/span><\/p>\n<h4>\u573a\u666f2&#xff1a;\u6587\u4ef6\u5220\u9664\u4f46\u8fdb\u7a0b\u5360\u7528&#xff0c;\u7a7a\u95f4\u4e0d\u91ca\u653e<\/h4>\n<p>\u539f\u56e0&#xff1a;\u6587\u4ef6\u5df2\u5220\u9664&#xff0c;\u4f46\u8fdb\u7a0b\u6301\u7eed\u5360\u7528\u53e5\u67c4&#xff0c;\u7a7a\u95f4\u4e0d\u56de\u6536<\/p>\n<p><span class=\"token comment\"># \u67e5\u627e\u5df2\u5220\u9664\u5360\u7528\u6587\u4ef6<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:17:45<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># lsof |grep delete |grep \/myapp-1<\/span><br \/>\n<span class=\"token comment\"># \u6740\u6389\u5360\u7528\u8fdb\u7a0bPID<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:17:52<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># kill \u5bf9\u5e94PID<\/span><br \/>\n<span class=\"token comment\"># \u7a33\u59a5\u6e05\u7406&#xff1a;\u4f18\u5148&gt;\u6e05\u7a7a\u6587\u4ef6&#xff0c;\u518d\u5220\u9664<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:18:00<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># &gt; \/myapp-1\/etc\/bigfile<\/span><\/p>\n<h4>\u573a\u666f3&#xff1a;\u5c0f\u6587\u4ef6\u8fc7\u591a&#xff0c;inode\u8017\u5c3d<\/h4>\n<p>df-h\u7a7a\u95f4\u5145\u8db3&#xff0c;\u4f46\u65e0\u6cd5\u65b0\u5efa\u6587\u4ef6&#xff0c;df-i\u67e5\u770binode\u5360\u6ee1<\/p>\n<p><span class=\"token comment\"># \u67e5\u770binode\u4f7f\u7528\u91cf<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:18:15<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># df -hi \/myapp-2<\/span><br \/>\n<span class=\"token comment\"># \u65b9\u68481&#xff1a;\u6279\u91cf\u5220\u9664\u65e0\u7528\u5c0f\u6587\u4ef6<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:18:22<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># rm -f \/myapp-2\/file-0*<\/span><br \/>\n<span class=\"token comment\"># \u65b9\u68482&#xff1a;\u6253\u5305\u5408\u5e76\u5c0f\u6587\u4ef6\u91ca\u653einode<\/span><\/p>\n<h3>\u56db\u3001RAID\u78c1\u76d8\u9635\u5217\u8be6\u89e3\u4e0emdadm\u8f6fRAID\u5b9e\u64cd<\/h3>\n<h4>4.1 RAID\u57fa\u7840\u6982\u5ff5<\/h4>\n<ul>\n<li>\u786cRAID&#xff1a;\u72ec\u7acb\u9635\u5217\u5361&#xff0c;\u4e0d\u5360\u7528CPU&#xff0c;\u6027\u80fd\u7a33\u5b9a&#xff0c;\u4f01\u4e1a\u751f\u4ea7\u9996\u9009<\/li>\n<li>\u8f6fRAID&#xff1a;mdadm\u8f6f\u4ef6\u5b9e\u73b0&#xff0c;\u5360\u7528CPU&#xff0c;\u96f6\u6210\u672c&#xff0c;\u5b66\u4e60\u6d4b\u8bd5\u4f7f\u7528<\/li>\n<\/ul>\n<h4>4.2 \u4e3b\u6d41RAID\u7b49\u7ea7\u5bf9\u7167\u8868<\/h4>\n<table>\n<tr>RAID\u7ea7\u522b\u6700\u5c0f\u78c1\u76d8\u6570\u5bb9\u9519\u80fd\u529b\u7a7a\u95f4\u5229\u7528\u7387\u8bfb\u6027\u80fd\u5199\u6027\u80fd\u9002\u7528\u573a\u666f<\/tr>\n<tbody>\n<tr>\n<td>RAID0<\/td>\n<td>2<\/td>\n<td>\u65e0<\/td>\n<td>100%<\/td>\n<td>\u6781\u9ad8<\/td>\n<td>\u6781\u9ad8<\/td>\n<td>\u4e34\u65f6\u9ad8\u901f\u7f13\u5b58&#xff0c;\u4e0d\u5b58\u91cd\u8981\u6570\u636e<\/td>\n<\/tr>\n<tr>\n<td>RAID1<\/td>\n<td>2<\/td>\n<td>\u5355\u76d8\u635f\u574f<\/td>\n<td>50%<\/td>\n<td>\u9ad8<\/td>\n<td>\u4e00\u822c<\/td>\n<td>\u6838\u5fc3\u6570\u636e\u3001\u7cfb\u7edf\u76d8<\/td>\n<\/tr>\n<tr>\n<td>RAID5<\/td>\n<td>3<\/td>\n<td>\u5355\u76d8\u635f\u574f<\/td>\n<td>(n-1)\/n<\/td>\n<td>\u4e2d\u9ad8<\/td>\n<td>\u4e00\u822c<\/td>\n<td>\u666e\u901a\u4e1a\u52a1\u6587\u4ef6\u670d\u52a1\u5668<\/td>\n<\/tr>\n<tr>\n<td>RAID6<\/td>\n<td>4<\/td>\n<td>\u53cc\u76d8\u635f\u574f<\/td>\n<td>(n-2)\/n<\/td>\n<td>\u4e2d<\/td>\n<td>\u504f\u4f4e<\/td>\n<td>\u5927\u5bb9\u91cf\u5f52\u6863\u5b58\u50a8<\/td>\n<\/tr>\n<tr>\n<td>RAID10<\/td>\n<td>4<\/td>\n<td>\u6bcf\u7ec4\u5355\u76d8\u635f\u574f<\/td>\n<td>50%<\/td>\n<td>\u6781\u9ad8<\/td>\n<td>\u9ad8<\/td>\n<td>\u6570\u636e\u5e93\u3001\u9ad8\u5e76\u53d1\u4e1a\u52a1<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>4.3 mdadm \u8f6fRAID\u5b9e\u64cd<\/h4>\n<h5>\u524d\u7f6e\u5b89\u88c5<\/h5>\n<p><span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:19:00<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># yum install -y mdadm<\/span><\/p>\n<h6>\u5b9e\u64cd1&#xff1a;RAID0 \u521b\u5efa\u3001\u67e5\u770b\u3001\u5220\u9664<\/h6>\n<p><span class=\"token comment\"># \u521b\u5efa\/dev\/md0 RAID0&#xff0c;2\u5757\u78c1\u76d8<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:19:10<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># mdadm &#8211;create \/dev\/md0 &#8211;level 0 &#8211;raid-devices 2 \/dev\/sd{b,c}<\/span><br \/>\n<span class=\"token comment\"># \u67e5\u770b\u9635\u5217\u6982\u89c8<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:19:18<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># cat \/proc\/mdstat<\/span><br \/>\n<span class=\"token comment\"># \u8be6\u7ec6\u4fe1\u606f<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:19:25<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># mdadm &#8211;detail \/dev\/md0<\/span><br \/>\n<span class=\"token comment\"># \u683c\u5f0f\u5316\u6302\u8f7d<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:19:32<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># mkfs.xfs \/dev\/md0<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:19:40<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># mkdir \/raid\/raid0 &amp;&amp; mount \/dev\/md0 \/raid\/raid0<\/span><\/p>\n<p><span class=\"token comment\"># \u5220\u9664RAID0<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:19:50<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># umount \/raid\/raid0<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:19:58<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># mdadm &#8211;stop \/dev\/md0<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:20:05<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># mdadm &#8211;zero-superblock \/dev\/sd{b,c}<\/span><br \/>\n<span class=\"token comment\"># \u9650\u5236&#xff1a;RAID0\u65e0\u6cd5\u6269\u5bb9\u3001\u65e0\u6cd5\u6545\u969c\u964d\u7ea7<\/span><\/p>\n<h6>\u5b9e\u64cd2&#xff1a;RAID1 \u955c\u50cf\u9635\u5217\u3001\u70ed\u5907\u3001\u6545\u969c\u6062\u590d<\/h6>\n<p><span class=\"token comment\"># \u521b\u5efaRAID1<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:20:20<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># mdadm &#8211;create \/dev\/md1 &#8211;level 1 &#8211;raid-devices 2 \/dev\/sd{b,c}<\/span><br \/>\n<span class=\"token comment\"># \u6dfb\u52a0\u70ed\u5907\u76d8<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:20:30<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># mdadm &#8211;add \/dev\/md1 \/dev\/sdd<\/span><br \/>\n<span class=\"token comment\"># \u6a21\u62df\u78c1\u76d8\u6545\u969c<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:20:40<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># mdadm &#8211;fail \/dev\/md1 \/dev\/sdc<\/span><br \/>\n<span class=\"token comment\"># \u79fb\u9664\u574f\u76d8<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:20:48<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># mdadm &#8211;remove \/dev\/md1 \/dev\/sdc<\/span><br \/>\n<span class=\"token comment\"># \u9500\u6bc1\u9635\u5217<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:20:55<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># umount \/raid\/raid1 &amp;&amp; mdadm &#8211;stop \/dev\/md1 &amp;&amp; mdadm &#8211;zero-superblock \/dev\/sd{b..d}<\/span><\/p>\n<h6>\u5b9e\u64cd3&#xff1a;RAID5 \u6269\u5bb9\u3001\u6545\u969c\u91cd\u5efa<\/h6>\n<p><span class=\"token comment\"># 4\u5757\u78c1\u76d8\u521b\u5efaRAID5<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:21:10<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># mdadm &#8211;create \/dev\/md5 &#8211;level 5 &#8211;raid-devices 4 \/dev\/sd{b..e}<\/span><br \/>\n<span class=\"token comment\"># \u6dfb\u52a0\u70ed\u5907\u76d8<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:21:20<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># mdadm &#8211;add \/dev\/md5 \/dev\/sdf<\/span><br \/>\n<span class=\"token comment\"># \u6a21\u62df\u6545\u969c\u66ff\u6362\u78c1\u76d8<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:21:30<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># mdadm &#8211;fail \/dev\/md5 \/dev\/sdb &amp;&amp; mdadm &#8211;remove \/dev\/md5 \/dev\/sdb<\/span><br \/>\n<span class=\"token comment\"># RAID5\u5728\u7ebf\u6269\u5bb9<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:21:40<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># mdadm &#8211;add \/dev\/md5 \/dev\/sdb \/dev\/sdg<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:21:48<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># mdadm &#8211;grow \/dev\/md5 &#8211;raid-devices 5<\/span><br \/>\n<span class=\"token comment\"># \u6587\u4ef6\u7cfb\u7edf\u6269\u5bb9<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:21:58<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># xfs_growfs \/raid\/raid5<\/span><br \/>\n<span class=\"token comment\"># \u9635\u5217\u9500\u6bc1<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:22:05<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># umount \/raid\/raid5 &amp;&amp; mdadm &#8211;stop \/dev\/md5 &amp;&amp; mdadm &#8211;zero-superblock \/dev\/sd{b..g}<\/span><\/p>\n<h3>\u4e94\u3001LVM\u903b\u8f91\u5377\u7ba1\u7406&#xff08;\u5f39\u6027\u6269\u5bb9\u7f29\u5bb9\u6838\u5fc3&#xff09;<\/h3>\n<h4>5.1 \u6838\u5fc3\u5c42\u7ea7<\/h4>\n<p>PV\u7269\u7406\u5377 \u2192 VG\u5377\u7ec4&#xff08;\u5b58\u50a8\u6c60&#xff09; \u2192 LV\u903b\u8f91\u5377&#xff08;\u6302\u8f7d\u4f7f\u7528&#xff09;<\/p>\n<ul>\n<li>PV&#xff1a;\u78c1\u76d8\/\u5206\u533a\u521d\u59cb\u5316LVM\u6807\u8bc6<\/li>\n<li>VG&#xff1a;\u591a\u4e2aPV\u5408\u5e76\u4e3a\u7edf\u4e00\u5927\u5bb9\u91cf\u5b58\u50a8\u6c60<\/li>\n<li>LV&#xff1a;\u4eceVG\u5212\u5206\u7a7a\u95f4&#xff0c;\u53ef\u968f\u65f6\u6269\u5bb9\u3001\u7f29\u5bb9\u3001\u5feb\u7167<\/li>\n<\/ul>\n<h4>5.2 \u57fa\u7840\u521b\u5efa\u6d41\u7a0b<\/h4>\n<p><span class=\"token comment\"># 1\u3001\u521b\u5efaPV<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:22:30<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># pvcreate \/dev\/sd{b,c,d}<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:22:38<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># pvs &amp;&amp; pvdisplay<\/span><\/p>\n<p><span class=\"token comment\"># 2\u3001\u521b\u5efaVG\u5377\u7ec4<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:22:45<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># vgcreate webapp \/dev\/sdb<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:22:52<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># vgcreate dbapp \/dev\/sd{c,d}<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:22:58<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># vgs &amp;&amp; vgdisplay<\/span><\/p>\n<p><span class=\"token comment\"># 3\u3001\u521b\u5efaLV\u903b\u8f91\u5377<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:23:05<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># lvcreate -n webapp01 -L 5G webapp<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:23:12<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># lvcreate -n data01 -L 25G dbapp<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:23:18<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># lvs &amp;&amp; lvdisplay<\/span><\/p>\n<p><span class=\"token comment\"># 4\u3001\u683c\u5f0f\u5316\u6302\u8f7d<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:23:25<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># mkfs.xfs \/dev\/webapp\/webapp01<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:23:32<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># mount \/dev\/webapp\/webapp01 \/usr\/share\/nginx\/html<\/span><\/p>\n<h4>5.3 VG\u5377\u7ec4\u6269\u5bb9\u3001\u7f29\u5bb9<\/h4>\n<p><span class=\"token comment\"># VG\u6269\u5bb9&#xff0c;\u65b0\u589e\u78c1\u76d8\u52a0\u5165\u5377\u7ec4<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:23:45<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># vgextend webapp \/dev\/sd{c,d}<\/span><\/p>\n<p><span class=\"token comment\"># VG\u7f29\u5bb9&#xff0c;\u8fc1\u79fb\u6570\u636e\u540e\u79fb\u9664PV<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:23:55<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># pvmove \/dev\/sdb<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:24:02<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># vgreduce webapp \/dev\/sdb<\/span><\/p>\n<h4>5.4 LV\u903b\u8f91\u5377\u6269\u5bb9\u3001\u7f29\u5bb9<\/h4>\n<p><span class=\"token comment\"># LV\u6269\u5bb9&#043;\u81ea\u52a8\u5237\u65b0XFS\u6587\u4ef6\u7cfb\u7edf<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:24:15<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># lvextend -rL 20G \/dev\/webapp\/webapp01<\/span><\/p>\n<p><span class=\"token comment\"># EXT4\u79bb\u7ebf\u7f29\u5bb9\u6d41\u7a0b<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:24:25<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># umount \/usr\/share\/nginx\/html<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:24:32<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># e2fsck -f \/dev\/webapp\/webapp01<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:24:40<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># resize2fs \/dev\/webapp\/webapp01 10G<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:24:48<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># lvreduce -L 10G \/dev\/webapp\/webapp01<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:24:55<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># mount \/dev\/webapp\/webapp01 \/usr\/share\/nginx\/html<\/span><br \/>\n<span class=\"token comment\"># XFS\u4e0d\u652f\u6301\u7f29\u5bb9&#xff0c;\u4ec5\u53ef\u6269\u5bb9<\/span><\/p>\n<h4>5.5 LVM\u5feb\u7167\u5907\u4efd<\/h4>\n<p><span class=\"token comment\"># \u521b\u5efa\u5feb\u7167&#xff08;\u5bb9\u91cf\u4e0d\u5c0f\u4e8e\u539fLV&#xff09;<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:25:10<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># lvcreate -s -n webapp01-snap1 -L 10G \/dev\/webapp\/webapp01<\/span><br \/>\n<span class=\"token comment\"># \u6302\u8f7d\u5feb\u7167\u67e5\u770b\u5386\u53f2\u6570\u636e<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:25:18<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># mount \/dev\/webapp\/webapp01-snap1 \/webapp\/snap\/<\/span><\/p>\n<h4>5.6 LVM RAID\u903b\u8f91\u5377<\/h4>\n<p><span class=\"token comment\"># \u521b\u5efaRAID1\u903b\u8f91\u5377<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:25:30<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># lvcreate &#8211;type raid1 -n webapp01 -L 15G webapp<\/span><br \/>\n<span class=\"token comment\"># \u6545\u969c\u78c1\u76d8\u4fee\u590d\u66ff\u6362<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:25:40<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># vgreduce &#8211;removemissing webapp &#8211;force<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:25:48<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># vgextend webapp \/dev\/sdd<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:25:55<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># lvconvert &#8211;repair \/dev\/webapp\/webapp01<\/span><\/p>\n<h4>5.7 \u5168\u5957\u5220\u9664\u6e05\u7406<\/h4>\n<p><span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:26:10<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># umount \/usr\/share\/nginx\/html<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:26:18<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># lvremove \/dev\/webapp\/webapp01<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:26:25<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># vgremove webapp dbapp<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server~ <span class=\"token number\">20<\/span>:26:32<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># pvremove \/dev\/sd{b..d}<\/span><\/p>\n<h3>\u603b\u7ed3<\/h3>\n<li>\u5927\u4e8e2T\u78c1\u76d8\u7edf\u4e00\u4f7f\u7528GPT&#043;gdisk\u5206\u533a&#xff0c;\u65e5\u5e38\u5feb\u901f\u5206\u533a\u7528parted&#xff1b;<\/li>\n<li>\u91cd\u8981\u6570\u636e\u9009RAID1\/RAID10&#xff0c;\u5927\u5bb9\u91cf\u5b58\u50a8\u9009RAID5\/6&#xff0c;\u4e34\u65f6\u9ad8\u901f\u5b58\u50a8\u7528RAID0&#xff1b;<\/li>\n<li>LVM\u662f\u6269\u5bb9\u521a\u9700&#xff1a;XFS\u53ea\u6269\u5bb9\u3001EXT4\u53ef\u79bb\u7ebf\u7f29\u5bb9&#xff0c;\u5feb\u7167\u9002\u5408\u4e34\u65f6\u6570\u636e\u5907\u4efd&#xff1b;<\/li>\n<li>\u6c38\u4e45\u6302\u8f7d\u4f18\u5148UUID\u5199\u5165fstab&#xff0c;\u78c1\u76d8\u7206\u6ee1\u4f18\u5148\u6392\u67e5\u5927\u6587\u4ef6\u3001\u5220\u9664\u6b8b\u7559\u53e5\u67c4\u3001inode\u8017\u5c3d\u4e09\u7c7b\u95ee\u9898\u3002<\/li>\n","protected":false},"excerpt":{"rendered":"<p>CentOS7\u8fd0\u7ef4\u5b9e\u6218&#xff1a;Linux\u786c\u76d8\u5206\u533a\u3001GPT\u3001\u8f6fRAID\u3001LVM\u5168\u89e3<br \/>\n\u524d\u8a00<br \/>\n\u8fd0\u7ef4\u65e5\u5e38\u9ad8\u9891\u96be\u9898&#xff1a;\u8d85\u5927\u78c1\u76d8\u65e0\u6cd5\u5206\u533a\u3001\u78c1\u76d8\u7a7a\u95f4\u65e0\u6cd5\u7075\u6d3b\u6269\u5bb9\u3001\u786c\u76d8\u635f\u574f\u6570\u636e\u4e22\u5931\u3002\u672c\u6587\u5b8c\u6574\u68b3\u7406MBR\/GPT\u5206\u533a\u533a\u522b\u3001gdisk\u3001parted\u5206\u533a\u5b9e\u64cd\u3001mdadm\u8f6fRAID\u9635\u5217\u3001LVM\u903b\u8f91\u5377\u5f39\u6027\u7ba1\u7406\u3001\u78c1\u76d8\u7a7a\u95f4\u4e0d\u8db33\u7c7b\u6545\u969c\u6392\u67e5\u3001\u6c38\u4e45\u6302\u8f7d\u914d\u7f6e&#xff0c;\u5168\u90e8\u547d\u4ee4\u57fa\u4e8eCentOS7\u73af\u5883&#xff0c;\u9010\u6761\u53ef\u590d\u5236\u6267\u884c&#xff0c;\u9644\u5e26\u5b9e\u64cd\u62a5\u9519\u4e0e\u89e3\u51b3\u601d\u8def\u3002<br \/>\n\u4e00\u3001Linux\u786c\u76d8\u5206<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[97,87,43,44],"topic":[],"class_list":["post-90366","post","type-post","status-publish","format-standard","hentry","category-server","tag-97","tag-87","tag-43","tag-44"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u670d\u52a1\u5668\u78c1\u76d8\u6269\u5bb9\u3001\u6570\u636e\u4e22\u5931\u600e\u4e48\u529e\uff1f\u4e00\u6587\u5403\u900f Linux \u5206\u533a \/ \u8f6f RAID\/LVM \u5168\u5b9e\u64cd - \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\/90366.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u670d\u52a1\u5668\u78c1\u76d8\u6269\u5bb9\u3001\u6570\u636e\u4e22\u5931\u600e\u4e48\u529e\uff1f\u4e00\u6587\u5403\u900f Linux \u5206\u533a \/ \u8f6f RAID\/LVM \u5168\u5b9e\u64cd - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"CentOS7\u8fd0\u7ef4\u5b9e\u6218&#xff1a;Linux\u786c\u76d8\u5206\u533a\u3001GPT\u3001\u8f6fRAID\u3001LVM\u5168\u89e3 \u524d\u8a00 \u8fd0\u7ef4\u65e5\u5e38\u9ad8\u9891\u96be\u9898&#xff1a;\u8d85\u5927\u78c1\u76d8\u65e0\u6cd5\u5206\u533a\u3001\u78c1\u76d8\u7a7a\u95f4\u65e0\u6cd5\u7075\u6d3b\u6269\u5bb9\u3001\u786c\u76d8\u635f\u574f\u6570\u636e\u4e22\u5931\u3002\u672c\u6587\u5b8c\u6574\u68b3\u7406MBR\/GPT\u5206\u533a\u533a\u522b\u3001gdisk\u3001parted\u5206\u533a\u5b9e\u64cd\u3001mdadm\u8f6fRAID\u9635\u5217\u3001LVM\u903b\u8f91\u5377\u5f39\u6027\u7ba1\u7406\u3001\u78c1\u76d8\u7a7a\u95f4\u4e0d\u8db33\u7c7b\u6545\u969c\u6392\u67e5\u3001\u6c38\u4e45\u6302\u8f7d\u914d\u7f6e&#xff0c;\u5168\u90e8\u547d\u4ee4\u57fa\u4e8eCentOS7\u73af\u5883&#xff0c;\u9010\u6761\u53ef\u590d\u5236\u6267\u884c&#xff0c;\u9644\u5e26\u5b9e\u64cd\u62a5\u9519\u4e0e\u89e3\u51b3\u601d\u8def\u3002 \u4e00\u3001Linux\u786c\u76d8\u5206\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/90366.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-08-04T23:41:02+00:00\" \/>\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=\"11 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/90366.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/90366.html\",\"name\":\"\u670d\u52a1\u5668\u78c1\u76d8\u6269\u5bb9\u3001\u6570\u636e\u4e22\u5931\u600e\u4e48\u529e\uff1f\u4e00\u6587\u5403\u900f Linux \u5206\u533a \/ \u8f6f RAID\/LVM \u5168\u5b9e\u64cd - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-08-04T23:41:02+00:00\",\"dateModified\":\"2026-08-04T23:41:02+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/90366.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/90366.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/90366.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u670d\u52a1\u5668\u78c1\u76d8\u6269\u5bb9\u3001\u6570\u636e\u4e22\u5931\u600e\u4e48\u529e\uff1f\u4e00\u6587\u5403\u900f Linux \u5206\u533a \/ \u8f6f RAID\/LVM \u5168\u5b9e\u64cd\"}]},{\"@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":"\u670d\u52a1\u5668\u78c1\u76d8\u6269\u5bb9\u3001\u6570\u636e\u4e22\u5931\u600e\u4e48\u529e\uff1f\u4e00\u6587\u5403\u900f Linux \u5206\u533a \/ \u8f6f RAID\/LVM \u5168\u5b9e\u64cd - \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\/90366.html","og_locale":"zh_CN","og_type":"article","og_title":"\u670d\u52a1\u5668\u78c1\u76d8\u6269\u5bb9\u3001\u6570\u636e\u4e22\u5931\u600e\u4e48\u529e\uff1f\u4e00\u6587\u5403\u900f Linux \u5206\u533a \/ \u8f6f RAID\/LVM \u5168\u5b9e\u64cd - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"CentOS7\u8fd0\u7ef4\u5b9e\u6218&#xff1a;Linux\u786c\u76d8\u5206\u533a\u3001GPT\u3001\u8f6fRAID\u3001LVM\u5168\u89e3 \u524d\u8a00 \u8fd0\u7ef4\u65e5\u5e38\u9ad8\u9891\u96be\u9898&#xff1a;\u8d85\u5927\u78c1\u76d8\u65e0\u6cd5\u5206\u533a\u3001\u78c1\u76d8\u7a7a\u95f4\u65e0\u6cd5\u7075\u6d3b\u6269\u5bb9\u3001\u786c\u76d8\u635f\u574f\u6570\u636e\u4e22\u5931\u3002\u672c\u6587\u5b8c\u6574\u68b3\u7406MBR\/GPT\u5206\u533a\u533a\u522b\u3001gdisk\u3001parted\u5206\u533a\u5b9e\u64cd\u3001mdadm\u8f6fRAID\u9635\u5217\u3001LVM\u903b\u8f91\u5377\u5f39\u6027\u7ba1\u7406\u3001\u78c1\u76d8\u7a7a\u95f4\u4e0d\u8db33\u7c7b\u6545\u969c\u6392\u67e5\u3001\u6c38\u4e45\u6302\u8f7d\u914d\u7f6e&#xff0c;\u5168\u90e8\u547d\u4ee4\u57fa\u4e8eCentOS7\u73af\u5883&#xff0c;\u9010\u6761\u53ef\u590d\u5236\u6267\u884c&#xff0c;\u9644\u5e26\u5b9e\u64cd\u62a5\u9519\u4e0e\u89e3\u51b3\u601d\u8def\u3002 \u4e00\u3001Linux\u786c\u76d8\u5206","og_url":"https:\/\/www.wsisp.com\/helps\/90366.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-08-04T23:41:02+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"11 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/90366.html","url":"https:\/\/www.wsisp.com\/helps\/90366.html","name":"\u670d\u52a1\u5668\u78c1\u76d8\u6269\u5bb9\u3001\u6570\u636e\u4e22\u5931\u600e\u4e48\u529e\uff1f\u4e00\u6587\u5403\u900f Linux \u5206\u533a \/ \u8f6f RAID\/LVM \u5168\u5b9e\u64cd - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-08-04T23:41:02+00:00","dateModified":"2026-08-04T23:41:02+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/90366.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/90366.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/90366.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u670d\u52a1\u5668\u78c1\u76d8\u6269\u5bb9\u3001\u6570\u636e\u4e22\u5931\u600e\u4e48\u529e\uff1f\u4e00\u6587\u5403\u900f Linux \u5206\u533a \/ \u8f6f RAID\/LVM \u5168\u5b9e\u64cd"}]},{"@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\/90366","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=90366"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/90366\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=90366"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=90366"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=90366"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=90366"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}