{"id":3412,"date":"2024-04-17T16:45:44","date_gmt":"2024-04-17T07:45:44","guid":{"rendered":"https:\/\/www.white-box.biz\/?p=3412"},"modified":"2024-04-19T18:29:53","modified_gmt":"2024-04-19T09:29:53","slug":"centos%e3%83%91%e3%83%bc%e3%83%86%e3%82%a3%e3%82%b7%e3%83%a7%e3%83%b3%e6%8b%a1%e5%bc%b5","status":"publish","type":"post","link":"https:\/\/www.white-box.biz\/?p=3412","title":{"rendered":"Centos\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u62e1\u5f35"},"content":{"rendered":"\n<p>\u4eca\u66f4\u3060\u304c<a href=\"https:\/\/www.conoha.jp\/vps\/news\/?ap=2015051896\">conoha vps<\/a>\u306e\u30c7\u30a3\u30b9\u30af\u304c50G\u2192100G\u306b\u306a\u3063\u305f\u306e\u3067\u5bfe\u5fdc\u3092\u884c\u3063\u305f\u3002<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<blockquote class=\"wp-block-quote\">\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>\n# cd \/\n\n\n# fdisk -l\n\nDisk \/dev\/vda: 107.4 GB, 107374182400 bytes, 209715200 sectors\nUnits = sectors of 1 * 512 = 512 bytes\nSector size (logical\/physical): 512 bytes \/ 512 bytes\nI\/O size (minimum\/optimal): 512 bytes \/ 512 bytes\nDisk label type: dos\nDisk identifier: 0x0005dc7a\n\n   Device Boot      Start         End      Blocks   Id  System\n\/dev\/vda1   *        2048     1026047      512000   83  Linux\n\/dev\/vda2         1026048   104857599    51915776   8e  Linux LVM\n\nDisk \/dev\/mapper\/centos-root: 51.0 GB, 50964987904 bytes, 99540992 sectors\nUnits = sectors of 1 * 512 = 512 bytes\nSector size (logical\/physical): 512 bytes \/ 512 bytes\nI\/O size (minimum\/optimal): 512 bytes \/ 512 bytes\n\n\nDisk \/dev\/mapper\/centos-swap: 2147 MB, 2147483648 bytes, 4194304 sectors\nUnits = sectors of 1 * 512 = 512 bytes\nSector size (logical\/physical): 512 bytes \/ 512 bytes\nI\/O size (minimum\/optimal): 512 bytes \/ 512 bytes\n\n# df -h\nFilesystem               Size  Used Avail Use% Mounted on\ndevtmpfs                 479M     0  479M   0% \/dev\ntmpfs                    496M   12K  496M   1% \/dev\/shm\ntmpfs                    496M   14M  483M   3% \/run\ntmpfs                    496M     0  496M   0% \/sys\/fs\/cgroup\n\/dev\/mapper\/centos-root   48G   16G   32G  33% \/\n\/dev\/vda1                497M  397M  100M  80% \/boot\ntmpfs                    100M     0  100M   0% \/run\/user\/1000\ntmpfs                    100M     0  100M   0% \/run\/user\/0\n\n# lvdisplay\n  --- Logical volume ---\n  LV Path                \/dev\/centos\/swap\n  LV Name                swap\n  VG Name                centos\n  LV UUID                4ihePj-WD7H-O3J6-aSEv-kQEA-Q6UT-cerpcA\n  LV Write Access        read\/write\n  LV Creation host, time localhost.localdomain, 2015-12-24 14:02:12 +0900\n  LV Status              available\n  # open                 2\n  LV Size                2.00 GiB\n  Current LE             512\n  Segments               1\n  Allocation             inherit\n  Read ahead sectors     auto\n  - currently set to     8192\n  Block device           253:1\n   \n  --- Logical volume ---\n  LV Path                \/dev\/centos\/root\n  LV Name                root\n  VG Name                centos\n  LV UUID                YcfoSu-M0o7-cvWK-Op2I-LxyG-0gHK-ffypmV\n  LV Write Access        read\/write\n  LV Creation host, time localhost.localdomain, 2015-12-24 14:02:13 +0900\n  LV Status              available\n  # open                 1\n  LV Size                47.46 GiB\n  Current LE             12151\n  Segments               1\n  Allocation             inherit\n  Read ahead sectors     auto\n  - currently set to     8192\n  Block device           253:0\n   \n\n# parted \/dev\/vda\nGNU Parted 3.1\nUsing \/dev\/vda\nWelcome to GNU Parted! Type 'help' to view a list of commands.\n\n(parted) print                                                            \nModel: Virtio Block Device (virtblk)\nDisk \/dev\/vda: 107GB\nSector size (logical\/physical): 512B\/512B\nPartition Table: msdos\nDisk Flags: \n\nNumber  Start   End     Size    Type     File system  Flags\n 1      1049kB  525MB   524MB   primary  xfs          boot\n 2      525MB   53.7GB  53.2GB  primary               lvm\n\n(parted) resizepart 2\nEnd?  [53.7GB]? 100%                                                      \n(parted) print                                                            \nModel: Virtio Block Device (virtblk)\nDisk \/dev\/vda: 107GB\nSector size (logical\/physical): 512B\/512B\nPartition Table: msdos\nDisk Flags: \n\nNumber  Start   End    Size   Type     File system  Flags\n 1      1049kB  525MB  524MB  primary  xfs          boot\n 2      525MB   107GB  107GB  primary               lvm\n\n(parted) quit                                                             \nInformation: You may need to update \/etc\/fstab.\n\n# fdisk -l                                       \n\nDisk \/dev\/vda: 107.4 GB, 107374182400 bytes, 209715200 sectors\nUnits = sectors of 1 * 512 = 512 bytes\nSector size (logical\/physical): 512 bytes \/ 512 bytes\nI\/O size (minimum\/optimal): 512 bytes \/ 512 bytes\nDisk label type: dos\nDisk identifier: 0x0005dc7a\n\n   Device Boot      Start         End      Blocks   Id  System\n\/dev\/vda1   *        2048     1026047      512000   83  Linux\n\/dev\/vda2         1026048   209715199   104344576   8e  Linux LVM\n\nDisk \/dev\/mapper\/centos-root: 51.0 GB, 50964987904 bytes, 99540992 sectors\nUnits = sectors of 1 * 512 = 512 bytes\nSector size (logical\/physical): 512 bytes \/ 512 bytes\nI\/O size (minimum\/optimal): 512 bytes \/ 512 bytes\n\n\nDisk \/dev\/mapper\/centos-swap: 2147 MB, 2147483648 bytes, 4194304 sectors\nUnits = sectors of 1 * 512 = 512 bytes\nSector size (logical\/physical): 512 bytes \/ 512 bytes\nI\/O size (minimum\/optimal): 512 bytes \/ 512 bytes\n\n# pvdisplay\n  --- Physical volume ---\n  PV Name               \/dev\/vda2\n  VG Name               centos\n  PV Size               49.51 GiB \/ not usable 3.00 MiB\n  Allocatable           yes \n  PE Size               4.00 MiB\n  Total PE              12674\n  Free PE               11\n  Allocated PE          12663\n  PV UUID               OQ0g7d-2BeQ-PXOr-B9lK-hfmU-8F2K-ZR4h8m\n   \n\n\n# pvresize -tv \/dev\/vda2\n  TEST MODE: Metadata will NOT be updated and volumes will not be (de)activated.\n    Test mode: Skipping archiving of volume group.\n    Resizing volume \"\/dev\/vda2\" to 208689152 sectors.\n    Resizing physical volume \/dev\/vda2 from 12674 to 25474 extents.\n    Updating physical volume \"\/dev\/vda2\"\n    Test mode: Skipping backup of volume group.\n  Physical volume \"\/dev\/vda2\" changed\n  1 physical volume(s) resized or updated \/ 0 physical volume(s) not resized\n\n\n\n# pvresize -v \/dev\/vda2\n    Archiving volume group \"centos\" metadata (seqno 6).\n    Resizing volume \"\/dev\/vda2\" to 208689152 sectors.\n    Resizing physical volume \/dev\/vda2 from 12674 to 25474 extents.\n    Updating physical volume \"\/dev\/vda2\"\n    Creating volume group backup \"\/etc\/lvm\/backup\/centos\" (seqno 7).\n  Physical volume \"\/dev\/vda2\" changed\n  1 physical volume(s) resized or updated \/ 0 physical volume(s) not resized\n\n\n\n# pvdisplay\n  --- Physical volume ---\n  PV Name               \/dev\/vda2\n  VG Name               centos\n  PV Size               <99.51 GiB \/ not usable 2.00 MiB\n  Allocatable           yes \n  PE Size               4.00 MiB\n  Total PE              25474\n  Free PE               12811\n  Allocated PE          12663\n  PV UUID               OQ0g7d-2BeQ-PXOr-B9lK-hfmU-8F2K-ZR4h8m\n   \n\n\n# lvdisplay\n  --- Logical volume ---\n  LV Path                \/dev\/centos\/swap\n  LV Name                swap\n  VG Name                centos\n  LV UUID                4ihePj-WD7H-O3J6-aSEv-kQEA-Q6UT-cerpcA\n  LV Write Access        read\/write\n  LV Creation host, time localhost.localdomain, 2015-12-24 14:02:12 +0900\n  LV Status              available\n  # open                 2\n  LV Size                2.00 GiB\n  Current LE             512\n  Segments               1\n  Allocation             inherit\n  Read ahead sectors     auto\n  - currently set to     8192\n  Block device           253:1\n   \n  --- Logical volume ---\n  LV Path                \/dev\/centos\/root\n  LV Name                root\n  VG Name                centos\n  LV UUID                YcfoSu-M0o7-cvWK-Op2I-LxyG-0gHK-ffypmV\n  LV Write Access        read\/write\n  LV Creation host, time localhost.localdomain, 2015-12-24 14:02:13 +0900\n  LV Status              available\n  # open                 1\n  LV Size                47.46 GiB\n  Current LE             12151\n  Segments               1\n  Allocation             inherit\n  Read ahead sectors     auto\n  - currently set to     8192\n  Block device           253:0\n   \n\n\n# lvextend -trl +100%FREE \/dev\/centos\/root\n  TEST MODE: Metadata will NOT be updated and volumes will not be (de)activated.\n  Size of logical volume centos\/root changed from 47.46 GiB (12151 extents) to <97.51 GiB (24962 extents).\n  Logical volume centos\/root successfully resized.\n\n# lvextend -rl +100%FREE \/dev\/centos\/root\n  Size of logical volume centos\/root changed from 47.46 GiB (12151 extents) to <97.51 GiB (24962 extents).\n  Logical volume centos\/root successfully resized.\nmeta-data=\/dev\/mapper\/centos-root isize=256    agcount=4, agsize=3110656 blks\n         =                       sectsz=512   attr=2, projid32bit=1\n         =                       crc=0        finobt=0 spinodes=0\ndata     =                       bsize=4096   blocks=12442624, imaxpct=25\n         =                       sunit=0      swidth=0 blks\nnaming   =version 2              bsize=4096   ascii-ci=0 ftype=0\nlog      =internal               bsize=4096   blocks=6075, version=2\n         =                       sectsz=512   sunit=0 blks, lazy-count=1\nrealtime =none                   extsz=4096   blocks=0, rtextents=0\ndata blocks changed from 12442624 to 25561088\n\n\n\n# df -h\nFilesystem               Size  Used Avail Use% Mounted on\ndevtmpfs                 479M     0  479M   0% \/dev\ntmpfs                    496M   12K  496M   1% \/dev\/shm\ntmpfs                    496M   14M  483M   3% \/run\ntmpfs                    496M     0  496M   0% \/sys\/fs\/cgroup\n\/dev\/mapper\/centos-root   98G   16G   82G  16% \/\n\/dev\/vda1                497M  397M  100M  80% \/boot\ntmpfs                    100M     0  100M   0% \/run\/user\/1000\ntmpfs                    100M     0  100M   0% \/run\/user\/0\n\n\n\n<\/code><\/pre>\n<\/blockquote>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>\u4eca\u66f4\u3060\u304cconoha vps\u306e\u30c7\u30a3\u30b9\u30af\u304c50G\u2192100G\u306b\u306a\u3063\u305f\u306e\u3067\u5bfe\u5fdc\u3092\u884c\u3063\u305f\u3002<a href=\"https:\/\/www.white-box.biz\/?p=3412\"><b>[\u30fb\u30fb\u30fb\u7d9a\u304d\u3092\u8aad\u3080]<\/b><\/a><\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.white-box.biz\/index.php?rest_route=\/wp\/v2\/posts\/3412"}],"collection":[{"href":"https:\/\/www.white-box.biz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.white-box.biz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.white-box.biz\/index.php?rest_route=\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.white-box.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3412"}],"version-history":[{"count":11,"href":"https:\/\/www.white-box.biz\/index.php?rest_route=\/wp\/v2\/posts\/3412\/revisions"}],"predecessor-version":[{"id":3432,"href":"https:\/\/www.white-box.biz\/index.php?rest_route=\/wp\/v2\/posts\/3412\/revisions\/3432"}],"wp:attachment":[{"href":"https:\/\/www.white-box.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3412"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.white-box.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3412"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.white-box.biz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3412"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}