{"id":2684,"date":"2015-10-01T02:00:19","date_gmt":"2015-10-01T02:00:19","guid":{"rendered":"https:\/\/qbytes.cloud\/?p=2684"},"modified":"2015-10-01T02:00:19","modified_gmt":"2015-10-01T02:00:19","slug":"lvm-management","status":"publish","type":"post","link":"https:\/\/www.qbytes.cloud\/index.php\/2015\/10\/01\/lvm-management\/","title":{"rendered":"LVM Management"},"content":{"rendered":"<p><a href=\"http:\/\/serverfault.com\/questions\/28989\/fdisk-l-like-list-of-partitions-and-their-types-for-lvm-logical-volumes\" target=\"_blank\" rel=\"noopener\">http:\/\/serverfault.com\/questions\/28989\/fdisk-l-like-list-of-partitions-and-their-types-for-lvm-logical-volumes<\/a><\/p>\n<p><a href=\"http:\/\/www.howtogeek.com\/howto\/40702\/how-to-manage-and-use-lvm-logical-volume-management-in-ubuntu\/\" target=\"_blank\" rel=\"noopener\">http:\/\/www.howtogeek.com\/howto\/40702\/how-to-manage-and-use-lvm-logical-volume-management-in-ubuntu\/<\/a><\/p>\n<p>The fdisk shows a 256GB Drive. 50GB on root and the question is how to resize up to the 256GB drive for more space.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n]# fdsik -l\n-bash: fdsik: command not found\nroot@cpanel &#x5B;~]# df -h\nFilesystem            Size  Used Avail Use% Mounted on\n\/dev\/mapper\/VolGroup-lv_root\n                       50G   27G   21G  56% \/\ntmpfs                 3.9G     0  3.9G   0% \/dev\/shm\n\/dev\/sda1             485M   96M  364M  21% \/boot\n\/dev\/mapper\/VolGroup-lv_home\n                      1.1T   43G  996G   5% \/home\n\/dev\/sdc1             917G  200M  871G   1% \/backup\nroot@cpanel &#x5B;~]# fdisk -l\n\nDisk \/dev\/sdb: 1000.2 GB, 1000204886016 bytes\n255 heads, 63 sectors\/track, 121601 cylinders\nUnits = cylinders of 16065 * 512 = 8225280 bytes\nSector size (logical\/physical): 512 bytes \/ 512 bytes\nI\/O size (minimum\/optimal): 512 bytes \/ 512 bytes\nDisk identifier: 0x0004bb0e\n\n   Device Boot      Start         End      Blocks   Id  System\n\/dev\/sdb1               1      121602   976760832   8e  Linux LVM\n\nDisk \/dev\/sda: 256.1 GB, 256060514304 bytes\n255 heads, 63 sectors\/track, 31130 cylinders\nUnits = cylinders of 16065 * 512 = 8225280 bytes\nSector size (logical\/physical): 512 bytes \/ 512 bytes\nI\/O size (minimum\/optimal): 512 bytes \/ 512 bytes\nDisk identifier: 0x00062f67\n\n   Device Boot      Start         End      Blocks   Id  System\n\/dev\/sda1   *           1          64      512000   83  Linux\nPartition 1 does not end on cylinder boundary.\n\/dev\/sda2              64       31131   249545728   8e  Linux LVM\n\nDisk \/dev\/sdc: 1000.2 GB, 1000204886016 bytes\n81 heads, 63 sectors\/track, 382818 cylinders\nUnits = cylinders of 5103 * 512 = 2612736 bytes\nSector size (logical\/physical): 512 bytes \/ 512 bytes\nI\/O size (minimum\/optimal): 512 bytes \/ 512 bytes\nDisk identifier: 0xa9b15e21\n\n   Device Boot      Start         End      Blocks   Id  System\n\/dev\/sdc1               1      382818   976760095+  83  Linux\n\nDisk \/dev\/mapper\/VolGroup-lv_root: 53.7 GB, 53687091200 bytes\n255 heads, 63 sectors\/track, 6527 cylinders\nUnits = cylinders of 16065 * 512 = 8225280 bytes\nSector size (logical\/physical): 512 bytes \/ 512 bytes\nI\/O size (minimum\/optimal): 512 bytes \/ 512 bytes\nDisk identifier: 0x00000000\n\n\nDisk \/dev\/mapper\/VolGroup-lv_swap: 8355 MB, 8355053568 bytes\n255 heads, 63 sectors\/track, 1015 cylinders\nUnits = cylinders of 16065 * 512 = 8225280 bytes\nSector size (logical\/physical): 512 bytes \/ 512 bytes\nI\/O size (minimum\/optimal): 512 bytes \/ 512 bytes\nDisk identifier: 0x00000000\n\n\nDisk \/dev\/mapper\/VolGroup-lv_home: 1193.7 GB, 1193690529792 bytes\n255 heads, 63 sectors\/track, 145124 cylinders\nUnits = cylinders of 16065 * 512 = 8225280 bytes\nSector size (logical\/physical): 512 bytes \/ 512 bytes\nI\/O size (minimum\/optimal): 512 bytes \/ 512 bytes\nDisk identifier: 0x00000000\n\n\n<\/pre>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# df -h\nFilesystem            Size  Used Avail Use% Mounted on\n\/dev\/mapper\/VolGroup-lv_root\n                       50G   27G   21G  56% \/\ntmpfs                 3.9G     0  3.9G   0% \/dev\/shm\n\/dev\/sda1             485M   96M  364M  21% \/boot\n\/dev\/mapper\/VolGroup-lv_home\n                      1.1T   43G  996G   5% \/home\n\/dev\/sdc1             917G  200M  871G   1% \/backup\n\n<\/pre>\n<p>You can learn information about the volume group itself with &#8216;lvdisplay&#8217;, &#8216;vgscan&#8217;, &#8216;lvs&#8217; and &#8216;vgdisplay&#8217;.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nroot@cpanel &#x5B;~]# lvdisplay --maps\n  --- Logical volume ---\n  LV Path                \/dev\/VolGroup\/lv_root\n  LV Name                lv_root\n  VG Name                VolGroup\n  LV UUID                TYNmVB-vtiC-Gce6-FAsk-VXxi-CJDA-K4Pg8g\n  LV Write Access        read\/write\n  LV Creation host, time localhost.localdomain, 2014-08-29 13:01:37 -0400\n  LV Status              available\n  # open                 1\n  LV Size                50.00 GiB\n  Current LE             12800\n  Segments               1\n  Allocation             inherit\n  Read ahead sectors     auto\n  - currently set to     256\n  Block device           253:0\n\n  --- Segments ---\n  Logical extents 0 to 12799:\n    Type                linear\n    Physical volume     \/dev\/sda2\n    Physical extents    0 to 12799\n\n\n  --- Logical volume ---\n  LV Path                \/dev\/VolGroup\/lv_home\n  LV Name                lv_home\n  VG Name                VolGroup\n  LV UUID                PojYKo-WnwD-ywxH-6C0V-Ta7U-3sfE-x4szaI\n  LV Write Access        read\/write\n  LV Creation host, time localhost.localdomain, 2014-08-29 13:01:39 -0400\n  LV Status              available\n  # open                 1\n  LV Size                1.09 TiB\n  Current LE             284598\n  Segments               2\n  Allocation             inherit\n  Read ahead sectors     auto\n  - currently set to     256\n  Block device           253:3\n\n  --- Segments ---\n  Logical extents 0 to 238465:\n    Type                linear\n    Physical volume     \/dev\/sdb1\n    Physical extents    0 to 238465\n\n  Logical extents 238466 to 284597:\n    Type                linear\n    Physical volume     \/dev\/sda2\n    Physical extents    12800 to 58931\n\n\n  --- Logical volume ---\n  LV Path                \/dev\/VolGroup\/lv_swap\n  LV Name                lv_swap\n  VG Name                VolGroup\n  LV UUID                g2sdlK-rUv3-visr-NlMW-G3As-SOE2-07RDB1\n  LV Write Access        read\/write\n  LV Creation host, time localhost.localdomain, 2014-08-29 13:04:05 -0400\n  LV Status              available\n  # open                 1\n  LV Size                7.78 GiB\n  Current LE             1992\n  Segments               1\n  Allocation             inherit\n  Read ahead sectors     auto\n  - currently set to     256\n  Block device           253:1\n\n  --- Segments ---\n  Logical extents 0 to 1991:\n    Type                linear\n    Physical volume     \/dev\/sda2\n    Physical extents    58932 to 60923\n\n<\/pre>\n<p>LVS<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nlvs\n  LV      VG       Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert\n  lv_home VolGroup -wi-ao---- 931.71g\n  lv_root VolGroup -wi-ao---- 230.00g\n  lv_swap VolGroup -wi-ao----   7.78g\n\n<\/pre>\n<p>Both drives are in an LVM configuration. This allows you to create logical partitions that include either or both drives.<\/p>\n<p>\/dev\/mapper\/VolGroup-lv_root exists on the SDA drive (Physical volume \/dev\/sda2) and<br \/>\n\/dev\/mapper\/VolGroup-lv_home exists on both the SDA and SDB drive. To remove the LVM configuration, re-installation would be necessary, but we can re-configure the LVM configuration so that \/dev\/mapper\/VolGroup-lv_root is larger.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>http:\/\/serverfault.com\/questions\/28989\/fdisk-l-like-list-of-partitions-and-their-types-for-lvm-logical-volumes http:\/\/www.howtogeek.com\/howto\/40702\/how-to-manage-and-use-lvm-logical-volume-management-in-ubuntu\/ The fdisk shows a 256GB Drive. 50GB on root and the question is how to resize up to the 256GB drive for more space. ]# fdsik -l -bash: fdsik: command not found root@cpanel &#x5B;~]# df -h Filesystem Size Used Avail Use% Mounted on \/dev\/mapper\/VolGroup-lv_root 50G 27G 21G 56% \/ tmpfs 3.9G 0 3.9G &#8230; <a title=\"LVM Management\" class=\"read-more\" href=\"https:\/\/www.qbytes.cloud\/index.php\/2015\/10\/01\/lvm-management\/\" aria-label=\"Read more about LVM Management\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-2684","post","type-post","status-publish","format-standard","hentry","category-administration"],"_links":{"self":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/2684","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/comments?post=2684"}],"version-history":[{"count":0,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/2684\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/media?parent=2684"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/categories?post=2684"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/tags?post=2684"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}