{"id":812,"date":"2020-11-10T17:53:07","date_gmt":"2020-11-10T09:53:07","guid":{"rendered":"https:\/\/www.kiccleaf.com\/?p=812"},"modified":"2020-11-10T17:53:08","modified_gmt":"2020-11-10T09:53:08","slug":"%e9%98%bf%e9%87%8c%e4%ba%91centos8-2%e7%b3%bb%e7%bb%9f%e7%9b%98%e6%89%a9%e5%ae%b9%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"http:\/\/www.kiccleaf.com\/?p=812","title":{"rendered":"\u963f\u91cc\u4e91CentOS8.2\u7cfb\u7edf\u76d8\u6269\u5bb9\u65b9\u6cd5"},"content":{"rendered":"\n<p>\u4f7f\u7528\u963f\u91cc\u4e91\u955c\u50cf\u9ed8\u8ba4\u4e3aLinux 20G\u5927\u5c0f\uff0c\u5982\u679c\u9009\u62e9\u4e8640G\u5bb9\u91cf\u6216\u662f\u66f4\u5927\u5bb9\u91cf\u786c\u76d8\u5927\u5c0f\uff0c\u88c5\u597d\u955c\u50cf\u7cfb\u7edf\u540e\u76d8\u8fd8\u662f20G\uff0c\u9700\u8981\u81ea\u5df1\u52a8\u624b\u5bf9\u7cfb\u7edf\u76d8\u8fdb\u884c\u6269\u5bb9\u64cd\u4f5c\uff0c\u8fd9\u70b9\u662f\u771f\u7684\u4e0d\u65b9\u4fbf\uff0c\u6709\u6280\u672f\u5e95\u5b50\u7684\u4eba\u53ef\u4ee5\u5206\u5206\u949f\u641e\u5b9a\uff0c\u90a3\u5bf9\u4e8e\u666e\u901a\u5e94\u7528\u8005\u6765\u8bf4\u662f\u6bd4\u8f83\u9ebb\u70e6\u7684\uff0c\u5176\u5b9e\u547d\u4ee4\u5c31\u8fd9\u51e0\u4e2a\uff0c\u8bb0\u5f55\u4e00\u4e0b\u4f9b\u5927\u5bb6\u53c2\u8003\uff1a<\/p>\n\n\n\n<p>\u7528fdisk -l\u67e5\u770b\u786c\u76d8\u662f40G\uff0c\u8fd8\u670920G\u672a\u88ab\u52a0\u8f7d\u4f7f\u7528<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"apacheconf\" class=\"language-apacheconf\">[root@kiccleaf ~]# fdisk -l\r\nDisk \/dev\/vda: 40 GiB, 42949672960 bytes, 83886080 sectors\r\nUnits: sectors of 1 * 512 = 512 bytes\r\nSector size (logical\/physical): 512 bytes \/ 512 bytes\r\nI\/O size (minimum\/optimal): 512 bytes \/ 512 bytes\r\nDisklabel type: dos\r\nDisk identifier: 0x76042835\r\n\r\nDevice     Boot Start      End  Sectors Size Id Type\r\n\/dev\/vda1  *     2048 41943039 41940992  20G 83 Linux<\/code><\/pre>\n\n\n\n<p>\u5148\u67e5\u770b\u4e00\u4e0b\u4f60\u7684\u7cfb\u7edf\u76d8\u662f\u5426\u9ed8\u8ba420G\u6216\u662f30G\u5927\u5c0f\uff0c\u8fd9\u91cc\u6211\u9009\u62e9\u4e86CentOS8.2 x64\u7248\u672c\u7684\uff0c\u9ed8\u8ba4\u4e3a20G\uff1a<strong>\/dev\/vda1 xfs 20G 2.4G 18G 12% \/<\/strong><br>\u7528df -Th\u547d\u4ee4\u67e5\u770b\/dev\/vda1\u76d8\uff0cxfs\u76d8\u683c\u5f0f\uff0c\u6700\u65b0\u7684\u7cfb\u7edf\u4e00\u822c\u90fd\u91c7\u7528\u6b64\u683c\u5f0f\uff0c\u8001\u7684\u6709ext3&#8211;ext4\u7b49\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">[root@kiccleaf ~]# df -Th\r\nFilesystem     Type      Size  Used Avail Use% Mounted on\r\ndevtmpfs       devtmpfs  1.9G     0  1.9G   0% \/dev\r\ntmpfs          tmpfs     1.9G     0  1.9G   0% \/dev\/shm\r\ntmpfs          tmpfs     1.9G  448K  1.9G   1% \/run\r\ntmpfs          tmpfs     1.9G     0  1.9G   0% \/sys\/fs\/cgroup\r\n\/dev\/vda1      xfs        20G  2.4G   18G  12% \/\r\ntmpfs          tmpfs     378M     0  378M   0% \/run\/user\/0<\/code><\/pre>\n\n\n\n<p>\u7528\u547d\u4ee4growpart \/dev\/vda 1 \u5206\u533a\u70ed\u6269\u5c55<strong>vda\u548c1\u4e2d\u95f4\u6709\u7a7a\u683c<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">[root@kiccleaf ~]# growpart \/dev\/vda 1\r\nCHANGED: partition=1 start=2048 old: size=41940992 end=41943040 new: size=83883999,end=83886047<\/code><\/pre>\n\n\n\n<p>xfs\u683c\u5f0f\u7684\u786c\u76d8\u91c7\u7528xfs_growfs \/\u547d\u4ee4\u5373\u53ef\uff0c\u8868\u793a\u4e3a\u6269\u5bb9\u7cfb\u7edf\u76d8\u7684\/dev\/vda1\u5206\u533a\u7684\u6587\u4ef6\u7cfb\u7edf\u3002\u5176\u4e2d\u6839\u76ee\u5f55\uff08\/\uff09\u4e3a\/dev\/vda1\u7684\u6302\u8f7d\u70b9\u3002<br>\u5982\u679c\u662f\u5176\u4ed6\u683c\u5f0f\u91c7\u7528\uff1aext*\u6587\u4ef6\u7cfb\u7edf\uff08\u4f8b\u5982ext3\u548cext4\uff09\uff1a\u8fd0\u884cresize2fs \/dev\/vda1\u547d\u4ee4\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">[root@kiccleaf ~]# xfs_growfs \/\r\nmeta-data=\/dev\/vda1              isize=512    agcount=4, agsize=1310656 blks\r\n         =                       sectsz=512   attr=2, projid32bit=1\r\n         =                       crc=1        finobt=1, sparse=1, rmapbt=0\r\n         =                       reflink=1\r\ndata     =                       bsize=4096   blocks=5242624, imaxpct=25\r\n         =                       sunit=0      swidth=0 blks\r\nnaming   =version 2              bsize=4096   ascii-ci=0, ftype=1\r\nlog      =internal log           bsize=4096   blocks=2560, version=2\r\n         =                       sectsz=512   sunit=0 blks, lazy-count=1\r\nrealtime =none                   extsz=4096   blocks=0, rtextents=0\r\ndata blocks changed from 5242624 to 10485499<\/code><\/pre>\n\n\n\n<p>\u7528\u547d\u4ee4df -h \u67e5\u770b\u4e00\u4e0b\u7cfb\u7edf\u76d8\u5bb9\u91cf\u662f\u5426\u5df2\u7ecf\u523040G\u4e86<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">[root@kiccleaf ~]# df -h\r\nFilesystem      Size  Used Avail Use% Mounted on\r\ndevtmpfs        1.9G     0  1.9G   0% \/dev\r\ntmpfs           1.9G     0  1.9G   0% \/dev\/shm\r\ntmpfs           1.9G  448K  1.9G   1% \/run\r\ntmpfs           1.9G     0  1.9G   0% \/sys\/fs\/cgroup\r\n\/dev\/vda1        40G  2.6G   38G   7% \/\r\ntmpfs           378M     0  378M   0% \/run\/user\/0<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u4f7f\u7528\u963f\u91cc\u4e91\u955c\u50cf\u9ed8\u8ba4\u4e3aLinux 20G\u5927\u5c0f\uff0c\u5982\u679c\u9009&#8230;<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"http:\/\/www.kiccleaf.com\/?p=812\">Continue reading<span class=\"screen-reader-text\">\u963f\u91cc\u4e91CentOS8.2\u7cfb\u7edf\u76d8\u6269\u5bb9\u65b9\u6cd5<\/span><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":11,"footnotes":""},"categories":[4],"tags":[116,125,126],"class_list":["post-812","post","type-post","status-publish","format-standard","hentry","category-linux-","tag-centos8","tag-growpart","tag-126","entry"],"views":2410,"_links":{"self":[{"href":"http:\/\/www.kiccleaf.com\/index.php?rest_route=\/wp\/v2\/posts\/812","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.kiccleaf.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.kiccleaf.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.kiccleaf.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.kiccleaf.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=812"}],"version-history":[{"count":2,"href":"http:\/\/www.kiccleaf.com\/index.php?rest_route=\/wp\/v2\/posts\/812\/revisions"}],"predecessor-version":[{"id":814,"href":"http:\/\/www.kiccleaf.com\/index.php?rest_route=\/wp\/v2\/posts\/812\/revisions\/814"}],"wp:attachment":[{"href":"http:\/\/www.kiccleaf.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=812"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.kiccleaf.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=812"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.kiccleaf.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=812"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}