{"id":14016,"date":"2017-12-12T21:34:03","date_gmt":"2017-12-13T02:34:03","guid":{"rendered":"http:\/\/bangla.salearningschool.com\/recent-posts\/?p=14016"},"modified":"2017-12-12T21:34:03","modified_gmt":"2017-12-13T02:34:03","slug":"linux-lvm-logical-volume-manager-multiple-hard-disk-partition-volume-management","status":"publish","type":"post","link":"http:\/\/bangla.sitestree.com\/?p=14016","title":{"rendered":"Linux: LVM : Logical Volume Manager : Multiple Hard Disk and Partition and Volume Management"},"content":{"rendered":"<p>On RedHat\/Centos Linux &#8211; LVM experiments<\/p>\n<p><strong>Concepts to understand:<\/strong><\/p>\n<p><strong>Physical Volume:<\/strong> Physical Hard Drive or\u00a0 Partitions in Physical Hard Drive<\/p>\n<p><strong>Physical Extent:<\/strong>\u00a0 One unit of space usually 4 MB.<\/p>\n<p><strong>Volume Group:<\/strong> One or multiple Physical Volumes can be assigned to a Volume Group<\/p>\n<p><strong>Logical Volume:<\/strong> Logical volumes are created from the volume groups. This is the volume that users interact with. You mount Logical Volume to work with a logical hard drive space (not partition though similar)<\/p>\n<p><strong>Linux Commands to Know:<\/strong><\/p>\n<p>pvcreate : create\u00a0 a physical volume. Initialize a physical drive or partition for LVM<\/p>\n<p>vgcreate: create volume group. Parameters: hard drive or partitions<\/p>\n<p>lvcreate: create logical volume from volume group<\/p>\n<p>lvextend: extend a logical volume<\/p>\n<p>lvresize, lvreduce: to resize or to reduce logical volume<\/p>\n<p>lvremove: to remove a logical volume<\/p>\n<p>&nbsp;<\/p>\n<p>Some experiment:<\/p>\n<p>I added some hard drives using VMWARE.<\/p>\n<p>lsblk<br \/>\npvcreate \/dev\/sdb \/dev\/sdc<br \/>\nvgcreate vg001 \/dev\/sdb \/dev\/sdc<br \/>\nlvcreate -L 500M vg001<br \/>\nlsblk<br \/>\nlvcreate -l 100 vg001<br \/>\nlsblk<br \/>\npvs<br \/>\npvdisplay<br \/>\npvdisplay -v<br \/>\nvgcreate -s 8m \/dev\/sde<br \/>\nlsblk<br \/>\nvgcreate vg002 -s 8m \/dev\/sdd<br \/>\npv<br \/>\npvs<br \/>\npvdisplay<br \/>\nlvcreate -L 1G vg002<br \/>\nlsblk<br \/>\nlvextend lv001 +100M<br \/>\nlvextend vg001-lvol0 +100M<br \/>\nlvextend \/dev\/sdb\/vg001-lvol0 +100M<br \/>\nlsblk<br \/>\nlvrename vg01 lvol0 lvolnew<br \/>\nlvrename vg001 lvol0 lvolnew<br \/>\nlsblk<br \/>\nlvextend vg001 lvolnew +100M<br \/>\nlvreduce -L 100m \/dev\/vg001\/lvolnew<br \/>\nlsblk<br \/>\nlvreduce -L 300m \/dev\/vg001\/lvolnew<br \/>\nlvreduce -L 50m \/dev\/vg001\/lvolnew<br \/>\nlvresize -L 700m \/dev\/vg001\/lvolnew<br \/>\nlsblk<br \/>\nlvextend vg001 lvolnew +100M<br \/>\nlvextend \/dev\/vg001\/lvolnew +100M<br \/>\nlvextend -L 100m \/dev\/vg001\/lvolnew<br \/>\nlvextend +100m \/dev\/vg001\/lvolnew<br \/>\nlvextend -L 200 \/dev\/vg001\/lvolnew<br \/>\nlvextend -L 200m \/dev\/vg001\/lvolnew<br \/>\nlvextend -l 200 \/dev\/vg001\/lvolnew<br \/>\nlsblk<br \/>\nlvextend -l 210 \/dev\/vg001\/lvolnew<br \/>\nlsblk<br \/>\nlvextend vg001 lvolnew +100M<br \/>\nhistory<br \/>\nhistory &gt; history.txt<\/p>\n","protected":false},"excerpt":{"rendered":"<p>On RedHat\/Centos Linux &#8211; LVM experiments Concepts to understand: Physical Volume: Physical Hard Drive or\u00a0 Partitions in Physical Hard Drive Physical Extent:\u00a0 One unit of space usually 4 MB. Volume Group: One or multiple Physical Volumes can be assigned to a Volume Group Logical Volume: Logical volumes are created from the volume groups. This is &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"http:\/\/bangla.sitestree.com\/?p=14016\">Continue reading<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[1231],"tags":[],"class_list":["post-14016","post","type-post","status-publish","format-standard","hentry","category-----linux-and-unix","item-wrap"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":67592,"url":"http:\/\/bangla.sitestree.com\/?p=67592","url_meta":{"origin":14016,"position":0},"title":"Disk\/Partition\/Logical Volume (LVM) Management related commands in Centos\/Redhat Linux #DevOps #RHCSA","author":"Author-Check- Article-or-Video","date":"July 25, 2021","format":false,"excerpt":"echo \"Dec 22nd 2017\" 321 pvs 322 output 323 PV VG Fmt Attr PSize PFree 324 \/dev\/sda2 cl lvm2 a-- 19.00g 0 325 pvs 326 vgs 327 lsblk 328 vgdisplay 329 vgdisplay | grep \"PE Size\" 330 PE Size 4.00 MiB 331 vgdisplay > vgdisplay20171222.txt 332 vgdisplay | grep 'PE\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":24919,"url":"http:\/\/bangla.sitestree.com\/?p=24919","url_meta":{"origin":14016,"position":1},"title":"Courses on Volume Manager #Root","author":"Author-Check- Article-or-Video","date":"April 13, 2021","format":false,"excerpt":"The purpose is: check the course topics, if you want infrastructure jobs though are not familiar with Volume Managers. Linux Logical Volume Manager (LVM)https:\/\/www.udemy.com\/linux-logical-volume-manager-lvm\/ Solaris Volume Manager Administrationhttps:\/\/education.oracle.com\/solaris-volume-manager-administration\/courP_504 Veritas Volume Manager 6.1http:\/\/www.krnetworkcloud.org\/vvm.html Solaris Volume Manager Administration Training & Certification Courses: https:\/\/www.koenig-solutions.com\/oracle-solaris-volume-manager-administration-training-certification-course.aspx#tab2 https:\/\/www.koenig-solutions.com\/oracle-solaris-volume-manager-administration-training-certification-course.aspx#tab2 https:\/\/www.koenig-solutions.com\/oracle-solaris-volume-manager-administration-training-certification-course.aspx#tab2 Veritas Volume Manager Administration 6.0 for RHEL\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":14565,"url":"http:\/\/bangla.sitestree.com\/?p=14565","url_meta":{"origin":14016,"position":2},"title":"\u09ad\u09b2\u09bf\u0989\u09ae \u09ae\u09cd\u09af\u09be\u09a8\u09c7\u099c\u09be\u09b0 \u0983 \u0987\u09a8\u09ab\u09cd\u09b0\u09be\u09b8\u09cd\u099f\u09cd\u09b0\u09be\u0995\u099a\u09be\u09b0 \u099c\u09ac \u098f\u09b0 \u099c\u09a8\u09cd\u09af","author":"Sayed","date":"January 5, 2019","format":false,"excerpt":"\u0986\u09ae\u09b0\u09be CCNA\/CCNP\/MCSE \u09b8\u09ae\u09cd\u09aa\u09b0\u09cd\u0995\u09c7 \u099c\u09be\u09a8\u09bf\u0964 \u09b9\u09df\u09a4\u00a0\u00a0\u09ad\u09b2\u09bf\u0989\u09ae \u09ae\u09cd\u09af\u09be\u09a8\u09c7\u099c\u09be\u09b0 \u09b8\u09ae\u09cd\u09aa\u09b0\u09cd\u0995\u09c7 \u099c\u09be\u09a8\u09bf \u09a8\u09be\u0964 Linux Logical Volume Manager (LVM)https:\/\/www.udemy.com\/linux-logical-volume-manager-lvm\/ Solaris Volume Manager Administrationhttps:\/\/education.oracle.com\/solaris-volume-manager-administration\/courP_504 Veritas Volume Manager 6.1http:\/\/www.krnetworkcloud.org\/vvm.html Solaris Volume Manager Administration Training & Certification Courses https:\/\/www.koenig-solutions.com\/oracle-solaris-volume-manager-administration-training-certification-course.aspx#tab2 Veritas Volume Manager Administration 6.0 for RHEL Training & Certification Courseshttps:\/\/www.koenig-solutions.com\/rhel-veritas-manager-vxvm-admin-6-training-course.aspx#tab2 HP-UX Logical Volume Managerhttps:\/\/www.qa.com\/training-courses\/technical-it-training\/hp\/hp-hardware\/hp-ux--hp-integrity\/system-administrator\/hp-ux-logical-volume-manager","rel":"","context":"In &quot;\u09ac\u09cd\u09b2\u0997 \u0964 Blog&quot;","block_context":{"text":"\u09ac\u09cd\u09b2\u0997 \u0964 Blog","link":"http:\/\/bangla.sitestree.com\/?cat=182"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":67590,"url":"http:\/\/bangla.sitestree.com\/?p=67590","url_meta":{"origin":14016,"position":3},"title":"Redhat\/CentOS Linux and Disk\/Volume Management. LVM, parted, gdisk, vgcreate, lvcreate and similar #DevOps #RHCSA","author":"Author-Check- Article-or-Video","date":"July 25, 2021","format":false,"excerpt":"Misc related commands from history [Redhat\/CentOS Linux and Disk\/Volume Management. LVM, parted, gdisk, vgcreate, lvcreate and similar] \u00a0 fdisk \/dev\/sdb 93 parted 94 parted \/dev\/sdb 96 parted \/dev\/sdb print 97 vi \/etc\/fstab 98 parted \/dev\/sdb 99 vi \/etc\/fstab 100 parted \/dev\/sdb 101 parted \/dev\/sdb print 102 gdisk \/dev\/sdc 103 gdisk\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":78671,"url":"http:\/\/bangla.sitestree.com\/?p=78671","url_meta":{"origin":14016,"position":4},"title":"compare contrast these commands: Get-Disk | Format-Table -Auto Get-PhysicalDisk Get-Partition -DiskNumber 0 Get-Partition -DriveLetter D","author":"Sayed","date":"May 24, 2026","format":false,"excerpt":"These four commands are all disk\/partition viewing commands, but they look at different levels of storage. The disk-management lab explains that Get-Disk shows logical disks, Get-PhysicalDisk shows physical disk devices, and Get-Partition is used to view partition information for a disk. CommandMain PurposeLevelGet-Disk | Format-Table -AutoShows disks in a clean\u2026","rel":"","context":"In &quot;Power Shell&quot;","block_context":{"text":"Power Shell","link":"http:\/\/bangla.sitestree.com\/?cat=1981"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":78669,"url":"http:\/\/bangla.sitestree.com\/?p=78669","url_meta":{"origin":14016,"position":5},"title":"Command performs the full setup of a new RAW disk in one PowerShell pipeline:","author":"Sayed","date":"May 24, 2026","format":false,"excerpt":"explain: Get-Disk | Where PartitionStyle -eq \"RAW\" | Initialize-Disk -PartitionStyle GPT -PassThru | New-Partition -UseMaximumSize -AssignDriveLetter | Format-Volume -FileSystem NTFS -NewFileSystemLabel \"MYDATA\" This command performs the full setup of a new RAW disk in one PowerShell pipeline: Get-Disk | Where PartitionStyle -eq \"RAW\" | Initialize-Disk -PartitionStyle GPT -PassThru | New-Partition\u2026","rel":"","context":"In &quot;Power Shell&quot;","block_context":{"text":"Power Shell","link":"http:\/\/bangla.sitestree.com\/?cat=1981"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/14016","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=14016"}],"version-history":[{"count":1,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/14016\/revisions"}],"predecessor-version":[{"id":14017,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/14016\/revisions\/14017"}],"wp:attachment":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=14016"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=14016"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=14016"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}