{"id":120,"date":"2020-05-11T23:13:19","date_gmt":"2020-05-11T22:13:19","guid":{"rendered":"https:\/\/blog.thomarite.uk\/?p=120"},"modified":"2020-05-11T23:43:52","modified_gmt":"2020-05-11T22:43:52","slug":"lvm-102-pvresize","status":"publish","type":"post","link":"https:\/\/blog.thomarite.uk\/index.php\/2020\/05\/11\/lvm-102-pvresize\/","title":{"rendered":"LVM 102: pvresize"},"content":{"rendered":"\n<p>Something very basic but took me several hours to workout. I had a VM that I wanted to increase a VG as I wanted to create a new LV. I increased the partition in the host server so the PV of the VG had the extra space, but then I couldnt see the increase inside the VM:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[root@HOST]# lvs\n  LV      VG  Attr  LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert\n  vm_data vg_os -wi-ao---- 300.00g\n\n[root@VM]# pvs\n  PV         VG      Fmt  Attr PSize    PFree\n  \/dev\/vdb   vg_data lvm2 a--  <200.00g 1020.00m<\/pre>\n\n\n\n<p>\"fdisk\" was telling me the disk was already 300G...<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[root@VM ~]# fdisk \/dev\/vdb\n\nWelcome to fdisk (util-linux 2.32.1).\nChanges will remain in memory only, until you decide to write them.\nBe careful before using the write command.\n\nThe old LVM2_member signature will be removed by a write command.\n\nDevice does not contain a recognized partition table.\nCreated a new DOS disklabel with disk identifier 0xd46fa2fc.\n\nCommand (m for help): p\nDisk \/dev\/vdb: 300 GiB, 322122547200 bytes, 629145600 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\nDisklabel type: dos\nDisk identifier: 0xd46fa2fc\n<\/pre>\n\n\n\n<p>I did a pvscan... and nothing. What I was missing? just \"pvresize\".... and then I can see my extra 100G in the PV and in the VG. So I can create the new LV I wanted...<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[root@VM ~]# pvresize \/dev\/vdb\n  Physical volume \"\/dev\/vdb\" changed\n  1 physical volume(s) resized or updated \/ 0 physical volume(s) not resized\n[root@VM ~]# pvs\n  PV         VG      Fmt  Attr PSize    PFree   \n  \/dev\/vdb   vg_data lvm2 a--  <300.00g <101.00g\n[root@VM ~]# \n[root@VM ~]# vgs\n  VG      #PV #LV #SN Attr   VSize    VFree   \n  vg_data   1   1   0 wz--n- <300.00g <101.00g\n\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Something very basic but took me several hours to workout. I had a VM that I wanted to increase a VG as I wanted to create a new LV. I increased the partition in the host server so the PV of the VG had the extra space, but then I couldnt see the increase inside &hellip; <a href=\"https:\/\/blog.thomarite.uk\/index.php\/2020\/05\/11\/lvm-102-pvresize\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;LVM 102: pvresize&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-120","post","type-post","status-publish","format-standard","hentry","category-unix"],"_links":{"self":[{"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/posts\/120","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/comments?post=120"}],"version-history":[{"count":2,"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/posts\/120\/revisions"}],"predecessor-version":[{"id":129,"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/posts\/120\/revisions\/129"}],"wp:attachment":[{"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/media?parent=120"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/categories?post=120"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/tags?post=120"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}