{"id":5356,"date":"2026-08-19T21:41:36","date_gmt":"2026-08-19T13:41:36","guid":{"rendered":"https:\/\/dasmz.com\/?p=5356"},"modified":"2026-08-19T22:16:44","modified_gmt":"2026-08-19T14:16:44","slug":"lvm-ext4%e7%9a%84%e6%96%87%e4%bb%b6%e7%b3%bb%e7%bb%9f%e6%bb%a1%e4%ba%86%e5%90%8e%e7%9a%84%e5%9c%a8%e7%ba%bf%e7%83%ad%e6%89%a9%e5%ae%b9","status":"publish","type":"post","link":"https:\/\/dasmz.com\/?p=5356","title":{"rendered":"LVM\u7684\u6587\u4ef6\u7cfb\u7edf\u6ee1\u4e86\u540e\u7684\u5728\u7ebf\u70ed\u6269\u5bb9"},"content":{"rendered":"\n<p><strong>\u524d\u7f00\u3001\u6587\u6863\u4fee\u6539\u8bb0\u5f55<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">20250819 \u521d\u59cb\u5316\u7f16\u8f91\u6b64\u6587\u7ae0\uff0c\u5b8c\u7a3f<\/pre>\n\n\n\n<p><strong>\u7ae0\u82821\u3001\u9700\u6c42\u63cf\u8ff0<\/strong><\/p>\n\n\n\n<p>\u5c34\u5c2c\uff0c\u5c0f\u6c14\uff0c\u5206\u4e861\u4e2a12G\u78c1\u76d8\u7684\u6587\u4ef6\u6700\u5c0f\u955c\u50cf\uff0c\u89e3\u538b\u6211\u4e00\u4e2a\u5b57\u4f53\u5305\uff0c\u7cfb\u7edf\u5206\u533a\u5c31\u6ee1\u4e86\uff0c\u56e0\u4e3a\u662f\u90e8\u7f72\u5728PVE\u865a\u62df\u5316\u73af\u5883\uff0c\u76f4\u63a5\u70ed\u5347\u7ea7\u5bb9\u91cf\u5373\u53ef\u3002\u7cfb\u7edf\u4e3aDebian\u9ed8\u8ba4\u5b89\u88c5\u6587\u4ef6\u5206\u533a\u3002<\/p>\n\n\n\n<p><strong>\u7ae0\u82822\u3001\u6269\u5bb9\u6b65\u9aa4<\/strong><\/p>\n\n\n\n<p>\u5728\u4f4d\u7f6e\u4e3a \u865a\u62df\u673a\/Hardware\u786c\u4ef6\/Disk Action\u78c1\u76d8\u64cd\u4f5c\/\u6539\u5927\u5c0fResize \uff0c\u8f93\u516530G\uff0c\u5c06\u539f\u6765\u768412G\u78c1\u76d8\u6269\u5bb9\u523042GB<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-style-default\"><img decoding=\"async\" loading=\"lazy\" width=\"594\" height=\"241\" src=\"https:\/\/dasmz.com\/wp-content\/uploads\/2026\/08\/Screenshot-from-2026-08-19-21-40-14.png\" alt=\"\" class=\"wp-image-5357\"\/><\/figure>\n\n\n\n<p>\u5728\u7cfb\u7edf\u5185\uff0c\u901a\u8fc7lsblk\u547d\u4ee4\uff0c\u67e5\u770b\uff0c\u53ef\u770b\u5230 sda\u78c1\u76d8\uff0c\u5df2\u7ecf\u662f42G\u7684\u5bb9\u91cf\u4e86\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-style-default\"><img decoding=\"async\" loading=\"lazy\" width=\"545\" height=\"186\" src=\"https:\/\/dasmz.com\/wp-content\/uploads\/2026\/08\/Screenshot-from-2026-08-19-21-41-59.png\" alt=\"\" class=\"wp-image-5359\"\/><\/figure>\n\n\n\n<p>\u67e5\u770b\u5f53\u524d\u5206\u533a\u60c5\u51b5 parted \/dev\/sda print  \u6216\u8005 fdisk -l \/dev\/sda<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-style-default\"><img decoding=\"async\" loading=\"lazy\" width=\"554\" height=\"255\" src=\"https:\/\/dasmz.com\/wp-content\/uploads\/2026\/08\/Screenshot-from-2026-08-19-21-47-49.png\" alt=\"\" class=\"wp-image-5361\"\/><\/figure>\n\n\n\n<p>\u6269\u7684\u6b65\u9aa4\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\u6269\u786c\u76d8 \n\u2193 \n\u6269sda2 extended \n\u2193 \n\u6269sda5 logical \n\u2193 \npvresize \n\u2193 \nlvextend \n\u2193\n\u6269\u6587\u4ef6\u7cfb\u7edf<\/pre>\n\n\n\n<p>\u4f7f\u7528\u66f4\u73b0\u4ee3\u5316\u7684parted\u6765\u6267\u884c\u76f8\u5173\u78c1\u76d8\u64cd\u4f5c<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">root@server~# <strong>apt install parted<\/strong><\/pre>\n\n\n\n<p>\u6269\u5bb9\u5206\u533a parted \/dev\/sda<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">root@server~# <strong>parted \/dev\/sda<\/strong>\nGNU Parted 3.5\nUsing \/dev\/sda\nWelcome to GNU Parted! Type 'help' to view a list of commands.\n(parted) print                                                            \nModel: QEMU QEMU HARDDISK (scsi)\nDisk \/dev\/sda: 45.1GB\nSector size (logical\/physical): 512B\/512B\nPartition Table: msdos\nDisk Flags: \n\nNumber  Start   End     Size    Type      File system  Flags\n 1      1049kB  512MB   511MB   primary   ext2         boot\n 2      513MB   12.9GB  12.4GB  extended\n 5      513MB   12.9GB  12.4GB  logical                lvm\n\n<strong>(parted) resizepart 2 100% <\/strong>                                               \n<strong>(parted) print     <\/strong>                                                       \nModel: QEMU QEMU HARDDISK (scsi)\nDisk \/dev\/sda: 45.1GB\nSector size (logical\/physical): 512B\/512B\nPartition Table: msdos\nDisk Flags: \n\nNumber  Start   End     Size    Type      File system  Flags\n 1      1049kB  512MB   511MB   primary   ext2         boot\n 2      513MB   45.1GB  44.6GB  extended\n 5      513MB   12.9GB  12.4GB  logical                lvm\n\n(parted)                                                                  \n\nInformation: You may need to update \/etc\/fstab.\n\nroot@server~# <\/pre>\n\n\n\n<p>\u91cd\u65b0\u8bfb\u53d6\u5206\u533a\u8868<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">root@server~# <strong>partprobe \/dev\/sda<\/strong><\/pre>\n\n\n\n<p>\u786e\u8ba4 sda2 \u5df2\u6269\u5bb9 lsblk \u548c parted \/dev\/sda print<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-style-default\"><img decoding=\"async\" loading=\"lazy\" width=\"548\" height=\"396\" src=\"https:\/\/dasmz.com\/wp-content\/uploads\/2026\/08\/Screenshot-from-2026-08-19-22-00-46.png\" alt=\"\" class=\"wp-image-5376\"\/><\/figure>\n\n\n\n<p>\u6269\u5bb9 sda5<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">root@server~# parted \/dev\/sda \nGNU Parted 3.5\nUsing \/dev\/sda\nWelcome to GNU Parted! Type 'help' to view a list of commands.\n(parted) resizepart 5 100%   \n(parted) print                                                            \nModel: QEMU QEMU HARDDISK (scsi)\nDisk \/dev\/sda: 45.1GB\nSector size (logical\/physical): 512B\/512B\nPartition Table: msdos\nDisk Flags: \n\nNumber  Start   End     Size    Type      File system  Flags\n 1      1049kB  512MB   511MB   primary   ext2         boot\n 2      513MB   45.1GB  44.6GB  extended\n 5      513MB   45.1GB  44.6GB  logical                lvm\n(parted) <\/pre>\n\n\n\n<p>\u6269\u5bb9 LVM PV\u5377<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">root@server~# pvresize \/dev\/sda5\n  Physical volume \"\/dev\/sda5\" changed\n  1 physical volume(s) resized or updated \/ 0 physical volume(s) not resized\nroot@server~# pvs\n  PV         VG        Fmt  Attr PSize   PFree \n  \/dev\/sda5  Chrome-vg lvm2 a--  &lt;41.52g 30.00g\nroot@server~# <\/pre>\n\n\n\n<figure class=\"wp-block-image size-full is-style-default\"><img decoding=\"async\" loading=\"lazy\" width=\"698\" height=\"124\" src=\"https:\/\/dasmz.com\/wp-content\/uploads\/2026\/08\/Screenshot-from-2026-08-19-22-08-33.png\" alt=\"\" class=\"wp-image-5386\" srcset=\"https:\/\/dasmz.com\/wp-content\/uploads\/2026\/08\/Screenshot-from-2026-08-19-22-08-33.png 698w, https:\/\/dasmz.com\/wp-content\/uploads\/2026\/08\/Screenshot-from-2026-08-19-22-08-33-624x111.png 624w\" sizes=\"(max-width: 698px) 100vw, 698px\" \/><\/figure>\n\n\n\n<p>\u6269\u5bb9LVM LV\u5377<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">root@server~# lvextend -l +100%FREE \/dev\/mapper\/Chrome--vg-root\n  Size of logical volume Chrome-vg\/root changed from 10.56 GiB (2704 extents) to 40.56 GiB (10384 extents).\n  Logical volume Chrome-vg\/root successfully resized.\nroot@server~# <\/pre>\n\n\n\n<figure class=\"wp-block-image size-full is-style-default\"><img decoding=\"async\" loading=\"lazy\" width=\"716\" height=\"92\" src=\"https:\/\/dasmz.com\/wp-content\/uploads\/2026\/08\/Screenshot-from-2026-08-19-22-10-51.png\" alt=\"\" class=\"wp-image-5389\" srcset=\"https:\/\/dasmz.com\/wp-content\/uploads\/2026\/08\/Screenshot-from-2026-08-19-22-10-51.png 716w, https:\/\/dasmz.com\/wp-content\/uploads\/2026\/08\/Screenshot-from-2026-08-19-22-10-51-624x80.png 624w\" sizes=\"(max-width: 716px) 100vw, 716px\" \/><\/figure>\n\n\n\n<p>\u6269\u5bb9\u6587\u4ef6\u7cfb\u7edf<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\u770b\u6587\u4ef6\u7cfb\u7edf\u7c7b\u578b\uff1a\n\u5982\u679c\u4e3a ext4 \u6587\u4ef6\u7cfb\u7edf resize2fs \/dev\/mapper\/Chrome--vg-root\n\u5982\u679c\u4e3a xfs \u6587\u4ef6\u7cfb\u7edf xfs_growfs \/<\/pre>\n\n\n\n<figure class=\"wp-block-image size-full is-style-default\"><img decoding=\"async\" loading=\"lazy\" width=\"779\" height=\"450\" src=\"https:\/\/dasmz.com\/wp-content\/uploads\/2026\/08\/Screenshot-from-2026-08-19-22-15-02.png\" alt=\"\" class=\"wp-image-5394\" srcset=\"https:\/\/dasmz.com\/wp-content\/uploads\/2026\/08\/Screenshot-from-2026-08-19-22-15-02.png 779w, https:\/\/dasmz.com\/wp-content\/uploads\/2026\/08\/Screenshot-from-2026-08-19-22-15-02-768x444.png 768w, https:\/\/dasmz.com\/wp-content\/uploads\/2026\/08\/Screenshot-from-2026-08-19-22-15-02-624x360.png 624w\" sizes=\"(max-width: 779px) 100vw, 779px\" \/><\/figure>\n\n\n\n<p><strong>\u9644\u5f551\u3001\u89c6\u9891\u64cd\u4f5c\u6f14\u793a<\/strong><\/p>\n\n\n\n<p><strong>\u9644\u5f552\u3001@Dasmz<\/strong><\/p>\n\n\n\n<p>\u535a\u5ba2\u5185\uff0c\u6240\u6709\u6559\u7a0b\u4e3a\u624b\u6253\u539f\u521b\u6559\u7a0b\uff0c\u5982\u679c\u6280\u672f\u6559\u7a0b\u5bf9\u60a8\u6709\u6240\u5e2e\u52a9\uff0c\u6b22\u8fce\u6253\u8d4f\u4f5c\u8005\u3002\u6280\u672f\u5c42\u9762\uff0c\u95fb\u9053\u6709\u5148\u540e\uff0c\u5982\u6709\u758f\u6f0f\u3001\u9519\u8bef\uff0c\u6b22\u8fce\u6307\u6b63\u3002\u6280\u672f\u535a\u5ba2\u7684\u5185\u5bb9\uff0c\u4e00\u822c\u5177\u6709\u4e00\u5b9a\u7684\u73af\u5883\u4f9d\u8d56\uff0c\u5177\u6709\u4e00\u5b9a\u7684\u5e74\u4ee3\u4f9d\u8d56\uff0c\u914c\u60c5\u53c2\u8003\u5176\u4e2d\u7684\u5185\u5bb9\uff0c\u8bf7\u52ff\u5b8c\u5168\u7167\u642c\u7167\u6284\u3002<\/p>\n\n\n\n<p>\u5bf9\u4e8e\u535a\u5ba2\u5185\u5df2\u63d0\u53ca\u7684\u4e13\u4e1a\u77e5\u8bc6\uff0c\u5982\u679c\u9700\u8981\u6280\u672f\u6307\u5bfc\uff0c\u6b22\u8fce\u8054\u7cfb\u6211\uff0c\u4ec5\u9700\u652f\u4ed8\u5de5\u65f6\u8d39<\/p>\n\n\n\n<p>Twitter: <a href=\"https:\/\/x.com\/fdmove\">Dasmz<\/a><\/p>\n\n\n\n<p>Youtube: <a href=\"https:\/\/www.youtube.com\/@DasmzStudio\" data-type=\"URL\" data-id=\"https:\/\/www.youtube.com\/@DasmzStudio\">@DasmzStudio<\/a><\/p>\n\n\n\n<p>Telegram: <a href=\"https:\/\/t.me\/fdmove\" data-type=\"URL\" data-id=\"https:\/\/t.me\/fdmove\">@Dasmz<\/a><\/p>\n\n\n<div class=\"wp-block-image is-style-default\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"574\" height=\"446\" src=\"https:\/\/dasmz.com\/wp-content\/uploads\/2020\/12\/DONATE.jpg\" alt=\"Donate\" class=\"wp-image-18\"\/><figcaption class=\"wp-element-caption\">\u4e91\u4e5e\u8ba8<\/figcaption><\/figure><\/div>\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u7f00\u3001\u6587\u6863\u4fee\u6539\u8bb0\u5f55 20250819 \u521d\u59cb\u5316\u7f16\u8f91\u6b64\u6587\u7ae0\uff0c\u5b8c\u7a3f \u7ae0\u82821\u3001\u9700\u6c42\u63cf\u8ff0 \u5c34\u5c2c\uff0c\u5c0f\u6c14\uff0c\u5206\u4e861\u4e2a12G\u78c1\u76d8 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"_links":{"self":[{"href":"https:\/\/dasmz.com\/index.php?rest_route=\/wp\/v2\/posts\/5356"}],"collection":[{"href":"https:\/\/dasmz.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dasmz.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dasmz.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dasmz.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5356"}],"version-history":[{"count":21,"href":"https:\/\/dasmz.com\/index.php?rest_route=\/wp\/v2\/posts\/5356\/revisions"}],"predecessor-version":[{"id":5398,"href":"https:\/\/dasmz.com\/index.php?rest_route=\/wp\/v2\/posts\/5356\/revisions\/5398"}],"wp:attachment":[{"href":"https:\/\/dasmz.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5356"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dasmz.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5356"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dasmz.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5356"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}